Installing Django and Django-REST Framework on ubuntu

Django REST framework is a powerful and flexible toolkit for building Web APIs. Some reasons you might want to use REST framework:

Install required packages

sudo apt-get install python-pip python-dev build-essential
sudo pip install djangorestframework
sudo apt-get install python-virtualenv
$ mkdir tutorial
$ cd tutorial/
$ virtualenv env
$ source env/bin/activate
(env)tutorial$ pip install django
(env)tutorial$ pip install djangorestframework
(env)tutorial$ startproject tutorial . 

Notice: the dot ( . ) at the end of command.

(env)tutorial$ cd tutorial/ 
(env)tutorial/tutorial$ startapp quickstart
(env)tutorial/tutorial$ cd .. 
(env)tutorial$ python migrate 
(env)tutorial$ python createsuperuser 

Username (leave blank to use ‘myuser’): admin
Email address:
Password (again):
Superuser created successfully.
[note] we set password as, password123

(env)tutorial$ cd tutorial/quickstart/ 
(env)tutorial/tutorial/quickstart$ vim 
(env)tutorial/tutorial/quickstart$ vim 
(env)tutorial/tutorial/quickstart$ cd .. 
(env)tutorial/tutorial$ vim 
(env)tutorial/tutorial$ vim 
(env)tutorial/tutorial$ cd .. 
(env)tutorial$ python runserver

Performing system checks…

System check identified no issues (0 silenced).
December 21, 2016 – 12:17:58
Django version 1.10.4, using settings ‘tutorial.settings’
Starting development server at
Quit the server with CONTROL-C.

Reference :

Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense Multimedia - Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags: ,

Leave a Reply / Ask Question