Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#1677 closed defect (fixed)

[magic-removal] [patch] syncdb displays same '<Permission object>' for all created permissions

Reported by: akaihola Owned by: adrian
Component: Tools Version: magic-removal
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When using manage.py syncdb, created permissions are not shown properly:

$ manage.py syncdb
Creating table auth_message
Creating table auth_group
Creating table auth_user
Creating table auth_permission
Creating many-to-many tables for Group model
Creating many-to-many tables for User model
Creating table django_content_type
Creating table django_session
Creating table django_site

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): no
Adding permission '<Permission object>'
Adding permission '<Permission object>'
Adding permission '<Permission object>'
Adding permission '<Permission object>'
Adding permission '<Permission object>'
Adding permission '<Permission object>'
Creating example.com Site object
Adding permission '<Permission object>'
Adding permission '<Permission object>'
Adding permission '<Permission object>'

Change History (3)

comment:1 Changed 9 years ago by Christopher Lenz <cmlenz@…>

  • Version set to magic-removal

The fix is trivial:

===================================================================
--- django/contrib/auth/management.py (revision 209)
+++ django/contrib/auth/management.py (revision 352)
@@ -33,5 +33,5 @@
                 p = Permission(name=name, codename=codename, content_type=ctype)
                 p.save()
-                print "Adding permission '%r'" % p
+                print "Adding permission '%s'" % p
 
 def create_superuser(app, created_models):

comment:2 Changed 9 years ago by Malcolm Tredinnick <malcolm@…>

  • Summary changed from [magic-removal] syncdb displays same '<Permission object>' for all created permissions to [magic-removal] [patch] syncdb displays same '<Permission object>' for all created permissions

comment:3 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [2751]) magic-removal: Fixed #1677 -- syncdb no longer displays '<Permission object>' for all created permissions

Note: See TracTickets for help on using tickets.
Back to Top