Skip to content
This repository
branch: membership_dem…
Fetching contributors…

Cannot retrieve contributors at this time

file 131 lines (74 sloc) 6.511 kb

Tendenci Installation

You can use the following installation instructions to install a local Tendenci site. This Django project is intended to help create a Tendenci site that you can deploy on a public hosting, but it's recommended that you install locally first in order to test your themes and designs.

Setting up the database

Tendenci is designed for use with PostgreSQL. You will need to have a PostgreSQL server running locally. If you are on OS X, we recommend to get up and running fast.

With installed, you can create a database from Terminal:

psql -h localhost -c "CREATE DATABASE tendenci"

You can also create a database in your GUI of choice (recommended:

For more on installing PostgreSQL for Django check the docs at:

Downloading Tendenci

Make a folder for your site and cd into it. Replace 'sitename' with the name of your site.

mkdir sitename
cd sitename

It's best practice to make a virtual environment for your site. You will need virtualenv installed for the next step. If you don't have it, you can install it with pip install virtualenv. Make a virtual environment called 'venv' and activate it.

virtualenv venv
source venv/bin/activate

Install Tendenci. This download and install step may take a few minutes.

pip install tendenci

Once this is done, you can setup django project with the following:


If you created a database with a name other than 'tendenci', you will need to edit the database name 'tendenci' inside the .env file that is created.

Next, we install requirements for the project. We add tendenci videos as an example to use.

pip install -r requirements/dev.txt

Now we are ready to use our deploy script and setup our theme.

python set_theme salonify

To create your login, run the following command and fill in the prompts:

python createsuperuser

Finally, we can use the runserver command so that we can view the site in our browser:

python runserver

Open in your browser to see your tendenci site!

Optional: You can add additional local environment variables to the .env file by defining them as KEY='value'. Settings that are sensitive (like passwords) or vary per environment should be added to this file. For example, to use Amazon's S3 service as a file storage backend, set the following key/value pairs in your .env file:


Deploying on Heroku

You do not need to be able to run tendenci locally in order to deploy to Heroku. Simply follow the steps below if you do want to load your site on Heroku's server environment.


You need to have a Heroku account:, the heroku toolbelt:, and git: installed. It is also recommended that you have your payment options configured, though all of the settings below allow your site to run for free.

Cloning and pushing to Heroku

For the instructions below, please replace sitename with the name of your site. The name can contain dashes or underscores, but not spaces.

You can now create a new git repo from this code that will be specific to your site. Go to your sitename folder from the terminal and run the following:

git init
heroku create sitename
git add .
git commit -am "initial commit"
git push heroku master

Your site will now be created on Heroku. The first build may take up to 15 minutes due to the initial download of all of the dependencies. Additional updates will not take as long.

Configuring Heroku Addons

Heroku offers several addons: for apps that include Database connections, Memcached caching, email servers, and other useful addons. We will use the database and the Memcached addons in the instructions below.

You can add on the free tier of the memcache addon: by running the following command. This addon is free, but you need to have verified your account to add it:

heroku addons:add memcache:5mb

To configure the database, we must add the database and then promote it as the main database. Database names from Heroku's Postgresql service: follow the pattern HEROKU_POSTGRESQL_COLOR where COLOR is an actual color name like TEAL or ORANGE. This will vary per installation, but we can look this up by running heroku config. The second command below will find the default color name and use it.

To create and configure the database, run the following commands:

heroku addons:add heroku-postgresql:dev
heroku pg:promote `heroku config | grep POSTGRES | cut -d : -f 1`

Setting up the database

Next, we can run the deploy script to populate the database. The theme salonify is used below by default, but you may create a custom theme and set your theme to that themes.

heroku run python
heroku run python set_theme salonify
heroku run python createsuperuser

Configuring static assets

We have two options for static assets: serving them locally and loading from a remote location like Amazon S3:

WARNING - If you use the local storage, any uploaded files may be deleted when you update your site. This is not recommended for a live website. You should setup S3 instead.

To configure S3, set the config options with the following command:

heroku config:set AWS_ACCESS_KEY_ID='MY_ACCESS_KEY'
heroku config:set AWS_STORAGE_BUCKET_NAME='bucket_name'
heroku config:set AWS_LOCATION='new-site-name'

Now, run the following command:

heroku run python collectstatic --noinput

Finally, you can open your site!

heroku open
Something went wrong with that request. Please try again.