Ticket #1471: django_1471.diff
File django_1471.diff, 1.6 KB (added by , 19 years ago) |
---|
-
django/core/management.py
427 427 except Exception, e: 428 428 # stop trying to install permissions 429 429 install_permissions = False 430 sys.stderr.write("Permissions will not be installed because it " \431 "appears that you are not using Django's auth framework. " \432 "If you want to install them in the future, re-run syncdb." \433 "\n(The full error was: %s) " % e)430 sys.stderr.write("Permissions will not be installed because it " 431 "appears that you are not using Django's auth framework. " 432 "If you want to install them in the future, re-run syncdb." 433 "\n(The full error was: %s)\n" % e) 434 434 transaction.rollback_unless_managed() 435 435 else: 436 436 transaction.commit_unless_managed() … … 563 563 from django.contrib.contenttypes.models import ContentType 564 564 from django.contrib.auth.models import Permission 565 565 from django.db.models import get_models 566 num_added = 0567 566 app_models = get_models(app) 567 if not app_models: 568 return 568 569 app_label = app_models[0]._meta.app_label 570 num_added = 0 569 571 for klass in app_models: 570 572 opts = klass._meta 571 573 ctype = ContentType.objects.get_for_model(klass)