#55 Allow optional extra installed apps

Fermé
jocelyn veut fusionner 3 commits à partir de jocelyn/jd-editable-installed-apps vers FFDN/master
2 fichiers modifiés avec 26 ajouts et 5 suppressions
  1. 23 4
      README.md
  2. 3 1
      coin/settings.py

+ 23 - 4
README.md

@@ -81,10 +81,6 @@ settings:
     echo '# -*- coding: utf-8 -*-' > coin/settings_local.py
     echo 'DEBUG = TEMPLATE_DEBUG = True' >> coin/settings_local.py
 
-If you don't want to use LDAP, just set in your `settings_local.py`:
-
-    LDAP_ACTIVATE = False
-
 See the end of this README for a reference of available configuration settings.
 
 Database
@@ -243,11 +239,34 @@ Then  make a copy of the template file (and customize it) at
 
 Good to go :-)
 
+Using optional apps
+-------------------
+
+Some apps are not enabled by default :
+
+- *coin.vpn*: Management of VPN subscription and credentials
+
+You can enable them using the `EXTRA_INSTALLED_APPS` setting. Ex:
+
+    EXTRA_INSTALLED_APPS = (
+        coin.vpn',
+    ]
+
+If you enable an extra-app after initial installation, make sure to sync database :
+
+    ./manage.py migrate
+
+*nb: extra apps are loaded after the builtin apps.*
+
+
 Settings
 ========
 
 List of available settings in your `settings_local.py` file.
 
+- `EXTRA_INSTALLED_APPS`: See *Customizing app list*
+- `EXTRA_TEMPLATE_DIRS`: See *Customizing templates*
+- `LDAP_ACTIVATE`: See *LDAP*
 - `MEMBER_MEMBERSHIP_INFO_URL`: Link to a page with information on how to become a member or pay the membership fee
 
 More information

+ 3 - 1
coin/settings.py

@@ -162,11 +162,12 @@ INSTALLED_APPS = (
     'coin.resources',
     'coin.reverse_dns',
     'coin.configuration',
-    'coin.vpn',
     'coin.isp_database',
     'simple_dsl'
 )
 
+EXTRA_INSTALLED_APPS = tuple()
+
 # A sample logging configuration. The only tangible logging
 # performed by this configuration is to send an email to
 # the site admins on every HTTP 500 error when DEBUG=False.
@@ -254,3 +255,4 @@ except ImportError:
     pass
 
 TEMPLATE_DIRS = EXTRA_TEMPLATE_DIRS + TEMPLATE_DIRS
+INSTALLED_APPS = INSTALLED_APPS + EXTRA_INSTALLED_APPS