Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information