Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Sep 1, 2011
  1. Create Django Superuser

    Since the ``syncdb`` command was run non-interactively, it did not
    prompt us to create a superuser, and therefore, we don't have a
    user to login.
    To create an admin user automatically, we will write a simple Python
    script that will use Django's environment, load the authentication
    models, create a ``User`` object, set a password, and give him
    superuser privileges.
    The user login will be ``admin``, and its password will be ``password``.
    Note that if the user already exists, it won't be touched. However,
    if it does not exist, it will be re-created. If you don't like this
    ``admin`` user, you should not delete it (it would be re-added each
    time you push your code) but just remove its privileges and reset its
    password, for instance.
    At this point, if we push the code, we will be able to login, but
    we still lack the CSS that will make the admin site look nicer.
Something went wrong with that request. Please try again.