Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit db127b79835cb971639e0185073e5d7756fb9d9a 1 parent 91c71d3
Adrian Holovaty authored August 15, 2005
3  django/core/management.py
@@ -494,6 +494,7 @@ def add(self, opts, error):
494 494
 
495 495
 def validate():
496 496
     "Validates all installed models."
  497
+    import django.models
497 498
     from django.core import meta
498 499
     e = ModelErrorCollection()
499 500
     module_list = meta.get_installed_model_modules()
@@ -544,6 +545,8 @@ def runserver(port):
544 545
         sys.exit(1)
545 546
     def inner_run():
546 547
         from django.conf.settings import SETTINGS_MODULE
  548
+        print "Validating models..."
  549
+        validate()
547 550
         print "\nStarting server on port %s with settings module %r." % (port, SETTINGS_MODULE)
548 551
         print "Go to http://127.0.0.1:%s/ for Django." % port
549 552
         print "Quit the server with CONTROL-C (Unix) or CTRL-BREAK (Windows)."
6  docs/django-admin.txt
@@ -148,6 +148,12 @@ startproject [projectname]
148 148
 Creates a Django project directory structure for the given project name in the
149 149
 current directory.
150 150
 
  151
+validate
  152
+--------
  153
+
  154
+Validates all installed models (according to the ``INSTALLED_APPS`` setting)
  155
+and prints validation errors to standard output.
  156
+
151 157
 Available options
152 158
 =================
153 159
 

0 notes on commit db127b7

Please sign in to comment.
Something went wrong with that request. Please try again.