#5753: manage syncdb (first time) in a small chrooted environment for example
don't give defaultuser...
-----------------------+----------------------------------------------------
Reporter:  ClaesBas    |       Owner:  nobody          
  Status:  new         |   Component:  Uncategorized   
 Version:  SVN         |    Keywords:  syncdb superuser
   Stage:  Unreviewed  |   Has_patch:  1               
-----------------------+----------------------------------------------------
 What a about this patch?

 {{{
 Index: django/contrib/auth/create_superuser.py
 ===================================================================
 --- django/contrib/auth/create_superuser.py     (revision 6507)
 +++ django/contrib/auth/create_superuser.py     (working copy)
 @@ -22,7 +22,10 @@
          default_username = ''
      else:
          # Determine the current system user's username, to use as a
 default.
 -        default_username = pwd.getpwuid(os.getuid())[0].replace(' ',
 '').lower()
 +        try:
 +            default_username = pwd.getpwuid(os.getuid())[0].replace(' ',
 '').lower()
 +        except KeyError:
 +            default_username = 'admin'

      # Determine whether the default username is taken, so we don't
 display
      # it as an option.
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5753>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to