Django

Code

Changeset 7604

Show
Ignore:
Timestamp:
06/09/08 23:03:09 (6 months ago)
Author:
brosner
Message:

newforms-admin: Merged from trunk up to [7602].

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/newforms-admin

    • Property svnmerge-integrated changed from /django/trunk:1-4345,4350-4357,4359-4365,4371-4372,4374-4377,4380-4386,4388,4390-4391,4400-4402,4404-4408,4410,4412-4419,4426-4427,4430-4432,4434,4441,4443-4444,4446-4447,4450,4452-4453,4455-4458,4476,4503,4546,4564-4569,4580-4586,4617,4630,4641-6390,6392-7583 to /django/trunk:1-4345,4350-4357,4359-4365,4371-4372,4374-4377,4380-4386,4388,4390-4391,4400-4402,4404-4408,4410,4412-4419,4426-4427,4430-4432,4434,4441,4443-4444,4446-4447,4450,4452-4453,4455-4458,4476,4503,4546,4564-4569,4580-4586,4617,4630,4641-6390,6392-7603
  • django/branches/newforms-admin/AUTHORS

    r7584 r7604  
    5858    Jökull Sólberg Auðunsson <jokullsolberg@gmail.com> 
    5959    Arthur <avandorp@gmail.com> 
     60    av0000@mail.ru 
    6061    David Avsajanishvili <avsd05@gmail.com> 
    6162    axiak@mit.edu 
     
    8081    btoll@bestweb.net 
    8182    Jonathan Buchanan <jonathan.buchanan@gmail.com> 
     83    Keith Bussell <kbussell@gmail.com> 
    8284    Juan Manuel Caicedo <juan.manuel.caicedo@gmail.com> 
    8385    Trevor Caira <trevor@caira.com> 
     
    369371    tt@gurgle.no 
    370372    David Tulig <david.tulig@gmail.com> 
    371     Amit Upadhyay 
     373    Amit Upadhyay <http://www.amitu.com/blog/> 
    372374    Geert Vanderkelen 
    373375    I.S. van Oostveen <v.oostveen@idca.nl> 
  • django/branches/newforms-admin/django/conf/global_settings.py

    r7544 r7604  
    290290SESSION_COOKIE_PATH = '/'                               # The path of the session cookie. 
    291291SESSION_SAVE_EVERY_REQUEST = False                      # Whether to save the session data on every request. 
    292 SESSION_EXPIRE_AT_BROWSER_CLOSE = False                 # Whether sessions expire when a user closes his browser. 
     292SESSION_EXPIRE_AT_BROWSER_CLOSE = False                 # Whether a user's session cookie expires when they close their browser. 
    293293SESSION_ENGINE = 'django.contrib.sessions.backends.db'  # The module to store session data 
    294294SESSION_FILE_PATH = None                                # Directory to store session files if using the file session module. If None, the backend will use a sensible default. 
  • django/branches/newforms-admin/django/contrib/auth/create_superuser.py

    r7022 r7604  
    11""" 
    2 Helper function for creating superusers in the authentication system. 
    3  
    4 If run from the command line, this module lets you create a superuser 
    5 interactively. 
     2Create a superuser from the command line. Deprecated; use manage.py 
     3createsuperuser instead. 
    64""" 
    75 
    8 from django.core import validators 
    9 from django.contrib.auth.models import User 
    10 import getpass 
    11 import os 
    12 import sys 
    13 import re 
    14  
    15 RE_VALID_USERNAME = re.compile('\w+$') 
    16  
    17 def createsuperuser(username=None, email=None, password=None): 
    18     """ 
    19     Helper function for creating a superuser from the command line. All 
    20     arguments are optional and will be prompted-for if invalid or not given. 
    21     """ 
    22     try: 
    23         import pwd 
    24     except ImportError: 
    25         default_username = '' 
    26     else: 
    27         # Determine the current system user's username, to use as a default. 
    28         default_username = pwd.getpwuid(os.getuid())[0].replace(' ', '').lower() 
    29  
    30     # Determine whether the default username is taken, so we don't display 
    31     # it as an option. 
    32     if default_username: 
    33         try: 
    34             User.objects.get(username=default_username) 
    35         except User.DoesNotExist: 
    36             pass 
    37         else: 
    38             default_username = '' 
    39  
    40     try: 
    41         while 1: 
    42             if not username: 
    43                 input_msg = 'Username' 
    44                 if default_username: 
    45                     input_msg += ' (Leave blank to use %r)' % default_username 
    46                 username = raw_input(input_msg + ': ') 
    47             if default_username and username == '': 
    48                 username = default_username 
    49             if not RE_VALID_USERNAME.match(username): 
    50                 sys.stderr.write("Error: That username is invalid. Use only letters, digits and underscores.\n") 
    51                 username = None 
    52                 continue 
    53             try: 
    54                 User.objects.get(username=username) 
    55             except User.DoesNotExist: 
    56                 break 
    57             else: 
    58                 sys.stderr.write("Error: That username is already taken.\n") 
    59                 username = None 
    60         while 1: 
    61             if not email: 
    62                 email = raw_input('E-mail address: ') 
    63             try: 
    64                 validators.isValidEmail(email, None) 
    65             except validators.ValidationError: 
    66                 sys.stderr.write("Error: That e-mail address is invalid.\n") 
    67                 email = None 
    68             else: 
    69                 break 
    70         while 1: 
    71             if not password: 
    72                 password = getpass.getpass() 
    73                 password2 = getpass.getpass('Password (again): ') 
    74                 if password != password2: 
    75                     sys.stderr.write("Error: Your passwords didn't match.\n") 
    76                     password = None 
    77                     continue 
    78             if password.strip() == '': 
    79                 sys.stderr.write("Error: Blank passwords aren't allowed.\n") 
    80                 password = None 
    81                 continue 
    82             break 
    83     except KeyboardInterrupt: 
    84         sys.stderr.write("\nOperation cancelled.\n") 
    85         sys.exit(1) 
    86     u = User.objects.create_user(username, email, password) 
    87     u.is_staff = True 
    88     u.is_active = True 
    89     u.is_superuser = True 
    90     u.save() 
    91     print "Superuser created successfully." 
    92  
    936if __name__ == "__main__": 
    94     createsuperuser() 
     7    from django.core.management import call_command 
     8    call_command("createsuperuser") 
  • django/branches/newforms-admin/django/contrib/auth/models.py

    r7436 r7604  
    114114        return user 
    115115 
     116    def create_superuser(self, username, email, password): 
     117        u = self.create_user(username, email, password) 
     118        u.is_staff = True 
     119        u.is_active = True 
     120        u.is_superuser = True 
     121        u.save() 
     122 
    116123    def make_random_password(self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789'): 
    117124        "Generates a random password with the given length and given allowed_chars" 
  • django/branches/newforms-admin/django/contrib/auth/tests/basic.py

    r7191 r7604  
    3737>>> a.user_permissions.all() 
    3838[] 
     39 
     40# 
     41# Tests for createsuperuser management command. 
     42# It's nearly impossible to test the interactive mode -- a command test helper 
     43# would be needed (and *awesome*) -- so just test the non-interactive mode. 
     44# This covers most of the important validation, but not all. 
     45# 
     46>>> from django.core.management import call_command 
     47 
     48>>> call_command("createsuperuser", noinput=True, username="joe", email="joe@somewhere.org") 
     49Superuser created successfully. 
     50 
     51>>> u = User.objects.get(username="joe") 
     52>>> u.email 
     53u'joe@somewhere.org' 
     54>>> u.password 
     55u'!' 
    3956""" 
  • django/branches/newforms-admin/django/contrib/sessions/backends/base.py

    r7351 r7604  
    55import sys 
    66import time 
     7from datetime import datetime, timedelta 
    78from django.conf import settings 
    89from django.core.exceptions import SuspiciousOperation 
     
    129130    _session = property(_get_session) 
    130131 
     132    def get_expiry_age(self): 
     133        """Get the number of seconds until the session expires.""" 
     134        expiry = self.get('_session_expiry') 
     135        if not expiry:   # Checks both None and 0 cases 
     136            return settings.SESSION_COOKIE_AGE 
     137        if not isinstance(expiry, datetime): 
     138            return expiry 
     139        delta = expiry - datetime.now() 
     140        return delta.days * 86400 + delta.seconds 
     141 
     142    def get_expiry_date(self): 
     143        """Get session the expiry date (as a datetime object).""" 
     144        expiry = self.get('_session_expiry') 
     145        if isinstance(expiry, datetime): 
     146            return expiry 
     147        if not expiry:   # Checks both None and 0 cases 
     148            expiry = settings.SESSION_COOKIE_AGE 
     149        return datetime.now() + timedelta(seconds=expiry) 
     150 
     151    def set_expiry(self, value): 
     152        """ 
     153        Sets a custom expiration for the session. ``value`` can be an integer, a 
     154        Python ``datetime`` or ``timedelta`` object or ``None``. 
     155 
     156        If ``value`` is an integer, the session will expire after that many 
     157        seconds of inactivity. If set to ``0`` then the session will expire on 
     158        browser close. 
     159 
     160        If ``value`` is a ``datetime`` or ``timedelta`` object, the session 
     161        will expire at that specific future time. 
     162 
     163        If ``value`` is ``None``, the session uses the global session expiry 
     164        policy. 
     165        """ 
     166        if value is None: 
     167            # Remove any custom expiration for this session. 
     168            try: 
     169                del self['_session_expiry'] 
     170            except KeyError: 
     171                pass 
     172            return 
     173        if isinstance(value, timedelta): 
     174            value = datetime.now() + value 
     175        self['_session_expiry'] = value 
     176 
     177    def get_expire_at_browser_close(self): 
     178        """ 
     179        Returns ``True`` if the session is set to expire when the browser 
     180        closes, and ``False`` if there's an expiry date. Use 
     181        ``get_expiry_date()`` or ``get_expiry_age()`` to find the actual expiry 
     182        date/age, if there is one. 
     183        """ 
     184        if self.get('_session_expiry') is None: 
     185            return settings.SESSION_EXPIRE_AT_BROWSER_CLOSE 
     186        return self.get('_session_expiry') == 0 
     187 
    131188    # Methods that child classes must implement. 
    132189 
  • django/branches/newforms-admin/django/contrib/sessions/backends/cache.py

    r7351 r7604  
    55class SessionStore(SessionBase): 
    66    """ 
    7     A cache-based session store.  
     7    A cache-based session store. 
    88    """ 
    99    def __init__(self, session_key=None): 
    1010        self._cache = cache 
    1111        super(SessionStore, self).__init__(session_key) 
    12          
     12 
    1313    def load(self): 
    1414        session_data = self._cache.get(self.session_key) 
     
    1616 
    1717    def save(self): 
    18         self._cache.set(self.session_key, self._session, settings.SESSION_COOKIE_AGE
     18        self._cache.set(self.session_key, self._session, self.get_expiry_age()
    1919 
    2020    def exists(self, session_key): 
     
    2222            return True 
    2323        return False 
    24          
     24 
    2525    def delete(self, session_key): 
    2626        self._cache.delete(session_key) 
  • django/branches/newforms-admin/django/contrib/sessions/backends/db.py

    r7351 r7604  
    4242            session_key = self.session_key, 
    4343            session_data = self.encode(self._session), 
    44             expire_date = datetime.datetime.now() + datetime.timedelta(seconds=settings.SESSION_COOKIE_AGE
     44            expire_date = self.get_expiry_date(
    4545        ) 
    4646 
  • django/branches/newforms-admin/django/contrib/sessions/middleware.py

    r6656 r7604  
    2727                patch_vary_headers(response, ('Cookie',)) 
    2828            if modified or settings.SESSION_SAVE_EVERY_REQUEST: 
    29                 if settings.SESSION_EXPIRE_AT_BROWSER_CLOSE
     29                if request.session.get_expire_at_browser_close()
    3030                    max_age = None 
    3131                    expires = None 
    3232                else: 
    33                     max_age = settings.SESSION_COOKIE_AGE 
    34                     expires_time = time.time() + settings.SESSION_COOKIE_AGE 
     33                    max_age = request.session.get_expiry_age() 
     34                    expires_time = time.time() + max_age 
    3535                    expires = cookie_date(expires_time) 
    36                 # Save the seesion data and refresh the client cookie. 
     36                # Save the session data and refresh the client cookie. 
    3737                request.session.save() 
    3838                response.set_cookie(settings.SESSION_COOKIE_NAME, 
  • django/branches/newforms-admin/django/contrib/sessions/tests.py

    r6955 r7604  
    8989>>> s.pop('some key', 'does not exist') 
    9090'does not exist' 
     91 
     92######################### 
     93# Custom session expiry # 
     94######################### 
     95 
     96>>> from django.conf import settings 
     97>>> from datetime import datetime, timedelta 
     98 
     99>>> td10 = timedelta(seconds=10) 
     100 
     101# A normal session has a max age equal to settings 
     102>>> s.get_expiry_age() == settings.SESSION_COOKIE_AGE 
     103True 
     104 
     105# So does a custom session with an idle expiration time of 0 (but it'll expire 
     106# at browser close) 
     107>>> s.set_expiry(0) 
     108>>> s.get_expiry_age() == settings.SESSION_COOKIE_AGE 
     109True 
     110 
     111# Custom session idle expiration time 
     112>>> s.set_expiry(10) 
     113>>> delta = s.get_expiry_date() - datetime.now() 
     114>>> delta.seconds in (9, 10) 
     115True 
     116>>> age = s.get_expiry_age() 
     117>>> age in (9, 10) 
     118True 
     119 
     120# Custom session fixed expiry date (timedelta) 
     121>>> s.set_expiry(td10) 
     122>>> delta = s.get_expiry_date() - datetime.now() 
     123>>> delta.seconds in (9, 10) 
     124True 
     125>>> age = s.get_expiry_age() 
     126>>> age in (9, 10) 
     127True 
     128 
     129# Custom session fixed expiry date (fixed datetime) 
     130>>> s.set_expiry(datetime.now() + td10) 
     131>>> delta = s.get_expiry_date() - datetime.now() 
     132>>> delta.seconds in (9, 10) 
     133True 
     134>>> age = s.get_expiry_age() 
     135>>> age in (9, 10) 
     136True 
     137 
     138# Set back to default session age 
     139>>> s.set_expiry(None) 
     140>>> s.get_expiry_age() == settings.SESSION_COOKIE_AGE 
     141True 
     142 
     143# Allow to set back to default session age even if no alternate has been set 
     144>>> s.set_expiry(None) 
     145 
     146 
     147# We're changing the setting then reverting back to the original setting at the 
     148# end of these tests. 
     149>>> original_expire_at_browser_close = settings.SESSION_EXPIRE_AT_BROWSER_CLOSE 
     150>>> settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = False 
     151 
     152# Custom session age 
     153>>> s.set_expiry(10) 
     154>>> s.get_expire_at_browser_close() 
     155False 
     156 
     157# Custom expire-at-browser-close 
     158>>> s.set_expiry(0) 
     159>>> s.get_expire_at_browser_close() 
     160True 
     161 
     162# Default session age 
     163>>> s.set_expiry(None) 
     164>>> s.get_expire_at_browser_close() 
     165False 
     166 
     167>>> settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = True 
     168 
     169# Custom session age 
     170>>> s.set_expiry(10) 
     171>>> s.get_expire_at_browser_close() 
     172False 
     173 
     174# Custom expire-at-browser-close 
     175>>> s.set_expiry(0) 
     176>>> s.get_expire_at_browser_close() 
     177True 
     178 
     179# Default session age 
     180>>> s.set_expiry(None) 
     181>>> s.get_expire_at_browser_close() 
     182True 
     183 
     184>>> settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = original_expire_at_browser_close 
    91185""" 
    92186 
  • django/branches/newforms-admin/django/core/management/commands/loaddata.py

    r7351 r7604  
    3333        fixture_count = 0 
    3434        object_count = 0 
     35        objects_per_fixture = [] 
    3536        models = set() 
    3637 
     
    6162                    formats = [] 
    6263 
    63             if verbosity >= 2
    64                 if formats
     64            if formats
     65                if verbosity > 1
    6566                    print "Loading '%s' fixtures..." % fixture_name 
    66                 else: 
    67                     print "Skipping fixture '%s': %s is not a known serialization format" % (fixture_name, format) 
     67            else: 
     68                sys.stderr.write( 
     69                    self.style.ERROR("Problem installing fixture '%s': %s is not a known serialization format." % 
     70                        (fixture_name, format))) 
     71                transaction.rollback() 
     72                transaction.leave_transaction_management() 
     73                return 
    6874 
    6975            if os.path.isabs(fixture_name): 
     
    94100                        else: 
    95101                            fixture_count += 1 
     102                            objects_per_fixture.append(0) 
    96103                            if verbosity > 0: 
    97104                                print "Installing %s fixture '%s' from %s." % \ 
     
    101108                                for obj in objects: 
    102109                                    object_count += 1 
     110                                    objects_per_fixture[-1] += 1 
    103111                                    models.add(obj.object.__class__) 
    104112                                    obj.save() 
     
    118126                            fixture.close() 
    119127                    except: 
    120                         if verbosity >= 2
     128                        if verbosity > 1
    121129                            print "No %s fixture '%s' in %s." % \ 
    122130                                (format, fixture_name, humanize(fixture_dir)) 
    123131 
     132 
     133        # If any of the fixtures we loaded contain 0 objects, assume that an  
     134        # error was encountered during fixture loading. 
     135        if 0 in objects_per_fixture: 
     136            sys.stderr.write( 
     137                self.style.ERROR("No fixture data found for '%s'. (File format may be invalid.)" % 
     138                    (fixture_name))) 
     139            transaction.rollback() 
     140            transaction.leave_transaction_management() 
     141            return 
     142             
     143        # If we found even one object in a fixture, we need to reset the  
     144        # database sequences. 
    124145        if object_count > 0: 
    125146            sequence_sql = connection.ops.sequence_reset_sql(self.style, models) 
     
    129150                for line in sequence_sql: 
    130151                    cursor.execute(line) 
    131  
     152             
    132153        transaction.commit() 
    133154        transaction.leave_transaction_management() 
    134155 
    135156        if object_count == 0: 
    136             if verbosity >= 2
     157            if verbosity > 1
    137158                print "No fixtures found." 
    138159        else: 
  • django/branches/newforms-admin/django/core/management/sql.py

    r7584 r7604  
    447447            for statement in statements.split(fp.read().decode(settings.FILE_CHARSET)): 
    448448                # Remove any comments from the file 
    449                 statement = re.sub(ur"--.*[\n\Z]", "", statement) 
     449                statement = re.sub(ur"--.*([\n\Z]|$)", "", statement) 
    450450                if statement.strip(): 
    451451                    output.append(statement + u";") 
  • django/branches/newforms-admin/django/core/serializers/base.py

    r7479 r7604  
    3939        for obj in queryset: 
    4040            self.start_object(obj) 
    41             for field in obj._meta.fields: 
     41            for field in obj._meta.local_fields: 
    4242                if field.serialize: 
    4343                    if field.rel is None: 
  • django/branches/newforms-admin/django/db/models/base.py

    r7533 r7604  
    288288            signal = False 
    289289 
    290         for parent, field in meta.parents.items(): 
    291             self.save_base(raw, parent) 
    292             setattr(self, field.attname, self._get_pk_val(parent._meta)) 
     290        # If we are in a raw save, save the object exactly as presented. 
     291        # That means that we don't try to be smart about saving attributes 
     292        # that might have come from the parent class - we just save the  
     293        # attributes we have been given to the class we have been given. 
     294        if not raw: 
     295            for parent, field in meta.parents.items(): 
     296                self.save_base(raw, parent) 
     297                setattr(self, field.attname, self._get_pk_val(parent._meta)) 
    293298 
    294299        non_pks = [f for f in meta.local_fields if not f.primary_key] 
    295  
     300             
    296301        # First, try an UPDATE. If that doesn't update anything, do an INSERT. 
    297302        pk_val = self._get_pk_val(meta) 
  • django/branches/newforms-admin/django/db/models/options.py

    r7479 r7604  
    5656        if self.meta: 
    5757            meta_attrs = self.meta.__dict__.copy() 
    58             del meta_attrs['__module__'] 
    59             del meta_attrs['__doc__'] 
     58            for name in self.meta.__dict__: 
     59                # Ignore any private attributes that Django doesn't care about. 
     60                # NOTE: We can't modify a dictionary's contents while looping 
     61                # over it, so we loop over the *original* dictionary instead. 
     62                if name.startswith('_'): 
     63                    del meta_attrs[name] 
    6064            for attr_name in DEFAULT_NAMES: 
    6165                if attr_name in meta_attrs: 
     
    98102                field = self.parents.value_for_index(0) 
    99103                field.primary_key = True 
    100                 self.pk = field 
     104                self.setup_pk(field) 
    101105            else: 
    102106                auto = AutoField(verbose_name='ID', primary_key=True, 
  • django/branches/newforms-admin/django/db/models/query.py

    r7533 r7604  
    293293        fields to the appropriate values. 
    294294        """ 
     295        assert self.query.can_filter(), \ 
     296                "Cannot update a query once a slice has been taken." 
    295297        query = self.query.clone(sql.UpdateQuery) 
    296298        query.add_update_values(kwargs) 
     
    307309        useful at that level). 
    308310        """ 
     311        assert self.query.can_filter(), \ 
     312                "Cannot update a query once a slice has been taken." 
    309313        query = self.query.clone(sql.UpdateQuery) 
    310314        query.add_update_fields(values) 
  • django/branches/newforms-admin/django/db/models/sql/query.py

    r7533 r7604  
    852852 
    853853    def fill_related_selections(self, opts=None, root_alias=None, cur_depth=1, 
    854             used=None, requested=None, restricted=None): 
     854            used=None, requested=None, restricted=None, nullable=None): 
    855855        """ 
    856856        Fill in the information needed for a select_related query. The current 
     
    884884                continue 
    885885            table = f.rel.to._meta.db_table 
     886            if nullable or f.null: 
     887                promote = True 
     888            else: 
     889                promote = False 
    886890            if model: 
    887891                int_opts = opts 
     
    892896                    alias = self.join((alias, int_opts.db_table, lhs_col, 
    893897                            int_opts.pk.column), exclusions=used, 
    894                             promote=f.null
     898                            promote=promote
    895899            else: 
    896900                alias = root_alias 
    897901            alias = self.join((alias, table, f.column, 
    898902                    f.rel.get_related_field().column), exclusions=used, 
    899                     promote=f.null
     903                    promote=promote
    900904            used.add(alias) 
    901905            self.related_select_cols.extend([(alias, f2.column) 
     
    906910            else: 
    907911                next = False 
     912            if f.null is not None: 
     913                new_nullable = f.null 
     914            else: 
     915                new_nullable = None 
    908916            self.fill_related_selections(f.rel.to._meta, alias, cur_depth + 1, 
    909                     used, next, restricted
     917                    used, next, restricted, new_nullable
    910918 
    911919    def add_filter(self, filter_expr, connector=AND, negate=False, trim=False, 
  • django/branches/newforms-admin/docs/authentication.txt

    r7436 r7604  
    264264 
    265265``manage.py syncdb`` prompts you to create a superuser the first time you run 
    266 it after adding ``'django.contrib.auth'`` to your ``INSTALLED_APPS``. But if 
    267 you need to create a superuser after that via the command line, you can use the 
    268 ``create_superuser.py`` utility. Just run this command:: 
     266it after adding ``'django.contrib.auth'`` to your ``INSTALLED_APPS``. If you need 
     267to create a superuser at a later date, you can use a command line utility. 
     268 
     269**New in Django development version.**:: 
     270 
     271    manage.py createsuperuser --username=joe --email=joe@example.com 
     272 
     273You will be prompted for a password. Once entered, the user is created. If you 
     274leave off the ``--username`` or the ``--email`` option, It will prompt you for 
     275those values as well. 
     276 
     277If you're using an older release of Django, the old way of creating a superuser 
     278on the command line still works:: 
    269279 
    270280    python /path/to/django/contrib/auth/create_superuser.py 
    271281 
    272 Make sure to substitute ``/path/to/`` with the path to the Django codebase on 
    273 your filesystem. 
     282Where ``/path/to`` is the path to the Django codebase on your filesystem. The 
     283``manage.py`` command is prefered since it'll figure out the correct path and 
     284environment for you. 
    274285 
    275286Storing additional information about users 
  • django/branches/newforms-admin/docs/django-admin.txt

    r7351 r7604  
    109109the right place. There's no way to specify the location of the program 
    110110manually. 
     111 
     112createsuperuser 
     113--------------- 
     114 
     115**New in Django development version** 
     116 
     117Creates a superuser account (a user who has all permissions). This is 
     118useful if you need to create an initial superuser account but did not 
     119do so during ``syncdb``, or if you need to programmatically generate 
     120superuser accounts for your site(s). 
     121 
     122When run interactively, this command will prompt for a password for 
     123the new superuser account; when run non-interactively, no password 
     124will be set and the superuser account will not be able to log in until 
     125a password has been manually set for it. 
     126 
     127The username and e-mail address for the new account can be supplied by 
     128using the ``--username`` and ``--email`` arguments on the command 
     129line; if not supplied, ``createsuperuser`` will prompt for them when 
     130running interactively. 
     131 
     132This command is only available if Django's `authentication system`_ 
     133(``django.contrib.auth``) is installed. 
     134 
     135.. _authentication system: ../authentication/ 
    111136 
    112137diffsettings 
  • django/branches/newforms-admin/docs/faq.txt

    r7351 r7604  
    229229begin maintaining backwards compatibility.  
    230230 
    231 The merging of Django's `magic-removal branch`_ went a long way toward Django 
    232 1.0. 
     231The merging of Django's `Queryset Refactor branch`_ went a long way toward Django 
     2321.0. Merging the `Newforms Admin branch` will be another important step. 
    233233 
    234234Of course, you should note that `quite a few production sites`_ use Django in 
    235235its current status. Don't let the lack of a 1.0 turn you off. 
    236236 
    237 .. _magic-removal branch: http://code.djangoproject.com/wiki/RemovingTheMagic 
     237.. _Queryset Refactor branch: http://code.djangoproject.com/wiki/QuerysetRefactorBranch 
     238.. _Newforms Admin branch: http://code.djangoproject.com/wiki/NewformsAdminBranch 
    238239.. _quite a few production sites: http://code.djangoproject.com/wiki/DjangoPoweredSites 
    239240 
     
    260261would be happy to help you. 
    261262 
    262 You might also be interested in posting a job to http://www.gypsyjobs.com/ . 
     263You might also be interested in posting a job to http://djangogigs.com/ .  
     264If you want to find Django-capable people in your local area, try  
     265http://djangopeople.net/ . 
    263266 
    264267.. _developers for hire page: http://code.djangoproject.com/wiki/DevelopersForHire 
     
    644647.. _creating users: ../authentication/#creating-users 
    645648 
     649Getting Help 
     650============ 
     651 
     652How do I do X? Why doesn't Y work? Where can I go to get help? 
     653-------------------------------------------------------------- 
     654 
     655If this FAQ doesn't contain an answer to your question, you might want to 
     656try the `django-users mailing list`_. Feel free to ask any question related  
     657to installing, using, or debugging Django.  
     658 
     659If you prefer IRC, the `#django IRC channel`_ on freenode is an active 
     660community of helpful individuals who may be able to solve your problem.  
     661 
     662.. _`django-users mailing list`: http://groups.google.com/group/django-users 
     663.. _`#django IRC channel`: irc://irc.freenode.net/django 
     664 
     665Why hasn't my message appeared on django-users? 
     666----------------------------------------------- 
     667 
     668django-users_ has a lot of subscribers. This is good for the community, as 
     669there are lot of people that