First you have to clone this repository and all its submodules:
git clone email@example.com:EuroPython/djep.git cd djep
Next create a virtualenv and install all the requirments into it. In this example we are using virtualenvwrapper to manage the virtualenv:
This repository provides requirements and configurations for various environments. Each environment (dev, staging and production) has its own requirements.txt.
For local development, install the requirements specified in requirements/dev.txt:
pip install -r requirements/dev.txt
Now that this is complete, you can optionally change some settings. To get an overview of what settings are available, take a look at the pyconde.settings module.
We are using django-configurations to manage all settings and try to expose all relevant settings as environment variables. By default you will probably want to set following variables:
If you want to use a different database system than PostgreSQL and a different
database than "djep", set the
DJANGO_DATABASE_URL environment variable.
You can find some examples in the dj-database-url
Another environment variable you absolutely have to set is
Note that this value should be constant for your local installation.
Everything should be in place now to initialize the database.
Make sure you have redis up and running. Otherwise Django won't start due to a missing connection to the cache. See Development section below for details.
If you want to use SQLite be warned that there are some issues with the migration steps done for some of django-cms' plugins. Therefore you will most likely have to run this:
python manage.py syncdb --noinput --migrate
If you want to use PostgreSQL (which is also used in production for this site), alter the DATABASES section of your pyconde/settings.py accordingly and then run following command:
python manage.py syncdb --noinput --migrate
After this is done, you should already have a working site, but it is still empty. To change that you can load a fixture with initial data by running:
python manage.py loaddata fixtures/europython2014/initial01.json python manage.py loaddata fixtures/europython2014/initial02.json
You can login as user admin with password admin
Or you create an admin user in order to gain access to the admin panel:
python manage.py createsuperuser
This will prompt a couple of questions you have to fill out.
Be aware that no user profile is created for this superuser as this is normally done during the registration process. Thus every access from a user instance to its profile will fail.
After this is complete, start the development-server on port 8000 with:
python manage.py runserver
Right now this project doesn't come with compiled css files but relies on Grunt and Compass to generate them. To install them, run the following commands. They will also install all the requirements those tools rely on:
gem install --user-install compass npm install cd pyconde/skins/ep14/static/assets && ../../../../../node_modules/bower/bin/bower install
During development you will need a dummy mail server and other services that are usually run system-wide in production. To help you keep all these services under control the project provides a sample Procfile which you can use with foreman or honcho:
$ foreman start
$ honcho start
However, the minimum is a running Redis server to get the project running. It is sufficient to simply launch the server before using the manage.py CLI:
If you have Vagrant and VirtualBox installed, you can also use the provided Vagrantfile to start a virtual machine with all the non-Python requirements already installed:
$ vagrant up
Once the virtual machine is running and you've ssh'd into it, you are already in a virtualenv into which you can install the Python-requirements:
$ cd /vagrant $ npm install $ pip install -r requirements/dev.txt
With this step also comes honcho which you can then start with
start which starts the dev server on port 8000 which is exposed to port 8080
on your local host machine.
Note that you will need a filled database before this provides you a working system. PostgreSQL is already available and running inside the virtual machine.
live: fab -c live.ini upgrade staging: fab -c staging.ini upgrade
Parts of this project are based on work by the Symposion/Pinax team. Apps originating in Symposion are:
Other 3rd-party components
This repository also contains various icons created by Paul Robert Lloyd. Every site using this component must either indicate this in the footer or in the imprint.