Setting up pinax-project-account on Bitnami Django Stack for Mac/Linux

Wrote a walkthrough to show you how to install a Bitnami Django 1.4.5 stack on a Mac or Linux box and then setup + deploy the pinax-project-account Django starter project with a newly created sqlite3 DB that can be accessed at localhost:8080.

Before you begin

Download the Bitnami Django native installer for your system.

This walkthrough uses the Bitnami Django 1.4.5 native installer. If you’re using a different version, please be aware that the steps may differ from this guide.

Install the native Bitnami stack

Installation Notes

  • For this example, only sqlite3 and Django are required. By only selecting what’s necessary, installing the stack will go much faster, however there is no harm in installing more than what’s necessary except for your patience.
  • Do not setup an initial project.

On Linux

$ ./[bitnami native installer]

On Mac

Run the native installer .dmg

Inside the stack environment

Step 1: Open a shell environment or Terminal (iTerm2!)

$ cd [stack location]

Step 2: Activate the stack environment

- $ ./use_djangostack
- $ . scripts/

Step 3: Create a new pinax accounts project

- $ cd [stack location]/apps/django/django_projects/
- $ startproject --template= [project_name]

Step 4: Check to see if pip is installed

$ which pip

IF the path does NOT point to [stack location]/python/bin/pip

THEN pip is NOT installed. Run easy_install pip to install pip.

Step 5: Install required packages from requirements.txt

- $ cd [project_name]
- $ pip install -r requirements.txt

Step 6: Collect the static files

$ python collectstatic

Enter yes when prompted

Make note of the full path of the static files. You will need this for the next step. By default it should be at

[stack location]/apps/django/django_projects/[project_name]/[project_name]/site_media/static

Step 7: Create the sqlite3 database file

$ python syncdb


Step One: Open in a text editor. It is located at

[stack location]/apps/django/django_projects/[project_name]/[project_name]/

Step Two: Set default database name to the full path of the database created in the previous step.


    "default": {
    "ENGINE": "django.db.backends.sqlite3",
    "NAME": "dev.db",


    "default": {
    "ENGINE": "django.db.backends.sqlite3",
    "NAME": "[stack location]/apps/django/django_projects/[project_name]/dev.db",

Edit django.conf

Step One: Open django.conf in a text editor. It is located at

[stack location]/apps/django/conf/django.conf

Step Two: Modify Django app URL from localhost:8080/Project to localhost:8080


WSGIScriptAlias /Project


WSGIScriptAlias /

Step Three: Modify location to static file directory


Alias /static "[stack location]/apps/django/lib/python2.7/site-packages/django/contrib/admin/static"


Alias /site_media/static "[stack location]/apps/django/django_projects/[project_name]/[project_name]/site_media/static"


<Directory '[stack location]/apps/django/lib/python2.7/site-packages/django/contrib'>


<Directory '[stack location]/apps/django/django_projects/[project_name]/[project_name]/site_media/static'>

Edit django.wsgi

Step One: Open django.wsgi in a text editor. It is located at

[stack location]/apps/django/scripts/django.wsgi

Step Two: Modify location to Django project directory


sys.path.append('[stack location]/apps/django/django_projects/Project')


sys.path.append('[stack location]/apps/django/django_projects/[project_name]')

Step Three: Modify location to Django project settings


os.environ['DJANGO_SETTINGS_MODULE'] = 'Project.settings'


os.environ['DJANGO_SETTINGS_MODULE'] = '[project_name].settings'

Restart Apache

To commit the changes made up to this point, Apache must be restarted

$ ./ restart apache

Your app can be found at localhost:8080

More Information

comments powered by Disqus