Commit 77a5c5e8 authored by Alexandre's avatar Alexandre

syntax: documented and cleaned the installation process

parent df3efae4
*.pyc
.vscode
/venv
/env
__pycache__
/_sandbox
......
#United4Earth
# Lobby.tool
Lobby.tool is an open-source tool designed to empower citizens to give them the same lobbying strength than any corporation. Thanks to Lobby.tool, citizens can gather around a common topic of interest and advocate for an agreed upon position to their elected officials.
##Purpose
## Installation
git clone https://git.happy-dev.fr/startinblox/applications/united4earth.git
python3 -m venv env # optional venv
. env/bin/activate # optional venv
pip3 install -r requirements.txt
cp settings_sample.py settings.py
python3 manage.py migrate
python manage.py import_elected
python3 manage.py runserver
##Tech
\ No newline at end of file
......@@ -4,14 +4,15 @@ Django==1.11.20
django-guardian==1.5.0
django-registration-redux==2.5
django-rest-framework==0.1.0
djangoldp==0.5.31
djangoldp-account==0.0.18
djangoldp-conversation==0.0.5
djangorestframework==3.9.1
idna==2.8
pkg-resources==0.0.0
psycopg2==2.7.7
djangoldp==0.5.38
PyLD==1.0.4
pytz==2018.9
requests==2.21.0
urllib3==1.24.1
wheel
"""
Django settings for united4earth project.
Generated by 'django-admin startproject' using Django 1.11.
......@@ -12,30 +8,23 @@ import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
TEMPLATE_DIR = os.path.join(BASE_DIR, 'templates')
STATIC_DIR = os.path.join(PROJECT_ROOT, 'united4earth/static')
STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'static')
STATIC_ROOT = os.path.join(os.path.dirname(os.path.dirname(PROJECT_ROOT)), 'u4e-prod-staticfiles')
STATICFILES_DIRS = [
os.path.join(PROJECT_ROOT, 'static'),
]
MEDIA_ROOT = os.path.join(BASE_DIR, 'media/')
# You can use the this setting for local dev:
# Use the this setting for local dev:
DEBUG = True
SECRET_KEY = 'not-important-here'
SECRET_KEY = '*jtzd25z2f^o&k=w4oy7_alr0_uq0=cs5pch=)355ym5xg&gv_'
ALLOWED_HOSTS = []
SITE_URL = 'http://127.0.0.1:8000/'
# In PRODUCTION environment use your specific settings:
# DEBUG = False
# SECRET_KEY = "choose-a-solid-key-and-do-not-version-it!"
# ALLOWED_HOSTS = ['your-domain']
# SITE_URL = 'your-domain-full-url'
INSTALLED_APPS = [
'data_manager',
'djangoldp',
'djangoldp_conversation',
'guardian',
'registration',
'django.contrib.admin',
......@@ -83,17 +72,6 @@ DATABASES = {
}
}
# In production, better use PostgreSQL:
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
# 'NAME': '???',
# 'USER': '???',
# 'PASSWORD': '???',
# 'HOST': '???',
# 'PORT': '5432',
# }
# }
AUTH_PASSWORD_VALIDATORS = [
{
......@@ -110,7 +88,7 @@ AUTH_PASSWORD_VALIDATORS = [
},
]
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'fr-fr'
TIME_ZONE = 'Europe/Paris'
USE_I18N = True
USE_L10N = True
......@@ -118,6 +96,7 @@ USE_TZ = True
STATIC_URL = '/static/'
LOGIN_URL = '/connexion/'
LOGIN_REDIRECT_URL = '/'
LDP_RDF_CONTEXT = 'https://cdn.happy-dev.fr/owl/hdcontext.jsonld'
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'guardian.backends.ObjectPermissionBackend')
......
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