README.md 1.26 KB
Newer Older
1 2 3 4 5 6
Campaign Manager for PiPhone project
====================================

Installation
------------

7 8
### Create a python virtual environment and activate it

9 10 11 12

    virtualenv .env
    source .env/bin/activate

Mindiell's avatar
Mindiell committed
13

14
### Install package
15

Mindiell's avatar
Mindiell committed
16 17
For production:

18 19
    python setup.py install

Mindiell's avatar
Mindiell committed
20 21 22 23 24 25
For development:

    python setup.py develop



26 27 28 29

Configuration
-------------

Mindiell's avatar
Mindiell committed
30 31 32 33 34 35 36 37
Create **settings.py** from **settings.py.sample** inside the **picampaign** module and edit it:

 * modify the value of **SECRET_KEY**
 * set database configuration according to what type of database you want to use
 * according to your localization, adjust **LANGUAGE_CODE** and **TIME_ZONE**
 * in production environment, set **DEBUG** value to **False**
 * in production environment, set **TEMPLATE_DEBUG** value to **False**
 
38

39
### Synchronize database
40

okhin's avatar
okhin committed
41
    ./manage.py migrate
42

Mindiell's avatar
Mindiell committed
43

okhin's avatar
okhin committed
44
If migrate ran previously, commands are:
45 46

    ./manage.py makemigrations
okhin's avatar
okhin committed
47
    ./manage.py migrate
48

49 50 51
To create a superuser, run:

    ./manage.py createsuperuser
Mindiell's avatar
Mindiell committed
52

53
### Run website
54 55 56

    ./manage.py runserver

Mindiell's avatar
Mindiell committed
57 58

Then open your browser to http://127.0.0.1:8000/admin
59

okhin's avatar
okhin committed
60 61 62 63 64 65

Documentation
-------------

The campaign API is self-documented via [drfdocs](https://github.com/manosim/django-rest-framework-docs)
and it is available at the url /docs/ of your instance.