Create a new social networking site in few hours using pinax platform (django).

By : rama

if you are excited to see how such a social networking site would like.Just follow the below link


We made the above site on pinax platform (Please note pinax has done most of things we have done very little).A platform for rapidly developing websites.

In this blogpost we will try to understand what pinax is? How it helps a developer to do things quickly? How to install & deploy? and various other things related to pinax.

What is Pinax?

In the present day world every website require components like regisration,openid support,some kind groups/ tribes,user profiles etc.....Almost every site has to code logic for these components. As they are reusable across many sites what if we have a platform (means a django project) which provides all these reusable components outof box and asks the developer to built on top of it.Such a platform help the developers to rapidly build the websites , it helps them to focus on core aspects of their site.

Pinax is such a (django) platform which provides a collection of integrated reusable django apps.Out of box pinax provides several reusable components/apps like

  1. openid support

  2. contact import (from vCard, Google or Yahoo)

  3. notification framework etc...

More details at http://pinaxproject.com/

If you still haven't understood please look at the talks given by James Tauber (creator of piinax) at

  1. http://thisweekindjango.com/twid/episode/24/this-week-in-django-24/

Let us dig into more details like how to install and deploy pinax,

How to install pinax?

 Get the latest version of pinax
 1.svn checkout http://svn.pinaxproject.com/pinax/trunk/   pinax
 2.cp pinax/projects/complete_project    ../../complete_project
 3.mv compete_project myprojectname
  1. First check out the latest version of pinax.
  2. Then get into the pinax/projects directory where you will find several projects like complete_project , basic_project.

  3. Complete_project : provides all reusable apps listed on pinaxproject website.You need to build on top of this project if the application which you are going to develop requires all or many of these.

  4. basic_project : it provides only very basic reusable apps like registration,login,openid support etc.You need to build on top of this project if you just requires only registrationa and login support.


3.Take out the project on which you want to built (it can be complete project or basic project or others depending on your needs) to the another directory where your django projects are there.

Note : After step 3 if you are installing stable version pinax0.5.1 instead of latest version at trunk , then you should follow the installation instructions given at the bottom of this blog.

4.sudo easy_install pip
5.sudo easy_install virtualenv
6.sudo apt-get install git-core
7.sudo apt-get install bzr
8.sudo pip install -r pinax/requirements/external_apps.txt

In previous versions pinax is using svn:externals to bring third party apps which merge into the pinax source code.But now pinax team has moved from svn:externals to pip.

More details : http://code.google.com/p/django-hotclub/wiki/MovingToDistutils

What is pip?

pip is similar to easy_install.easy_install allows you to install several python pakages.Similarly pip allows you to install third party apps and also python packages.

4.First install pip,virtualevn (isolated Python environments)

Please refer this url http://blog.ianbicking.org/2008/12/14/a-few-corrections-to-on-packaging/ for more info on pip and virtualenv

5,6,7.You also need to install git and bzr repositories.

Please refer this url for more info http://iraniweb.com/blog/?cat=17

8.using pip install all the third party external apps which are listed in pinax/requirements/external_apps.txt file.

10 cd myprojectname (which you created in step 3)
11.change PINAX_ROOT & ROOT_URLCONF in setting.py
12 python manage.py syncdb
13.python manage.py runserver

11.change myprojectname.settings.py as follows

  1. PINAX_ROOT = "path to pinax directory which was created in step 1".
  2. For ROOT_URLCONF please change it from complete_project.urls to urls.

Now type http://localhost:8000/ you will see pinax project screens, lots of common functionality is being provided out of box by pinax platform.

How to remove an application from pinax?

Apps are independent of one another.It is the project which integrates all this django reusable applications.You can remove an app by first removing the respective app urls in urls.py and changing several templates to reflect this.

How to add another application to pinax?

Just put it on the python path and add in settings.INSTALLED_APPS tuple.

More details about installation,deployment at http://pinaxproject.com/docs/0.5.1/deployment.html

How to deploy?

Deploying a pinax application is also very easy if you are using mod_python just add the following to your httpd.conf file

<Location "/">;
SetHandler python-program
PythonHandler myprojectname.deploy.modpython
SetEnv DJANGO_SETTINGS_MODULE complete_project.settings
PythonDebug On
PythonPath "['path to directory which contains your project (created in step3)','path to pinax project which     you   
made in step 3"] + sys.path"
  • Note that PthyonHandler is myprojectname.deploy.modpython instead of django.core.handlers.modpython

  • Please note that portions of media is being served from myprojectname (created in step 3) and from the pinax directory(Created in step 1, myprojectname has reference to that).Please take a note of this while creating symlinks for the media.

Have you every used pinax? if yes then please let us know your experience on pinax in comments.And also point me out if there are any corrections or mistakes in the above article.

Update (Installation of pinax 0.5.1 stable version)

After 3rd step you should do the following

4.cd myprojectname 
5.change PINAX_ROOT in manage.py 
PINAX_ROOT =  '“path to pinax directory which was created in step 1'   
6.change ROOT_URLCONF in settings.py     
 ROOT_URLCONF = 'For ROOTURLCONF please change it from completeproject.urls to urls'.
7. continue from  step 12  of above installation (whch is for trunk).

As this stable version is using svn:externals there is no need to install third party applications via pip.

Can we help you build amazing apps? Contact us today.

Topics : pinax



http://www.xfgx.info/ is broken with page displaying:

TemplateSyntaxError at /

Caught an exception while rendering: Reverse for 'pinaxsnetwork.home' with arguments '()' and keyword arguments '{}' not found.

You shouldn't have DEBUG=True on a live site, btw.


John Shimek

Since you installed virtualenv, shouldn't you do the pip install inside of a virtualenv? Otherwise, thanks for the short howto.

Rama Vadakattu

1.Thanks for pointing that.Will rectify the error very soon.

2.http://www.xfgx.info/ is just a demo site to showcase the power of pinax platform.

Brian 20th March, 2009

"2.http://www.xfgx.info/ is just a demo site to showcase the power of pinax platform."

Well, it's really good at being down then.

Stuart 20th March, 2009

Template syntax error the first time I tried to use it, worked a few seconds later. Given people were complaining about error two days ago this is not something I would feel comfortable spending time on. Bummer.

Rama Vadakattu

Sorry if it does so.
@Stuart , @Brian
I have thoroughly checked after receiving complaint from @phillip.
But i could not able to see any template syntax error.As far as i know there is only one problem with Geo locations.

From http://www.xfgx.info/ profiles i can see that yesterday itself around 100 people have registered and has tested the site.

Any way i will throughly check it once again and mail you to try it out.
Iam sure that you will appreciate the power of pinax platform after seeing the site.

Once again sorry for inconvenience we will try our level best to resolve the above problem (if any).

Rama Vadakattu

I have thoroughly tested the site i could not able to see any problems.
Incase if you encounter any errors/problems with the application please let us know.
We will quickly resolve those errors.

Fitzgerald Steele

I used an earlier version of pinax to setup a website/intranet for my research lab. I wrote a blog post about customizing and deploying pinax.

You recommended deploying with mod_python, however when I was setting up my site the pinax maintainers strongly suggested I use mod_wsgi. I was able to get deployed with mod_wsgi, where I struggled with mod_python. Has pinax changed their recommend deployment strategy?

Daniel Greenfeld

Might I suggest you change this tutorial to not go against TRUNK? Trunk is not a formal release. This means that it will not be stable. It will not work for everyone. And what works today might fail tomorrow. And it certainly won't work well with Windows.

Please have people download a formal, official release such as 0.5.1. Then base your documentation off of that. You will be able to support Windows users too.

Rama Vadakattu

@Fitzgerald Steele
When i referred the documentation of pinax i felt mod_python approach is easy and used it here.

@Daniel Greenfeld
Yes it is true.Actually to get to know about latest features i have used trunk. I also feel that it is good idea to write a tutorial based on stable version instead of trunk.
Considering your suggestion next time onwards we will write tutorials and how to's on stable version instead of trunk ( if there are any problems with stable version then we may write on trunk) .

Daniel Greenfeld


Is it possible for you to change this tutorial to go against 0.5.1 until we pin the 0.7 release?

dhiraj 31st March, 2009


I am getting a Error: No module named notification, while doing "python manage.py syncdb"

Rama Vadakattu

@ dhiraj,
Have you installed third party external apps using pip ?. (i.e) step 8 in the above tutorial.

Rama Vadakattu

@Daniel Greenfeld
i have updated the blog post which now includes installation instructions of pinax stable version 0.5.1.

cancel bubble

Why must I "Sign up and Log in to try out the site"?

dhiraj 3rd April, 2009

Now i have followed pinax stable version instructions and getting a Error: No module named django_openidauth, while doing "python manage.py syncdb"

Rama Vadakattu

@cancel bubble
We included Signup / login for the following reasons :
1.So that you get the chance to check out login and registration pages of pinax . (As this site is exclusively for demo purposes) .
And also while signing up just provide a dummy username and password (email is optional).

I have used similar installation steps as listed in the tutorial (for stable and trunk) and i successfully installed.
Anyway just try to install "django-openidauth" and run syncdb again.and let me know.

David 8th April, 2009

Hello Rama,

I've successfully installed and ran the 'Basic project' of Pinax. No problemo.

With the 'Complete project', a couple of warnings came up: the md5, sets, sha, module deprecated and 4 different sytax warnings... After runserver command, and opening up localhost, I got a TemplateSytaxErrror Exception Value:
Caught an exception while rendering: Could not import friends_app.views. Error was: No module named gdata.contacts.service
Exception Location: \site-packages\django\template\debug.py in render_node, line 81

Could it be that I'm using the a non-supported version of Python (2.6.1)..?

Pinax version: 0.5.1
Python version: 2.6.1
Windows XP.

Thanks in advance!

Matt 16th April, 2009

It seems that the google import contacts code is broken. I tried it with a local server, and with the sample http://www.xfgx.info/ and got the exact same error NonAuthSubToken. Anyone have this error?


nice, really nice!

Mike 15th May, 2009

I don't really know about this. Anyone using this might find themselves asking themselves: Did you catch the train? It's a little late in the game.

site ekle

Thank you for article. I took great pleasure to read

Myles 14th June, 2009

Hi, I'm thinking about starting a social networking site for writers, and I was wondering 2 things:
1) is there a way to make groups secure, as in by invite only
2) is there an easy app for uploading files (particularly word files) in both the group and user-to-user setting


beylikdüzü halı yıkama

really thanks.I was looking for this kind of infos on the net.finally after my some search I found here.this article is the right place I search mostly


I get a 500 server error when I set:
PythonHandler complete_project.deploy.modpython
so I corect this to:
PythonHandler /home/user/site/pinax/projects/complete_project/deploy/modpython.py
and everything is ok


Have you installed third party external apps using pip ?. (i.e) step 8 in the above tutorial.

Amit Green

Error in using http://www.xfgx.info/

TemplateSyntaxError at /

Caught an exception while rendering: Tried login in module authsub.views. Error was: 'module' object has no attribute 'login'

Ronald 27th Aug., 2009

TemplateSyntaxError at /

Caught an exception while rendering: Tried login in module authsub.views. Error was: 'module' object has no attribute 'login'

Jack 29th Aug., 2009

I got a error after i installed the complete_project
the error is :
Caught an exception while rendering: Tried login in module authsub.views. Error was: ‘module’ object has no attribute ‘login’

just the same error as @Amit Green and Ronald

and i find no way ti fix the bug.

Joe 31st Aug., 2009

I have tried several times over the last 3 days and I have never been able to see anything on this site. Whenever i go to the link http://www.xfgx.info/ I always get TemplateSyntaxError... Can't connect to local MySQL server through socket. I hope this is not true for all of Pinax sites.


thx for the great article. it helps me a lot!

Facebook Developers

Template syntax error the first time I tried to use it, worked a few seconds later. Great stuff, but do we really need more social networks?

Facebook Applications

It's good but i think there are already lots of social networking website and that are enough. Yeah but if someone bring something new and interesting so people will definitely gonna use it.

Facebook Developer

Creating a social network is good but maintaining a social network and keeping it update on daily basis is not an easy task and there are also many social networking sites like facebook and twitter to whom people are addicted. Thanks for sharing information :)

shiv kumar

Social Networking sites are still a good way to promote your blog, website, posts and articles. I use some of great social networking services for promotion of my blog and I get really good results. I suggest my friends to promote their blogs on social networking sites.

shiv kumar

Daniel Greenfeld

This should be going against the bundled 0.7.1 version of Pinax.




Great stuff, but do we really need more social networks?

This comment was originally posted on Reddit


No, but there’s lots of useful code here for other projects. Open source ftw.

This comment was originally posted on Reddit



This comment was originally posted on Twitter


Create a new social networking site in few hours using pinax platform (django): http://bit.ly/1dj6wv

This comment was originally posted on Twitter

© Agiliq, 2009-2012