Setting the profile from booktype.env or settings/
  • Vote Up0Vote Down Daniel JamesDaniel James
    Posts: 844Member, Sourcefabric Team

    I noticed that instance-name/settings/ contains the setting:

    PROFILE_ACTIVE = 'dev'

    however booktype.env also contains a similar setting:


    If the two settings are different, which setting takes precedence in the case of an instance served by Apache?



    Post edited by Daniel James at 2015-03-16 13:11:44
  • 1 Comment sorted by
  • Hi Daniel,

    DJANGO_SETTINGS_MODULE is used by Django to read the correct settings file. That is the most important configuration setting. You can find it also in and 

    For Apache entry point is file, so whatever is defined to be settings there will be important for Apache. Celery workers (built in server, and other management commands used to setup the instance) are started by, so whatever is defined there is important for them.

    On the other hand PROFILE_ACTIVE is something which is needed if users wants to have some different logic in templates (or code) for different profiles. For instance, on the development machine (or same instance which has switched profiles for a moment) you don't communicate with certain API and on the production machine you do. Things like that. Only custom modifications will use this so it has 0 impact on Apache and other servises.