summaryrefslogtreecommitdiff
path: root/django/bin
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-08-15 05:05:52 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-08-15 05:05:52 +0000
commit8f9e5b6b3ba7165ddac717690d9710b49a4a5a6a (patch)
tree4c7254007d61b2037851bac346591a5c9b28cd7d /django/bin
parent4a7159865e766cf586ada6f3f73fb5f7504354b8 (diff)
Added 'django-admin.py validate', which validates all installed models. Validation only handles common errors at this point, but we'll be improving it each time we think of a potential model syntax problem. Also changed the development Web server to validate automatically at server start.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@503 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/bin')
-rwxr-xr-xdjango/bin/django-admin.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/django/bin/django-admin.py b/django/bin/django-admin.py
index fc9ffec373..c4aa51a066 100755
--- a/django/bin/django-admin.py
+++ b/django/bin/django-admin.py
@@ -7,7 +7,9 @@ ACTION_MAPPING = {
'adminindex': management.get_admin_index,
'createsuperuser': management.createsuperuser,
# 'dbcheck': management.database_check,
+ 'init': management.init,
'inspectdb': management.inspectdb,
+ 'install': management.install,
'runserver': management.runserver,
'sql': management.get_sql_create,
'sqlall': management.get_sql_all,
@@ -18,8 +20,7 @@ ACTION_MAPPING = {
'sqlsequencereset': management.get_sql_sequence_reset,
'startapp': management.startapp,
'startproject': management.startproject,
- 'init': management.init,
- 'install': management.install,
+ 'validate': management.validate,
}
NO_SQL_TRANSACTION = ('adminindex', 'dbcheck', 'install', 'sqlindexes')
@@ -65,7 +66,7 @@ def main():
print_error("An action is required.", sys.argv[0])
if not ACTION_MAPPING.has_key(action):
print_error("Your action, %r, was invalid." % action, sys.argv[0])
- if action in ('createsuperuser', 'init'):
+ if action in ('createsuperuser', 'init', 'validate'):
ACTION_MAPPING[action]()
elif action == 'inspectdb':
try: