Location of settings.py

38 views
Skip to first unread message

sdc50

unread,
May 30, 2017, 1:25:34 PM5/30/17
to Tethys Platform
I'm in the process of updating the production installation instructions to be compatible with the new installation script. This includes adding some gen commands to the cli to generate the needed server configuration files. In the process I've started wondering why we put the settings.py file in tethys_apps. It looks like the gen command doesn't enforce that it be in tethys_apps, but the manage.py file sets an environmental variable telling it to look there by default. Is there a good reason for it being in tethys_apps that I'm forgetting, or was a just what seemed best at the time? It seems like tethys_portal would be a better location, or even better just the top level module along side setup.py. If there isn't a great reason for keeping it in tethys_apps then I propose the following:

  1. We move the default location of the settings.py file to be at the top level module of Tethys (i.e. along side setup.py). This includes: 
    • Changing where manage.py looks for settings.py by default
    • Add a default location to where settings.py is generated

Shawn Crawley

unread,
May 30, 2017, 1:39:51 PM5/30/17
to sdc50, Tethys Platform
+1

--
You received this message because you are subscribed to the Google Groups "Tethys Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tethysplatfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tethysplatform/007c3029-eb35-4d75-b270-1215c696f3fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Norm Jones

unread,
Jun 15, 2017, 11:16:08 AM6/15/17
to Tethys Platform
Sounds like a good idea, Scott.

Scott Christensen

unread,
Jun 15, 2017, 11:20:22 AM6/15/17
to Norm Jones, Tethys Platform
I was playing around with this, but it looks like the settings.py file has to be inside a module so that it is importable. In the current dev version of Tethys I've moved it to the tethys_portal module. We could create a simlink to it in the top level directory. I'm not sure if that is worth doing automatically, or just allow users to set that up themselves if they want it.

On Thu, Jun 15, 2017 at 10:16 AM Norm Jones <njon...@gmail.com> wrote:
Sounds like a good idea, Scott.

--
You received this message because you are subscribed to the Google Groups "Tethys Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tethysplatfor...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Scott D. Christensen, PhD
Research Civil Engineer
Information Technology Laboratory  
US Army Corps of Engineers
 
Reply all
Reply to author
Forward
0 new messages