diff --git a/django/core/management.py b/django/core/management.py index 8e1c3d624d7..14182cbdff2 100644 --- a/django/core/management.py +++ b/django/core/management.py @@ -78,7 +78,7 @@ def get_version(): from django import VERSION v = '.'.join([str(i) for i in VERSION[:-1]]) if VERSION[-1]: - v += ' (%s)' % VERSION[-1] + v += '-' + VERSION[-1] return v def get_sql_create(app): @@ -217,7 +217,7 @@ def _get_sql_for_pending_references(model, pending_references): def _get_many_to_many_sql_for_model(model): from django.db import backend, get_creation_module from django.db.models import GenericRel - + data_types = get_creation_module().DATA_TYPES opts = model._meta @@ -817,10 +817,10 @@ def get_validation_errors(outfile, app=None): from django.db.models.fields.related import RelatedObject e = ModelErrorCollection(outfile) - + for (app_name, error) in get_app_errors().items(): e.add(app_name, error) - + for cls in models.get_models(app): opts = cls._meta @@ -885,7 +885,7 @@ def get_validation_errors(outfile, app=None): if r.get_accessor_name() == rel_query_name: e.add(opts, "Reverse query name for field '%s' clashes with related field '%s.%s'. Add a related_name argument to the definition for '%s'." % (f.name, rel_opts.object_name, r.get_accessor_name(), f.name)) - + for i, f in enumerate(opts.many_to_many): # Check to see if the related m2m field will clash with any # existing fields, m2m fields, m2m related objects or related objects