diff options
| author | Adrian Holovaty <adrian@holovaty.com> | 2005-08-15 15:24:56 +0000 |
|---|---|---|
| committer | Adrian Holovaty <adrian@holovaty.com> | 2005-08-15 15:24:56 +0000 |
| commit | db127b79835cb971639e0185073e5d7756fb9d9a (patch) | |
| tree | b7a9842da36cd52b63621e799fc438f6519b2a9c | |
| parent | 91c71d36e621ddb3c7826db527290ca9e140e086 (diff) | |
Fixed #322 -- Development server now calls validate() again. Thanks, rmunn
git-svn-id: http://code.djangoproject.com/svn/django/trunk@505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/core/management.py | 3 | ||||
| -rw-r--r-- | docs/django-admin.txt | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/django/core/management.py b/django/core/management.py index a4c572d939..4a16d214ec 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -494,6 +494,7 @@ class ModelErrorCollection: def validate(): "Validates all installed models." + import django.models from django.core import meta e = ModelErrorCollection() module_list = meta.get_installed_model_modules() @@ -544,6 +545,8 @@ def runserver(port): sys.exit(1) def inner_run(): from django.conf.settings import SETTINGS_MODULE + print "Validating models..." + validate() print "\nStarting server on port %s with settings module %r." % (port, SETTINGS_MODULE) print "Go to http://127.0.0.1:%s/ for Django." % port print "Quit the server with CONTROL-C (Unix) or CTRL-BREAK (Windows)." diff --git a/docs/django-admin.txt b/docs/django-admin.txt index c5071f5335..bb734aaf1b 100644 --- a/docs/django-admin.txt +++ b/docs/django-admin.txt @@ -148,6 +148,12 @@ startproject [projectname] Creates a Django project directory structure for the given project name in the current directory. +validate +-------- + +Validates all installed models (according to the ``INSTALLED_APPS`` setting) +and prints validation errors to standard output. + Available options ================= |
