Beginners guide: install and configure Pinax on Windows

Posted on 05 October 2009


Let’s try something new, let’s try Pinax! It’s not that new, it’s been around for a while, but it’s one of the very few rather mature CMS’s around that have been developed completely with Python. While Python is the de facto language at Google’s, it may come as a surprise that there’s still quite little available at the wide area of CMS’s.

Because installing open source packages is not for the faint of heart and because you may not be aware with Python or Pinax parlor, I’ve put together this little “beginners installation guide” which is well suited for anybody, even non-beginners. While writing this post and installing Pinax on some systems, I found out that there’s little to fear of this CMS: it runs out of the box and apart from some small quirks, it runs real smooth too.

By the end of this guide, you will have a social networking site including blogs, friends, tweets etc set up!

Before you start

Let us assume that you are in need of a CMS and that you decided to install Pinax for one reason or another. Maybe you want to learn Python, maybe you just like the clean layout of Pinax’s homepage and you don’t want a complex CMS, just something easy. For this guide, I assume the following setup:

  1. You are on Windows (Vista, XP, 2003, 2008, 7, all good)
  2. You have some basic understanding of what a web server is, what it should do and what a CMS is
  3. You have a running version of Apache 2.2.x (installation Apache will not be covered here)
  4. You downloaded Python version 2.6.x Windows Installer
  5. You downloaded Python Imaging Library 1.1.6 for Python 2.6
  6. You downloaded the Pinax bundle 0.7 zip file
  7. You are reading this guide

There seems to be a lot of confusion about Django: you should not download it, it is included in the Pinax package and will be installed with it.

The promise

I shouldn’t do any promises. But when you are done reading through this page step by step guide, you will have a Pinax installation and you have a running social networking site including profiles, photos, blogs, tweets, bookmarking, and user chatting/messaging. That’s quite a lot that Pinax offers out of the box!

Installing Pinax step by step

The following sections take you through the installation, setup and configuration of Pinax. You can skip the first steps if you already have Python or PIL (Python Image Library) installed:

Step 1: Install Python

The easy part. Depending on what browser you used for downloading, the MSI file may be blocked. If so, go to security properties and add the System user to the list of allowed users and click the Unblock button on the General tab of the properties.

Installation is straightforward. During installation, you may get a few warnings on files that cannot be created. This only seems to happen on Windows Vista and Windows 7. For each message, one time clicking Retry solves the issue.

  1. Make sure to use the 2.6.x version, not the newer 3.1 version of Python
  2. Install to a location of your choice. The location may contain spaces in the path
  3. After installation, add the installation path to your %PATH% environment variable by hand:
    1. Open System properties (Winkey + Pause)
    2. Go to Advanced System Settings (Vista) or the Advanced tab (XP)
    3. Click on “Environment Variables”
    4. Select the PATH under System Variables and add a “;” (semi colon) plus the path, no quotes around the path
  4. Open a command prompt and type “python -?” (no quotes), it should show you a help screen

If you have some rather general questions, on installation or Python as a whole, check the Python Frequently Asked Questions.

Step 2: Install Python Image Library

The other easy part, you just have to know that you should install this. The installation is without hassle, just download the installer and run it, it will find the installed python package and install PIL for you in the right location. That’s all there is to installing PIL.

If you think you already have it, or if you have other questions, check the Python Image Library Frequently Asked Questions.

Step 3: Install Pinax

The tricky part. The first time I did this, I got the errors like mentioned under installation problems, if you get that too, check there for a solution. If you follow these instructions, you get Pinax installed quite easily:

  1. Unzip or unpack the Pinax zip file into a location or your choice, make it a location handy for future reference, it needs to remain available. In the example I use d:\libs\python\pinax.
  2. Create a folder for the Pinax installation. In the Pinax instructions, this is called a virtual environment. Don’t think too heavy about this, just consider it the installation location for your Pinax. You can run multiple sites from it, but I assume only one here. In the example I use d:\internet\yoursite.org\px (where px is short for Pinax)
  3. Configure your firewall to allow python.exe to contact the internet. If you don’t know how to do it, put your firewall in Learning Mode (if it has one). If it doesn’t have a learning mode, continue with the next step, your firewall may pop up a question about python.exe accessing the internet in which case you should answer with “allow”.
  4. Go to a command prompt and type the following (“prompt>” stands for whatever your prompt is, don’t type it):
    prompt> d:
    prompt> cd \libs\python\pinax
    prompt> python scripts/pinax-boot.py d:/internet/yoursite.org/px
    
  5. You should see the log output as below. It is a lot and it  may look slightly different on your system, but you get the idea. If you don’t see too many warnings and no errors, go on with the next step, activation.
    New python executable in d:/internet/yoursite.org/px\Scripts\python.exe
    Installing setuptools...............done.
    Installing pip 0.4.1dev
    Installing setuptools-dummy 0.0.3
    Installing setuptools-git 0.3.4
    Installing Django 1.0.3
    Going to install a full Pinax 0.7 release.
      Installing Pinax
    Ignoring indexes: http://pypi.python.org/simple
    Downloading/unpacking django-openid==0.2.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 43))
      Running setup.py egg_info for package django-openid
    Downloading/unpacking django-friends==0.1.4 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 35))
      Running setup.py egg_info for package django-friends
    Downloading/unpacking vobject==0.8.1c (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 16))
      Running setup.py egg_info for package vobject
    Downloading/unpacking django-tagging==0.3 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 48))
      Running setup.py egg_info for package django-tagging
    Downloading/unpacking django-pagination==1.0.5.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 44))
      Running setup.py egg_info for package django-pagination
    Downloading/unpacking django-photologue==2.3 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 54))
      Running setup.py egg_info for package django-photologue
        warning: no previously-included files matching '*.pyc' found anywhere in distribution
    Downloading/unpacking django-oembed==0.1.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 42))
      Running setup.py egg_info for package django-oembed
    Downloading/unpacking django-uni-form==0.6.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 51))
      Running setup.py egg_info for package django-uni-form
    Downloading/unpacking django-mailer==0.1.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 38))
      Running setup.py egg_info for package django-mailer
    Downloading/unpacking django-sorting>=0.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 47))
      Running setup.py egg_info for package django-sorting
    Downloading/unpacking django-generic-flatblocks==0.3.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 58))
      Running setup.py egg_info for package django-generic-flatblocks
    Downloading/unpacking django-robots==0.6.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 45))
      Running setup.py egg_info for package django-robots
    Downloading/unpacking django-threadedcomments==0.5.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 49))
      Running setup.py egg_info for package django-threadedcomments
    Downloading/unpacking django-avatar==1.0.2 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 27))
      Running setup.py egg_info for package django-avatar
    Downloading/unpacking sorl==3.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 57))
      Running setup.py egg_info for package sorl
    Downloading/unpacking django-db-log==1.0.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 29))
      Running setup.py egg_info for package django-db-log
    Downloading/unpacking gdata==1.3.3 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 9))
      Running setup.py egg_info for package gdata
    Downloading/unpacking django-gravatar==0.1.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 36))
      Running setup.py egg_info for package django-gravatar
    Downloading/unpacking python-yadis==1.1.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 13))
      Running setup.py egg_info for package python-yadis
    Downloading/unpacking django-filter==0.5.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 60))
      Running setup.py egg_info for package django-filter
        warning: no files found matching '*' under directory 'django_filters\fixtures'
        warning: no files found matching '*' under directory 'django_filters\tests\templates\django_filters'
    Downloading/unpacking django-timezones==0.1.4 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 50))
      Running setup.py egg_info for package django-timezones
    Downloading/unpacking django-dbtemplates==0.5.8 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 30))
      Running setup.py egg_info for package django-dbtemplates
    Downloading/unpacking BeautifulSoup==3.0.7a (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 17))
      Running setup.py egg_info for package BeautifulSoup
    Downloading/unpacking django-announcements==0.1.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 25))
      Running setup.py egg_info for package django-announcements
    Downloading/unpacking textile==2.1.3 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 15))
      Running setup.py egg_info for package textile
    Downloading/unpacking docutils==0.5 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 7))
      Running setup.py egg_info for package docutils
        "optparse" module already present; ignoring extras/optparse.py.
        "textwrap" module already present; ignoring extras/textwrap.py.
    Downloading/unpacking django-locations==0.1.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 37))
      Running setup.py egg_info for package django-locations
    Downloading/unpacking django-markup==0.3 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 56))
      Running setup.py egg_info for package django-markup
    Downloading/unpacking django-atomformat==0.1.0dev (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 26))
      Running setup.py egg_info for package django-atomformat
    Downloading/unpacking django-swaps==0.5.3 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 46))
      Running setup.py egg_info for package django-swaps
        warning: no files found matching 'CONTRIBUTORS.txt'
    Downloading/unpacking geopy==0.93dev-r0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 21))
      Running setup.py egg_info for package geopy
    Downloading/unpacking creole==1.0.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 23))
      Running setup.py egg_info for package creole
    Downloading/unpacking django-ajax-validation==0.1.3 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 24))
      Running setup.py egg_info for package django-ajax-validation
    Downloading/unpacking django-wikiapp==0.2.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 53))
      Running setup.py egg_info for package django-wikiapp
    Downloading/unpacking simplejson==2.0.9 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 14))
      Running setup.py egg_info for package simplejson
    Downloading/unpacking django-notification==0.1.4 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 41))
      Running setup.py egg_info for package django-notification
    Downloading/unpacking django-frontendadmin==0.4 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 59))
      Running setup.py egg_info for package django-frontendadmin
    Downloading/unpacking django-flag==0.1.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 34))
      Running setup.py egg_info for package django-flag
    Downloading/unpacking django-bookmarks==0.1.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 28))
      Running setup.py egg_info for package django-bookmarks
    Downloading/unpacking pytz==2009l (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 22))
      Running setup.py egg_info for package pytz
        warning: no files found matching '*.pot' under directory 'pytz'
        warning: no previously-included files found matching 'test_zdump.py'
    Downloading/unpacking template-utils==0.4p2 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 61))
      Running setup.py egg_info for package template-utils
    Downloading/unpacking Pinax==0.7 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 63))
      Running setup.py egg_info for package Pinax
    Downloading/unpacking python-dateutil==1.4.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 6))
      Running setup.py egg_info for package python-dateutil
    Downloading/unpacking python-openid==2.2.4 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 11))
      Running setup.py egg_info for package python-openid
        warning: no files found matching 'README' under directory 'examples'
        warning: no files found matching 'discover' under directory 'examples'
        warning: no files found matching 'dhpriv' under directory 'openid\test'
        warning: no files found matching 'n2b64' under directory 'openid\test'
    Downloading/unpacking elementtree==1.2.7-20070827-preview (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 8))
      Running setup.py egg_info for package elementtree
    Downloading/unpacking diff-match-patch==20090804 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 20))
      Running setup.py egg_info for package diff-match-patch
    Downloading/unpacking django-debug-toolbar==0.7.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 31))
      Running setup.py egg_info for package django-debug-toolbar
    Downloading/unpacking Markdown==2.0.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 19))
      Running setup.py egg_info for package Markdown
    Downloading/unpacking ybrowserauth==1.2 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 18))
      Running setup.py egg_info for package ybrowserauth
    Downloading/unpacking django-extensions==0.4.1 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 33))
      Running setup.py egg_info for package django-extensions
    Downloading/unpacking django-email-confirmation==0.1.3 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 32))
      Running setup.py egg_info for package django-email-confirmation
    Downloading/unpacking django-staticfiles==0.1.2 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 62))
      Running setup.py egg_info for package django-staticfiles
    Downloading/unpacking python-twitter==0.6 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 12))
      Running setup.py egg_info for package python-twitter
    Downloading/unpacking Pygments==1.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 10))
      Running setup.py egg_info for package Pygments
    Downloading/unpacking django-messages==0.4.2 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 39))
      Running setup.py egg_info for package django-messages
    Downloading/unpacking django-voting==0.1-pre (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 52))
      Running setup.py egg_info for package django-voting
    Downloading/unpacking django-microblogging==0.1.2 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 40))
      Running setup.py egg_info for package django-microblogging
    Downloading/unpacking django-attachments==0.3 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 55))
      Running setup.py egg_info for package django-attachments
        warning: no files found matching '*' under directory 'attachments\fixtures'
    Installing collected packages: BeautifulSoup, creole, diff-match-patch, django-ajax-validation, django-announcements, django-atomformat, django-attachments, django-avatar, django-bookmarks, django-db-log, django-dbtemplates, django-debug-toolbar, django-email-confirmation, django-extensions, django-filter, django-flag, django-friends, django-frontendadmin, django-generic-flatblocks, django-gravatar, django-locations, django-mailer, django-markup, django-messages, django-microblogging, django-notification, django-oembed, django-openid, django-pagination, django-photologue, django-robots, django-sorting, django-staticfiles, django-swaps, django-tagging, django-threadedcomments, django-timezones, django-uni-form,django-voting, django-wikiapp, docutils, elementtree, gdata, geopy, Markdown, Pinax, Pygments, python-dateutil, python-openid, python-twitter, python-yadis, pytz, simplejson, sorl, template-utils, textile, vobject, ybrowserauth  Running setup.py install for django-openid  Running setup.py install for django-friends
      Running setup.py install for vobject
        Installing change_tz-script.py script to d:\internet\yoursite.org\px\Scripts
        Installing change_tz.exe script to d:\internet\yoursite.org\px\Scripts
        Installing ics_diff-script.py script to d:\internet\yoursite.org\px\Scripts
        Installing ics_diff.exe script to d:\internet\yoursite.org\px\Scripts
      Running setup.py install for django-tagging
      Running setup.py install for django-pagination
      Running setup.py install for django-photologue
        warning: no previously-included files matching '*.pyc' found anywhere in distribution
      Running setup.py install for django-oembed
      Running setup.py install for django-uni-form
      Running setup.py install for django-mailer
      Running setup.py install for django-sorting
      Running setup.py install for django-generic-flatblocks
      Running setup.py install for django-robots
      Running setup.py install for django-threadedcomments
      Running setup.py install for django-avatar
      Running setup.py install for sorl
      Running setup.py install for django-db-log
      Running setup.py install for gdata
      Running setup.py install for django-gravatar
      Running setup.py install for python-yadis
      Running setup.py install for django-filter
        warning: no files found matching '*' under directory 'django_filters\fixtures'
        warning: no files found matching '*' under directory 'django_filters\tests\templates\django_filters'
      Running setup.py install for django-timezones
      Running setup.py install for django-dbtemplates
      Running setup.py install for BeautifulSoup
      Running setup.py install for django-announcements
      Running setup.py install for textile
      Running setup.py install for docutils
        "optparse" module already present; ignoring extras/optparse.py.
        "textwrap" module already present; ignoring extras/textwrap.py.
      Running setup.py install for django-locations
      Running setup.py install for django-markup
      Running setup.py install for django-atomformat
      Running setup.py install for django-swaps
        warning: no files found matching 'CONTRIBUTORS.txt'
      Running setup.py install for geopy
      Running setup.py install for creole
      Running setup.py install for django-ajax-validation
      Running setup.py install for django-wikiapp
      Running setup.py install for simplejson
        building 'simplejson._speedups' extension
        C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-Ic:\program files\python\python26\include" -Id:\internet\yoursite.org\px\PC /Tcsimplejson/_speedups.c /Fobuild\temp.win32-2.6\Release\simplejson/_speedups.obj    _speedups.c    simplejson/_speedups.c(1834) : warning C4028: formal parameter 1 different from declaration
        C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO "/LIBPATH:c:\program files\python\python26\Libs" /LIBPATH:d:\internet\yoursite.org\px\libs /LIBPATH:d:\internet\yoursite.org\px\PCbuild /EXPORT:init_speedups build\temp.win32-2.6\Release\simplejson/_speedups.obj /OUT:build\lib.win32-2.6\simplejson\_speedups.pyd /IMPLIB:build\temp.win32-2.6\Release\simplejson\_speedups.lib /MANIFESTFILE:build\temp.win32-2.6\Release\simplejson\_speedups.pyd.manifest       Creating library build\temp.win32-2.6\Release\simplejson\_speedups.lib and object build\temp.win32-2.6\Release\simplejson\_speedups.exp
        C:\Program Files\Microsoft SDKs\Windows\v7.0\bin\mt.exe -nologo -manifest build\temp.win32-2.6\Release\simplejson\_speedups.pyd.manifest -outputresource:build\lib.win32-2.6\simplejson\_speedups.pyd;2
      Running setup.py install for django-notification
      Running setup.py install for django-frontendadmin
      Running setup.py install for django-flag
      Running setup.py install for django-bookmarks
      Running setup.py install for pytz
        warning: no files found matching '*.pot' under directory 'pytz'
        warning: no previously-included files found matching 'test_zdump.py'
      Running setup.py install for template-utils
      Running setup.py install for Pinax
        Installing pinax-admin-script.py script to d:\internet\yoursite.org\px\Scripts
        Installing pinax-admin.exe script to d:\internet\yoursite.org\px\Scripts
      Running setup.py install for python-dateutil
      Running setup.py install for python-openid
        warning: no files found matching 'README' under directory 'examples'
        warning: no files found matching 'discover' under directory 'examples'
        warning: no files found matching 'dhpriv' under directory 'openid\test'
        warning: no files found matching 'n2b64' under directory 'openid\test'
      Running setup.py install for elementtree
      Running setup.py install for diff-match-patch
      Running setup.py install for django-debug-toolbar
      Running setup.py install for Markdown
        Created: d:\internet\yoursite.org\px\Scripts\markdown.bat
      Running setup.py install for ybrowserauth
      Running setup.py install for django-extensions
      Running setup.py install for django-email-confirmation
      Running setup.py install for django-staticfiles
      Running setup.py install for python-twitter
      Running setup.py install for Pygments
        Installing pygmentize-script.py script to d:\internet\yoursite.org\px\Scripts
        Installing pygmentize.exe script to d:\internet\yoursite.org\px\Scripts
      Running setup.py install for django-messages
      Running setup.py install for django-voting
      Running setup.py install for django-microblogging
      Running setup.py install for django-attachments
        warning: no files found matching '*' under directory 'attachments\fixtures'
    Successfully installed
    Please activate the newly created virtualenv by running:
      d:\internet\yoursite.org\px\Scripts\activate.bat
    Pinax environment created successfully.
    
  6. Activate the environment by executing the following command from a command prompt:
    prompt> d:
    prompt> cd internet/yoursite.org/px/scripts
    prompt> activate
    

    this will change the look of your prompt (see image). If you want to deactivate the environment, you can do so by running the command deactivate the same way as you ran activate earlier. Note: nothing fancy has happened, nothing has been started. You are still in the same command shell. The only difference is a changed PATH environment that includes the current script path, and when you deactivate this extra path is removed.

Step 4: create a Pinax CMS website

Apache defaults nicely with the infamous “it works!” page. Pinax is not yet so pretty that it does all that for you. You will have to create the first default CMS site yourself. Once you’ve done that, it won’t be too hard to create some more if you have to.

  1. If you ended with the last point of Step 3, you’re fine, otherwise, open a command prompt and activate Pinax. You should see the prompt starting with (px) to indicate it is activated.
  2. Go to the directory that you want to be the parent of your website project.
  3. Create a new project, based on one of the existing projects that come in the package, which is done by cloning; you can do that by executing the following command (we call our brillant site “exciting-site”):
    prompt> pinax-admin clone_project social_project exciting-site
    

    the result should look something like the following:

    Copying your project to its new location
    Updating settings.py for your new project
    Renaming and updating your deployment files
    Finished cloning your project, now you may enjoy Pinax!
    
  4. Go to the site and create the database by executing the following command:
    prompt> cd exciting-site
    prompt> python manage.py syncdb
    

    this will trigger the creation of the database and shows the following output (may take a moment depending on your system) which means it has created the necessary tables for you in the database:

    Creating table auth_permission
    Creating table auth_group
    Creating table auth_user
    Creating table auth_message
    Creating table django_content_type
    Creating table django_session
    Creating table django_site
    Creating table notification_noticetype
    Creating table notification_noticesetting
    Creating table notification_notice
    Creating table notification_noticequeuebatch
    Creating table notification_observeditem
    Creating table emailconfirmation_emailaddress
    Creating table emailconfirmation_emailconfirmation
    Creating table robots_url
    Creating table robots_rule
    Creating table friends_contact
    Creating table friends_friendship
    Creating table friends_joininvitation
    Creating table friends_friendshipinvitation
    Creating table friends_friendshipinvitationhistory
    Creating table mailer_message
    Creating table mailer_dontsendentry
    Creating table mailer_messagelog
    Creating table messages_message
    Creating table announcements_announcement
    Creating table oembed_providerrule
    Creating table oembed_storedoembed
    Creating table threadedcomments_threadedcomment
    Creating table threadedcomments_freethreadedcomment
    Creating table threadedcomments_testmodel
    Creating table wiki_article
    Creating table wiki_changeset
    Creating table swaps_offer
    Creating table swaps_swap
    Creating table votes
    Creating table tagging_tag
    Creating table tagging_taggeditem
    Creating table bookmarks_bookmark
    Creating table bookmarks_bookmarkinstance
    Creating table blog_post
    Creating table photologue_gallery
    Creating table photologue_galleryupload
    Creating table photologue_photo
    Creating table photologue_photoeffect
    Creating table photologue_watermark
    Creating table photologue_photosize
    Creating table avatar_avatar
    Creating table flag_flaggedcontent
    Creating table flag_flaginstance
    Creating table microblogging_tweet
    Creating table microblogging_tweetinstance
    Creating table microblogging_following
    Creating table locations_location
    Creating table profiles_profile
    Creating table account_account
    Creating table account_otherserviceinfo
    Creating table account_passwordreset
    Creating table signup_codes_signupcode
    Creating table signup_codes_signupcoderesult
    Creating table tribes_tribe
    Creating table photos_photoset
    Creating table photos_image
    Creating table photos_pool
    Creating table topics_topic
    Creating table django_admin_log
    Creating table djangodblog_errorbatch
    Creating table djangodblog_error
    Creating table django_openid_nonce
    Creating table django_openid_association
    Creating table django_openid_useropenidassociation
    
    You just installed Django's auth system, which means you don't have any superusers defined.
    Would you like to create one now? (yes/no):
    
  5. The first time you do this, you need to define a superuser. The installation program will ask you for it:
    You just installed Django's auth system, which means you don't have any superusers defined.
    Would you like to create one now? (yes/no):
    

    type “yes” + enter for yes. You will be prompted for a username  and a password (choose something you can remember) and an email address, which can used for resetting your password if you forget:

    Username: mysuperuser
    E-mail address: my-email@example.com
    Password:
    Password (again):
    Superuser created successfully.
    
  6. After creation of the superuser, the installation will seem to pass for a bit. Sit back and wait. It will install a lot of stuff for you. After a while, you should see the following output:
    Installing index for auth.Permission model
    Installing index for auth.Message model
    Installing index for notification.NoticeSetting model
    Installing index for notification.Notice model
    Installing index for notification.ObservedItem model
    Installing index for emailconfirmation.EmailAddress model
    Installing index for emailconfirmation.EmailConfirmation model
    Installing index for friends.Contact model
    Installing index for friends.Friendship model
    Installing index for friends.JoinInvitation model
    Installing index for friends.FriendshipInvitation model
    Installing index for friends.FriendshipInvitationHistory model
    Installing index for messages.Message model
    Installing index for announcements.Announcement model
    Installing index for threadedcomments.ThreadedComment model
    Installing index for threadedcomments.FreeThreadedComment model
    Installing index for wiki.Article model
    Installing index for wiki.ChangeSet model
    Installing index for swaps.Offer model
    Installing index for swaps.Swap model
    Installing index for voting.Vote model
    Installing index for tagging.TaggedItem model
    Installing index for bookmarks.Bookmark model
    Installing index for bookmarks.BookmarkInstance model
    Installing index for blog.Post model
    Installing index for photologue.GalleryUpload model
    Installing index for photologue.Photo model
    Installing index for photologue.PhotoSize model
    Installing index for avatar.Avatar model
    Installing index for flag.FlaggedContent model
    Installing index for flag.FlagInstance model
    Installing index for microblogging.Tweet model
    Installing index for microblogging.TweetInstance model
    Installing index for microblogging.Following model
    Installing index for locations.Location model
    Installing index for account.OtherServiceInfo model
    Installing index for account.PasswordReset model
    Installing index for signup_codes.SignupCode model
    Installing index for signup_codes.SignupCodeResult model
    Installing index for tribes.Tribe model
    Installing index for photos.Image model
    Installing index for photos.Pool model
    Installing index for topics.Topic model
    Installing index for admin.LogEntry model
    Installing index for djangodblog.ErrorBatch model
    Installing index for djangodblog.Error model
    Installing index for django_openid.UserOpenidAssociation model
    Installing json fixture 'initial_data' from 'd:\internet\yoursite.org\px\lib\site-packages\oembed\fixtures'.
    Installing json fixture 'initial_data' from 'd:\internet\yoursite.org\px\lib\site-packages\pinax\apps\photos\fixtures'.
    Installed 18 object(s) from 2 fixture(s)
    
  7. Finally the moment we’ve all been waiting for, start the website and check out your http://localhost:8000 (may need to check your firewall, but usually, localhost is allowed on any port). Run the following command:
    python manage.py runserver
    

    which should yield the following output (if not, check if you had the error explained below, which is easy to solve)

    Validating models...
    0 errors found
    
    Django version 1.0.3, using settings 'exciting-site.settings'
    Development server is running at http://localhost:8001/
    Quit the server with CTRL-BREAK.
    
  8. You now have a running CMS, congratulations! You can quit the CMS by hitting Ctrl-C or Ctrl-Break. The CMS opening page looks something like the following:

Pinax default after installation

Pinax default after installation

Step 5: configure Apache or run as a service

As you may have found out by now, you don’t need Apache to run this. Period. That’s different from what you may be used to with Ruby, PHP or other environments (.NET, J2EE all need a runtime environment and a web server). The reason is that this runs on top of Django (also built with Python), which is already a framework and a web server in one.

When you already have Apache configured, you can set it up as a proxy to your Django / Pinax installation. In addition, it is handy to have Pinax run as a service, which can run when you are not logged on. In a future post, not so far ahead, I’ll go into configuring Apache for Django and creating a Windows Service that runs Django.

Step 6: where to go from here

Play around a bit with your installation. Here’s a nice post explaining the working of the default site that Pinax just created.  You just created a full working site, enjoy!

Installation problems Pinax

While installing the packages

If you follow the instructions above, or if you read the INSTALL file in the Pinax package which contains a more general version of these instructions, you should not receive this error. But if you do, then you have a connection problem. In all but a few cases, your firewall or virus scanner is blocking communication. Check your firewall settings or disable temporarily (don’t do this unless your computer is well protected by an external firewall or an ADSL modem with a firewall).

New python executable in d:/internet/yoursite.org/px\Scripts\python.exe
Installing setuptools..............done.
Installing pip 0.4.1dev
Installing setuptools-dummy 0.0.3
Installing setuptools-git 0.3.4
Installing Django 1.0.3
Going to install a full Pinax 0.7 release.
  Installing Pinax
Ignoring indexes: http://pypi.python.org/simple
Downloading/unpacking django-openid==0.2.0 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 43))
  Running setup.py egg_info for package django-openid
Downloading/unpacking django-friends==0.1.4 (from -r D:\Libs\Python\pinax\requirements\0.7\release.txt (line 35))
Exception:
Traceback (most recent call last):
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 288, in main
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 463, in run
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 1951, in install_files
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 2021, in unpack_url
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 2130, in unpack_file
  File "c:\program files\python\python26\Lib\tarfile.py", line 2523, in is_tarfile
  File "c:\program files\python\python26\Lib\tarfile.py", line 1647, in open
  File "c:\program files\python\python26\Lib\tarfile.py", line 1692, in taropen
  File "c:\program files\python\python26\Lib\tarfile.py", line 1570, in __init__
  File "c:\program files\python\python26\Lib\tarfile.py", line 2311, in next
  File "c:\program files\python\python26\Lib\tarfile.py", line 1235, in fromtarfile
IOError: [Errno 12] Not enough space

Storing complete log in ./pip-log.txt
Traceback (most recent call last):
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 4128, in <module>
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 978, in main
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 304, in main

IOError: [Errno 12] Not enough space
Complete output from command d:/internet/yoursite.org/px\Scripts\python.exe d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py install --no-deps --no-index --ignore-installed --environment d:/internet/yoursite.org/px --requirement D:\Libs\Python\pinax\requirements\0.7\release.txt --find-links file:///d:/libs/python/pinax/requirements/0.7 d:/internet/yoursite.org/px ___VENV_RESTART___:

----------------------------------------
Traceback (most recent call last):
  File "d:\internet\yoursite.org\px\Scripts\pip-script.py", line 8, in <module>
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 978, in main
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 272, in main
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 1061, in restart_in_venv
  File "d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py", line 3852, in call_subprocess

pip.InstallationError: Command d:/internet/yoursite.org/px\Scripts\python.exe d:\internet\yoursite.org\px\lib\site-packages\pip-0.4.1devdev-py2.6.egg\pip.py install --no-deps --no-index --ignore-installed --environment d:/internet/yoursite.org/px --requirement D:\Libs\Python\pinax\requirements\0.7\release.txt --find-links file:///d:/libs/python/pinax/requirements/0.7 d:/internet/yoursite.org/px ___VENV_RESTART___ failed with error code 1
Traceback (most recent call last):
  File "pinax/scripts/pinax-boot.py", line 1558, in <module>
  File "pinax/scripts/pinax-boot.py", line 424, in main
  File "pinax/scripts/pinax-boot.py", line 1251, in after_install
  File "pinax/scripts/pinax-boot.py", line 483, in call_subprocess

OSError: Command d:\internet\yoursite.or...p.exe install --no-deps --no-index --ignore-installed --environment d:/internet/yoursite.org/px --requirement D:\Libs\Python\pinax\requireme...e.txt --find-links file:///d:/libs/python/pinax/r...s/0.7 failed with error code 1 D:\Libs\Python>

While trying to run the Pinax CMS server

You may see the following text when you try to run the server (under Step 4, point 8):

Validating models...
0 errors found

Django version 1.0.3, using settings 'exciting-site.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
Error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions

When you receive this error, there’s nothing wrong with your access permissions! The port is already in use, that’s all. To find out what program is using your current port, in case you want to disable it, run the following from a command prompt:

netstat -ao 2>nul | find "8000"

replace "8000" with the actual port you specified (default is 8000). The "2>nul" prevents you seeing unnecessary errors like “x: Windows Sockets initialization failed: 5″ which can happen for certain processes. "-ao" means all ports and process ids,  “| find xxx” means select these lines only that contain that text. Result can look something like this:

TCP    127.0.0.1:8000      MyComp:0       LISTENING      6738

the important part to look for is the last number, 6738 in this example, which you can lookup on the task manager (right click task bar, select Task Manager) which will show the name in the list for that ID. Alternative, you can run the following command which shows the process name directly, by you cannot filter it that easily:

netstat -ab 2>nul

A common application that uses port 8000 is Eclipse with certain plugins, like Aptana Studio. This blog helped me solve this issue on my Vista machine, however on your machine, another application may be troubling. If you cannot shut down the application, you can run the following command to start the server on a different port:

prompt> activate
prompt> python manage.py runserver localhost:8001

Yes, it’s that easy. You can choose any port you like as long as its free. The default HTTP port is port 80, which is usually occupied by either your web server or by Skype. If this is your first website project ever, you can try using it (make sure to close Skype first).

Other situations or errors

If your situation doesn’t fit to one of the errors above or the solutions didn’t work for you, please let me know by commenting on this post or sending me a tweet. I can only help with isntallation errors on Windows systems running Pinax.

Conclusion

In all honesty, I haven’t done much playing around with Pinax yet, but from what I see so far it seems like a well featured yet lightweight CMS system which can compete with many existing systems. The CMS market is very overloaded as it is and it is not easy to decide on a fit CMS system for your needs, but if you consider trying out something new, this is a very good candidate and is at least worth a thorough test. I cannot tell much about it being production stable, the version number being on 0.7 at the moment tells met that you should wait a while before really trying this in live corporate environments.

In a future article I will show how to really configure Apache, it proved to big to be included in this “getting started” article. And in the third and latest article, I will show you how you can run this without using Apache (if you don’t have it you don’t need to install it) as a Windows Service, so that it runs even when you are not logged on.

– Abel –

 light="true"

Other Hatties at Under My Hat

Ever tried to shrink a volume? Ever wondered why you cannot shrink a volume smaller than half its size? Ever wondered what $MFTMirr is all about and what it’s doing in the middle of your drive? Or do you just want to get the biggest available free space and shrink your drive? Then this article is for you — read article

Have you ever received this error using Windows System Backup and Restore Center? Never managed to get rid of it or it mysteriously keeps coming back? Here’s a lightweight and easy solution — read article

The improvements that matter to you, focused on the .NET Framework in general and the CLR or CLI especially. Read about parallel computing and concurrency support that’s now available to everybody developing for .NET — read article

 


4 Tweets

No responses yet. You could be the first!

Leave a Response

Additional comments powered by BackType

Get Adobe Flash playerPlugin by wpburn.com wordpress themes

Copyright © Under My Hat.

Other Recent Hatties (alphabetically)