banner ad

How to install Django on Ubuntu 12.04

| November 27, 2013 | 0 Comments
0 Flares 0 Flares ×

How to install Django on Ubuntu?

1. First, you should  go to this page http://www.djangoproject.com/download/ download.

2.Install apache mod python

sudo apt-get install libapache2-mod-python

3.There will be python.load in folder / etc/apache2/mods-enabled , mod_python module will automatically loaded.

4.At apache folder / var / www /, code this

django-admin.py startproject project

And create the new project.

5. Link Django in Apache

At /etc/apache2/apache2.conf

 cd /etc/apache2/apache2.conf

sudo cp apache2.conf  apache2.conf.0808


<Location "/project/"><br>
 SetHandler python-program<br>
 &nbsp; &nbsp; PythonPath "sys.path+['/var/www/']" &nbsp;<br>
 PythonHandler django.core.handlers.modpython<br>
 SetEnv DJANGO_SETTINGS_MODULE project.settings &nbsp;<br>
 PythonDebug On<br>
 </Location><br>
 END<br>

6.Restart Apache, and view http://localhost/project/, You should see this Django!

If you want to a domain name for your Django, buy 99 cent domain at http://renewalcoupon2014.com.

Good Luck!

Download PDF
0 Flares Twitter 0 Facebook 0 Google+ 0 Pin It Share 0 LinkedIn 0 Reddit 0 StumbleUpon 0 0 Flares ×

Tags: ,

Category: Python Tutorial

About the Author ()

My name is John Link.I am 26 years old. My major is Computer science and technology. I am a junior programmer with Python.

Leave a Reply

Your email address will not be published. Required fields are marked *

0 Flares Twitter 0 Facebook 0 Google+ 0 Pin It Share 0 LinkedIn 0 Reddit 0 StumbleUpon 0 0 Flares ×