Setting up django using virtualenv

Still I remember, once I was crying(!) to people to teach me virtualenv 😛 It’s actually I didn’t know that what it does, how it does and what are the benefits of using virtualenv.

Anyway, there are few and very important benefits of using virtualenv. This fantastic tool gives theh power of creating isolated Python environment. Keeps the headache of permission, version of the applications, dependencies etc.

The funnies thing about virtualenv is that, it is enormously easy to setup. YES, I mean it 🙂

sudo easy_install virtualenv

Now go to the directory where you want to create the project and type

virtualenv --no-site-packages vdjango

now install django

./vdjango/bin/easy_install django

Start a django project

./vdjango/bin/django-admin.py startproject myapp

now to the project directory and run the project.

../vdjango/bin/python manage.py runserver 0.0.0.0:8000

tada!!!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s