InMotion Hosting Support Center

Django is an open-source framework written in python for quickly building web applications. Django includes user authentication, content management, sites maps, and several other features by default to make it easier and faster for developers to build their applications. In this article, we will show you how to install a Django.

Installing Django on Ubuntu

  1. First you will need to install some python packages and PIP3.

    sudo apt install python3-pip python-dev libmysqlclient-dev

    Ubuntu assumes python 2.7 currently so we should make sure the command "pip" uses python 3 by running the command below.

    ln -s /usr/bin/pip3 /usr/bin/pip

    pip install mysql-python virtualenv

  2. Next you need to create a virual enviroment for your project, The purpose of this is to isolate the packages used by this project to prevent any other packages installed for other projects from causing conflicts.

    cd ~
    virtualenv django1

  3. Now enter the virtual enviroment and install django.

    source ~/django1/bin/activate
    pip install django

  4. Now that you have Django installed you can create your project.

    django-admin startproject project1

    Now that you have created the project run the commands below and follow the prompts to create your admin user for the Django dashboard.

    python manage.py migrate
    python manage.py createsuperuser
    python manage.py runserver 0.0.0.0:8000

    You should now be able to go to http://<yourIP>:8000 and you should see a page saying "It Worked, Congratulations on your first Django-powered page". You can view your dashboard going to http://<yourIP>:8000/admin and logging in with the credentials created before.


Congratulations! You now have Django installed.

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!