app/django/core/management/commands/validate.py
author Sverre Rabbelier <srabbelier@gmail.com>
Thu, 02 Apr 2009 23:06:15 +0000 (2009-04-02)
changeset 2059 4037b147ed10
parent 54 03e267d67478
permissions -rw-r--r--
Make it possible to retrieve all properties in toDict We used to retrieve only the properties that are specified in the self.properties() dictionary, instead, we now iterate over the key_fields and only use self.properties() if those are not specified. Patch by: Sverre Rabbelier
from django.core.management.base import NoArgsCommand

class Command(NoArgsCommand):
    help = "Validates all installed models."

    requires_model_validation = False

    def handle_noargs(self, **options):
        self.validate(display_num_errors=True)