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

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

Mindiell's avatar
Mindiell committed
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

Mindiell's avatar
Mindiell committed
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

Mindiell's avatar
Mindiell committed
39
### Synchronize database
40

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

Mindiell's avatar
Mindiell committed
43

44
45
It will ask for creation of a superuser.

okhin's avatar
okhin committed
46
If migrate ran previously, commands are:
47
48

    ./manage.py makemigrations
okhin's avatar
okhin committed
49
    ./manage.py migrate
50

Mindiell's avatar
Mindiell committed
51

Mindiell's avatar
Mindiell committed
52
### Run website
53
54
55

    ./manage.py runserver

Mindiell's avatar
Mindiell committed
56
57

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