Posts

Showing posts from December, 2014

How to create my first Django Project

Image
Writing your first Django app Step 1 Check django is installed and which version by running the following command $ python -c "import django; print(django.get_version())"     How to install Django $ sudo apt-get install python-pip $ sudo pip install Django       Creating a project From the command line, cd into a directory where you’d like to store your code, then run the following command $ django-admin.py startproject p erfum e s       The development server Let’s verify your Django project works. Change into the outer p erfum e s directory, if you haven’t already, and run the following commands: $ python manage.py runserver         Creating models To create your app, make sure you’re in the same directory as manage.py and type this command: $ python manage.py startapp p erfum  

How to create Django project Step 2

Image
Creating a project From the command line, cd into a directory where you’d like to store your code, then run the following command $ django-admin.py startproject p erfum e s       The development server Let’s verify your Django project works. Change into the outer p erfum e s directory, if you haven’t already, and run the following commands: $ python manage.py runserver             Creating models To create your app, make sure you’re in the same directory as manage.py and type this command: $ python manage.py startapp p erfum    

How to check django is installed and which version is running and how to install django Step 1

Image
Writing your first Django app Step 1 Check django is installed and which version is running $ python -c "import django; print(django.get_version())"     How to install Django $ sudo apt-get install python-pip $ sudo pip install Django