Agreed.

The settings/local.py main purpose is to be able to create an automatic 
SECRET_KEY to increase security otherwise most users use the default 
SECRET_KEY.

There is too much disparity better the PyPI and the local Git installation 
methods. Perhaps a startproject like management command for Mayan would be 
better than a post_install from setup.py as it would be available to both 
installation methods.

On Tuesday, July 15, 2014 11:39:13 AM UTC-4, Mathias Behrle wrote:
>
> * Devin Ceartas: " Re: [Mayan EDMS: 733] How do Settings Work?" (Tue, 15 
> Jul 
>   2014 08:14:06 -0700 (PDT)): 
>
> > On Tuesday, July 15, 2014 10:00:28 AM UTC, Mathias Behrle wrote: 
> > > 
> > > * Devin Ceartas: " [Mayan EDMS: 731] How do Settings Work?" (Mon, 14 
> Jul 
> > > 2014 
> > >   14:24:19 -0700 (PDT)): 
> > > 
> > > > I'm afraid I'm going to have a number of ignorant questions as I 
> plow 
> > > into 
> > > > Mayan -- I have never worked with Django before, and am relatively 
> new 
> > > to 
> > > > Python, though I am anything but new to programming in general. 
> > > > 
> > > > It looks like there is some system of cascading .ini type .py files 
> > > which 
> > > > are parsed as settings files, and that Mayan has a long list of them 
> it 
> > > > adds on top of Django, documented 
> > > > at http://mayan.readthedocs.org/en/latest/topics/settings.html 
> > > > 
> > > > I see in the setup documentation, toward the end of the 
> > > > page https://mayan.readthedocs.org/en/latest/intro/installation.html 
> a 
> > > > mention of creating my own settings file. I presume this is one I 
> would 
> > > > create to layer on top of the others with my local modifications and 
> > > > additions? The format seems relatively clear, such as adding: 
> > > > *WEB_THEME_VERBOSE_LOGIN = False* 
> > > > 
> > > > If I follow the docs here: 
> > > > https://docs.djangoproject.com/en/dev/topics/settings/ it looks 
> like I 
> > > need 
> > > > to add something to my wsgi setup to indicate where to find the 
> > > settings, 
> > > > and in mayan/wsgi.py I find the line: 
> > > > os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mayan.settings") 
> > > > 
> > > > but I can't find any file named "mayan.settings". 
> > > 
> > > You find the file location and how to call it under Production use at 
> > > https://mayan.readthedocs.org/en/latest/intro/installation.html 
> > > 
> > > > Should there be one or do 
> > > > I only need one when I want to override defaults? 
> > > 
> > > The start command to use (bin/mayan-edms.py) refers to the local.py 
> file, 
> > > which 
> > > itself imports base.py containing all default settings. When running 
> from 
> > > defaults you don't need any additional configuration file at all. 
> > > 
> > > > Where should it be 
> > > > placed? Am I missing any other piece of this puzzle? 
> > > 
> > > Please look at the link above and feel free to ask again, if it 
> doesn't 
> > > solve 
> > > your problem. 
> > > 
> > > Cheers, 
> > > Mathias 
> > 
> > 
> > 
> > So far I'm more confused. I never ran bin/mayan-edms.py but the app is 
> > running fine 
>
> How do you start the app? 
>
> > -- the documentation for that command talks about creating 
> > folders etc. but those already exist, they came with what I cloned in 
> Git 
> > from the project. I added a line to local.py but that doesn't seem to 
> > effect anything. 
>
> Cloning and running from git is different than installing from pypi. 
>
> When you have *installed* the package via 
>
> $ pip install mayan-edms==1.0.rc1 
>
> or some comparable command, then the configuration files in use are under 
>
> venv/lib/python2.7/site-packages/mayan/settings/ (provided you used a 
> virtualenv as recommended and described). 
>
> Probably you want also to adapt wsgi.py 
> (venv/lib/python2.7/site-packages/mayan/) to use the configuration file of 
> your 
> choice. 
>
> @Roberto: I think it should point by default to the same configuration as 
> mayan-edms.py: 
>
> os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mayan.settings.local") 
>
> ? 
>
>
>
> -- 
>
>     Mathias Behrle 
>     PGP/GnuPG key availabable from any keyserver, ID: 0x8405BBF6 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to