Commit 614ee23c authored by Mindiell's avatar Mindiell

Cleaning install process

parent 64cf9b13
*.pyc *.pyc
build/
dist/
picampaign.egg-info/
picampaign/settings.py
# virtual environment
ve/
venv/
.venv/
.env/
...@@ -10,6 +10,7 @@ Create a python virtual environment and activate it ...@@ -10,6 +10,7 @@ Create a python virtual environment and activate it
virtualenv .env virtualenv .env
source .env/bin/activate source .env/bin/activate
Install package Install package
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
...@@ -19,14 +20,21 @@ Install package ...@@ -19,14 +20,21 @@ Install package
Configuration Configuration
------------- -------------
Edit **settings.py** according to what type of database you want to use Create **settings.py** from **settings.py.sample** inside the **picampaign** module and edit it:
and others settings related to your environment.
* 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**
Synchronize database Synchronize database
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
./manage.py syncdb ./manage.py syncdb
It will ask for creation of a superuser. It will ask for creation of a superuser.
If syncdb ran previously, commands are: If syncdb ran previously, commands are:
...@@ -34,10 +42,12 @@ If syncdb ran previously, commands are: ...@@ -34,10 +42,12 @@ If syncdb ran previously, commands are:
./manage.py makemigrations ./manage.py makemigrations
./manage.py syncdb ./manage.py syncdb
Run website Run website
~~~~~~~~~~~ ~~~~~~~~~~~
./manage.py runserver ./manage.py runserver
Then open your browser to http://127.0.0.1/admin
Then open your browser to http://127.0.0.1:8000/admin
...@@ -17,12 +17,12 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__)) ...@@ -17,12 +17,12 @@ BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret! # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '@q8%6uzh(bku)zmkl$&*_8m3(!f^rpw+d=&zi7llu=fjps!f_x' SECRET_KEY = 'select a secret key'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = False
TEMPLATE_DEBUG = True TEMPLATE_DEBUG = False
ALLOWED_HOSTS = [] ALLOWED_HOSTS = []
...@@ -69,9 +69,9 @@ DATABASES = { ...@@ -69,9 +69,9 @@ DATABASES = {
# Internationalization # Internationalization
# https://docs.djangoproject.com/en/1.7/topics/i18n/ # https://docs.djangoproject.com/en/1.7/topics/i18n/
LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'fr-FR'
TIME_ZONE = 'UTC' TIME_ZONE = 'Europe/Paris'
USE_I18N = True USE_I18N = True
......
...@@ -3,7 +3,7 @@ import os ...@@ -3,7 +3,7 @@ import os
from setuptools import setup, find_packages from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__)) here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README')).read() README = open(os.path.join(here, 'README.md')).read()
requires = [ requires = [
'django', 'django',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment