Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1677 closed defect (fixed)

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

Reported by: Antti Kaihola Owned by: Adrian Holovaty
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: no UI/UX: no

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 by Christopher Lenz <cmlenz@…>, 19 years ago

Version: 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 by Malcolm Tredinnick <malcolm@…>, 19 years ago

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

comment:3 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

(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