Introductory tutorial to write your first Django app.
-
Fork the
django-tutorial
repository on GitHub. -
Copy your fork locally:
$ git clone git@github.com:<your_name_here>/django-tutorial.git
-
Make sure your system is up to date:
$ apt-get update $ apt-get upgrade $ apt-get install -y build-essential $ apt-get install -y python3-dev python3-software-properties # or $ apt-get install -y python2-dev python2-software-properties
-
Configure your local copy to work with virtualenv and pip. Assuming you have virtualenv installed, this is how you set up your copy for local development:
$ cd django-tutorial/ $ virtualenv env $ source env/bin/activate $ pip install -r requirements.txt
-
Switch to
overview
branch to start the tutorial from the first item of the tutorial checklist:$ git checkout overview
Now you can make your changes locally to develop the overview item of checklist.
-
When you're done making changes for the item, commit your changes and push the branch of the item to GitHub:
$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin <branch-name>
-
Now, create a new branch to develop the next item checklist of the tutorial:
$ git checkout -b <branch-name>
-
Back to step 6 until the tutorial checklist is fully completed.
-
Switch to master branch and merge it with the last created branch:
$ git checkout master $ git merge reusable-apps $ git push origin master
-
Run the development server:
$ python manage.py runserver
-
Django at a glance [overview]
-
Quick install guide [install]
Observation: Django has been installed using
pip install -r requirements.txt
. -
Writing your first Django app, part 1 [tutorial01]
-
Writing your first Django app, part 2 [tutorial02]
-
Writing your first Django app, part 3 [tutorial03]
-
Writing your first Django app, part 4 [tutorial04]
-
Writing your first Django app, part 5 [tutorial05]
-
Writing your first Django app, part 6 [tutorial06]
-
Writing your first Django app, part 7 [tutorial07]
-
Advanced tutorial: How to write reusable apps [reusable-apps]
- Author: Fernando Felix do Nascimento Junior
- GitHub repository: https://github.com/fernandojunior/django-tutorial
- Reference: https://docs.djangoproject.com/en/1.9/intro/
- Free software: The MIT License