Develop your first web application in Django 1.10 – Part 0
Django is a very popular and powerful web framework to make small to large scale web application in Python language. In this series I am going to make a simple issue tracking or bug tracking system in Django 1.10.
The application I am going to make is named as OhBugz. It is a simple issue tracking application for a single user which helps to track project related issues. It is not going to make JIRA guys sleepless but good enough to learn how to make a web application in Django. Some of the initial screens are:
Since Django is a Python framework so it’s quite obvious that you should have Python installed on your machine. It makes life easier if you know Python language too. I am using Python 3.5 for this tutorial.
Assuming Python and
pip is installed, run the following command in terminal:
pip install django
If all goes well, you should see something like below on your screen:
The prerequisites are fulfilled, it’s time to create new project.
Adnans-MBP:ohbugztracker AdnanAhmad$ django-admin startproject ohbugztracker
django-admin is a utility shipped with django. Here it is creating a project with name
ohbugztracker. Once created, run the following commands:
Performing system checks...
System check identified no issues (0 silenced).
You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions.
Run 'python manage.py migrate' to apply them.
March 11, 2017 - 19:57:01
Django version 1.10.5, using settings 'ohbugztracker.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
What it does that it runs Django’s application server. On running you will see the text in your console as you see above. Don’t worry about migrations as it will be covered in future posts. The message which you should focus is
Starting development server at http://127.0.0.1:8000/. Open your browser and type the localhost URL given above and it should greet you with the following screen:
Wohoo! we successfully created our first Django project. Wait, I don’t mean it’s over. When I say that the project is created it means the command ran successfully and Django Application Server is up and running. In coming post I will discuss the difference between a project and an app and what does it mean in Django world. For now, enjoy what you have achieved.
As always, the Github repo has been created for this project