Web Frameworks like Django are becoming a necessity for any web development guys out there, some try before the shoot, some try it for fun.Instead of reading the documentation read this short 5step article.
Step #1 Install Python before Django
if you have not already because Django – The Web Framework for perfectionists is a python baby 😉
To install Python go to Python Download Site and choose the flavor of your choice.
Insure that the executable in bin folder are added to the System Path
- Right-click My Computer select Properties.
- Select Advanced tab.
- Click Environment variables.
- Select Path in System Variables add a semicolon(;) at the end and paste the path to the executable i.e c:Python33bin
To test if python is properly installed run this command from command line
Step #2 Download Django
This is the most easy step just download Django from official site and extract it to any folder.
Step #3 Adding Django to pythonpath
Adding django to pythonpath provides a reusable Django framework for all your projects followed from this django tutorial onwards.
Change your cwd to the one where you extracted django and just run the command
> python setup.py install
This will install all the django packages into the python library i.e in c:Python33Libsite-packages. To test if Django is properly added to python check it with this command
python -c "import django; print(django.get_version())"
Step #4 Adding Django to Syspath
Add the django executables in the path c:Python33Libsite-packagesdjangobin to system path as per step 1
Step #5 Create your project
Restart the command prompt and then create your project by navigating to the directory where you want to create your project by typing in the following command
> django-admin.py startproject myapp
Run your web project by navigating inside your project directory and then typing in
Go to http://127.0.0.1:8000 with your browser. Happy Django Coding.