This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
portail-citoyen2/README

54 lines
1.8 KiB
Plaintext

How to start
============
To work on portail-citoyen2 just execute the following lines (command
to launch start with $, other lines are expected output)::
$ ./start.sh
The application is now usable at http://localhost:8000/
On subsequent runs, do:
$ ./run.sh
Using with authentic2 as a source of social accounts
----------------------------------------------------
Install authentic2 and authentic2-idp-oauth2, then set the AUTHENTIC2_URL
environment variable to the URL of the homepage of authentic2.
On Authentic2 you must create an A2Client object on
http://authentic/admin/authentic2_idp_oauth2/a2client/add/ with the following settings:
URL: http://localhost:8000/
Redirect URL: http://localhost:8000/accounts/authentic2/login/callback/
Client type: confidential
authentic2 will generate a client id and a client secret for you.
On portail-citoyen2 you must create a SocialApp object using the client id and
client secret your generated in authentic2 on:
http://localhost:8000/admin/socialaccount/socialapp/add/
Settings
--------
Settings can be passed using a local_settings.py file or the shell
environment. Dictionaries are passed by flattening the variable name and the
dictionnary key separated by an underscore character. For example to passe the
variable MAIN_SITE_URL in templates, define the following environment
variable::
export PORTAIL_CITOYEN_TEMPLATE_VARS_MAIN_SITE_URL=https://main-site.com/
Those variables must be prefixed with PORTAIL_CITOYEN_ when set in a
local_settings.py file or in the environment.
Name Description
================================ ============================================
TEMPLATE_VARS dictionnary of variables passed to templates
PORTAIL_ADMIN_URL URL of the global administration portal