Over a million developers have joined DZone.

Tutorial for a First Project Using Django

Amjad Hossain takes us through creating his first project using Django. Let's see what happened!

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

Install Python

Pip is python installation and dependency packages management tool.

Before installation anything, the best practice is for all time to keep updated ubuntu packages.

coder@rock:~/PycharmProjects$ sudo apt-get update

Now Install pip using the following command:

I got the message that pip is already installed on my machine but which is a lower version that I don’t want to use but the OS itself depends on it.

To install the latest version of pip we define the Python version with installation command.

Pip upgrade problem, cause OS is dependent on Python version 2.7.

Virtualenv is a tool for creating isolated Python environment.

Virtualenvwrapper is an extension of virtualenv tool for creating and deleting virtual environments and making it easier to work on more than one project at the same time without getting any conflicts in their dependencies.

Create a new directory to place virtual environment, the Python in new virtual environment is effectively isolated from the python that was used to create it.

The newly created virtual environment has activation script. To activate use the following command.

To deactivate the virtual environment use the deactivate command.

Install django in our virtual environment, this installation command is suggested from Django, if you are getting the following error, please remove -e option.

Please use the following command to install successfully.

We have to find manage.py to create new project. Please use the following command to find manage.py and create new project.

Create a superuser of your website.

Finally, run the following command to run the lightweight server.

Do copy the server started URL “” and see congratulations.

You can also log in as admin by adding /admin into URL.

Now login using super admin user credentials then you will be able to see the admin dashboard.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.

python,django web development,pip,virtualenv

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}