-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72f2143
commit d8ba815
Showing
9 changed files
with
52 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,16 @@ You will see a login page like this: | |
|
||
![Login page](images/login_page2.png) | ||
|
||
You should use the username and password you chose when you were creating a database (in the __Starting Django project__ chapter). After logging in, you should see the Django admin dashboard. | ||
In order to log in you need to create a *superuser* - a user which has control over everything on the site. Go back to you command-line and type `python manage.py createsuperuser`, press enter and type your username (lowercase, no spaces), email address and password when you're asked for them. The output should look like this (where username and email should be your own ones): | ||
|
||
(myvenv) ~/djangogirls$ python manage.py createsuperuser | ||
Username: admin | ||
Email address: [email protected] | ||
Password: | ||
Password (again): | ||
Superuser created successfully. | ||
|
||
Return to your browser and log in with the superuser's credentials you chose, you should see the Django admin dashboard. | ||
|
||
![Django admin](images/django_admin3.png) | ||
|
||
|
@@ -29,7 +38,7 @@ Make sure that at least two or three posts (but not all) have the publish date s | |
|
||
![Django admin](images/edit_post3.png) | ||
|
||
If you want to know more about Django admin, you should check Django's documentation: https://docs.djangoproject.com/en/1.6/ref/contrib/admin/ | ||
If you want to know more about Django admin, you should check Django's documentation: https://docs.djangoproject.com/en/1.7/ref/contrib/admin/ | ||
|
||
It is probably a good moment to grab a coffee (or tea) and eat something sweet. You created your first Django model - you deserve a little treat! | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,32 +68,16 @@ This is already set up in this part of your `mysite/settings.py` file: | |
} | ||
} | ||
|
||
To create a database for our blog, let's run the following in the console: `python manage.py syncdb` (we need to be the `djangogirls` directory that contains the `manage.py` file). If that goes well, you should see something like this: | ||
|
||
(myvenv) ~/djangogirls$ python manage.py syncdb | ||
Creating tables ... | ||
Creating table django_admin_log | ||
Creating table auth_permission | ||
Creating table auth_group_permissions | ||
Creating table auth_group | ||
Creating table auth_user_groups | ||
Creating table auth_user_user_permissions | ||
Creating table auth_user | ||
Creating table django_content_type | ||
Creating table django_session | ||
|
||
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): yes | ||
Username (leave blank to use 'Name'): | ||
Email address: [email protected] | ||
Password: | ||
Password (again): | ||
Superuser created successfully. | ||
Installing custom SQL ... | ||
Installing indexes ... | ||
Installed 0 object(s) from 0 fixture(s) | ||
|
||
It will ask you if you want to create a *superuser* - a user which has control over everything on the site. Type `yes`, press enter and type your username (lowercase, no spaces), email address and password when you're asked for them. Remember this username and password! We'll use it later. | ||
To create a database for our blog, let's run the following in the console: `python manage.py migrate` (we need to be in the `djangogirls` directory that contains the `manage.py` file). If that goes well, you should see something like this: | ||
|
||
(myvenv) ~/djangogirls$ python manage.py migrate | ||
Operations to perform: | ||
Apply all migrations: admin, contenttypes, auth, sessions | ||
Running migrations: | ||
Applying contenttypes.0001_initial... OK | ||
Applying auth.0001_initial... OK | ||
Applying admin.0001_initial... OK | ||
Applying sessions.0001_initial... OK | ||
|
||
And we're done! Time to start the web server and see if our website is working! | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters