Re: dbsettings, and user configurable app settings

2010-03-11 Thread jens
This was the initial question: On Feb 26, 8:11 am, Jared Forsyth wrote: > I have been looking around for a way of managing user-configurable > application settings In this discussion we must IMHO different between "low-level settings", "admin configurable settings" and "user configurable settin

Re: dbsettings, and user configurable app settings

2010-03-11 Thread Tom Evans
On Wed, Mar 10, 2010 at 6:31 PM, Matt Boersma wrote: > On Wed, Mar 10, 2010 at 7:51 AM, Brian Rosner wrote: >> >> On Mar 10, 2010, at 7:16 AM, Joan Miller wrote: >> >>> It's a disaster from the maintenance view point. If it were not so, >>> then people would not be proposing to refactor the setti

Re: dbsettings, and user configurable app settings

2010-03-11 Thread Gustavo Narea
I'd suggest using PasteDeploy: http://packages.python.org/twod.wsgi/manual/paste-factory.html I can't see a reason to reinvent the wheel with a Django-specific thing, while this widely used method is rock-solid. It's the one used in frameworks like Pylons and TurboGears, On Feb 26, 7:11 am, Jared

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Matt Boersma
On Wed, Mar 10, 2010 at 7:51 AM, Brian Rosner wrote: > > On Mar 10, 2010, at 7:16 AM, Joan Miller wrote: > >> It's a disaster from the maintenance view point. If it were not so, >> then people would not be proposing to refactor the settings as has >> been made in Pinax, or from multiple posts so m

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Jared Forsyth
As far as a solution that "magically solves everyone's problem nicely", that's what django-appsettingsis trying to be :). It handles quite nicely the issues of scoping and maintainability that you discussed, organizing everything in a pythonic manner.

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Brian Rosner
On Mar 10, 2010, at 7:16 AM, Joan Miller wrote: > It's a disaster from the maintenance view point. If it were not so, > then people would not be proposing to refactor the settings as has > been made in Pinax, or from multiple posts so many times. Like I mentioned in the post you made to the pina

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Russell Keith-Magee
On Wed, Mar 10, 2010 at 10:16 PM, Joan Miller wrote: > It's a disaster from the maintenance view point. If it were not so, > then people would not be proposing to refactor the settings as has > been made in Pinax, or from multiple posts so many times. > > This is nothing new. Many people dislikes

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Chuck Harmston
1) In implementation, how is a YAML configuration file any different than the Java/XML example that you offered? Syntactical differences between XML and YAML aside, both systems define settings in markup languages (which by definition have minimal capability for logic) that are eventually parsed (b

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Gary Reynolds
I really don't see how your YAML file is any more maintainable than Django's settings.py approach? If anything, I would argue that it is less maintainable, as you would have to maintain not only your YAML files moving forward, but also the code which transposes it into a settings.py. On Wed, Mar 1

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Joan Miller
It's a disaster from the maintenance view point. If it were not so, then people would not be proposing to refactor the settings as has been made in Pinax, or from multiple posts so many times. This is nothing new. Many people dislikes that kind of configuration, of the same that many people hates

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Russell Keith-Magee
On Wed, Mar 10, 2010 at 6:18 PM, Joan Miller wrote: > Whatever configuration system using variables of a language is a > disaster and it's going not maintainable as has been showed in Django. That's a pretty wild assertion to make without any evidence, and it's completely contrary to my personal

Re: dbsettings, and user configurable app settings

2010-03-10 Thread Joan Miller
Whatever configuration system using variables of a language is a disaster and it's going not maintainable as has been showed in Django. My solution was to use YAML, and then to use a class to convert it to Python. Features: * The python configuration is only re-built if yaml config. has been chan

Re: dbsettings, and user configurable app settings

2010-03-09 Thread stuff4ash
a) is probably what i would personally leave in settings.py, or in a conf/settings.py MEDIA_URL, projectname, etc... a bit behind on a project, ill take a look at appsettings this weekend :) On Mar 7, 12:03 am, Jared Forsyth wrote: > It seems like the best place for "project settings"(a) would b

Re: dbsettings, and user configurable app settings

2010-03-06 Thread Jared Forsyth
It seems like the best place for "project settings"(a) would be applicable is through some ./manage.py command, perhaps "installapps" or something along those lines. This would probably be the place to do database modifications between versions. (b) could be served by a "readonly" flag in the setti

Re: dbsettings, and user configurable app settings

2010-03-06 Thread stuff4ash
Sorry Carl, I agree with pretty much everything you said. I was talking a bit too abstract and I had misunderstood. I will concentrate on a few use cases: with a app level settings.py file i didnt really refer to automatic import, as that can easily be done now. I had more like a admin.register in

Re: dbsettings, and user configurable app settings

2010-03-03 Thread Jared Forsyth
I think there are some settings which are for the developer, and some which are appropriate for an admin user, who is not necessarily the developer, to have access to. In addition, there are some settings which should be modifiable without necessitating a server restart. There is value in having co

Re: dbsettings, and user configurable app settings

2010-03-03 Thread orokusaki
I don't think that settings are for users. They are for the developer. The type of settings you are looking for really should be set up as part of your application. Users can't choose a DB password or your server's time zone, or which apps are installed. If you're creating an SAAS you'd be better t

Re: dbsettings, and user configurable app settings

2010-03-03 Thread jedie
For PyLucid i have made http://code.google.com/p/django-dbpreferences/ """ A django app defines a form with initial values. The form cleaned data dict would be stored serialized into the database. The app can easy get the current preference dict and the user can easy edit the values in the django

Re: dbsettings, and user configurable app settings

2010-03-02 Thread Jared Forsyth
I'm currently working on a solution to this which I call appsettings, and I think it addresses many of the concerns raised here. appsettings loads your module's settings.py in much the same way that contrib.admin loads your admin.py, and you call appsettings.register (can be used as a decorator) to

Re: dbsettings, and user configurable app settings

2010-03-02 Thread Carl Meyer
On Mar 1, 9:40 am, stuff4ash wrote: > I am not necesary advocating magic. But the need for a more robust (or > lets say, any) configuration management exists for many. "Configuration management" is a fuzzy phrase that can mean many things to many people. I think it'd be more helpful to focus on s

Re: dbsettings, and user configurable app settings

2010-03-01 Thread stuff4ash
> I've never understood the desire for more magical behavior here. My > apps have a settings.py that imports django.conf.settings and provides > any necessary defaults for unset settings; the rest of my app imports > from there. Works great, easy to look and see what settings my app > consumes and

Re: dbsettings, and user configurable app settings

2010-02-28 Thread Carl Meyer
On Feb 27, 1:53 pm, stuff4ash wrote: > b) easy way to register, override, configurations for apps. > a settings.py in an app folder that is "magically" loaded the same way > other things are would suffice, but there has to be a way to: I've never understood the desire for more magical behavior

Re: dbsettings, and user configurable app settings

2010-02-27 Thread chris.moff...@gmail.com
We use something called livesettings in Satchmo. Bruce has published the code on bitbucket so it can be used outside of Satchmo. I believe at one point it was a fork of dbsettings but I may be wrong on that account. Check it out here - http://bitbucket.org/bkroeze/django-livesettings/overview/ An

Re: dbsettings, and user configurable app settings

2010-02-27 Thread stuff4ash
have been hitting my head trying to come up with a better way of managing configs. I've worked with quite a lot of other systems, and one thing i like about django is how "simple" it "still" is. this simplicity is a strength, and having a registry makes things.. complicated. some wild ideas I hav

Re: dbsettings, and user configurable app settings

2010-02-26 Thread Jared Forsyth
If you look at dbsettings (which again, might be dead - i don't know) it solves a lot of those problems; settings are tied into the "sites" module, and are presented to the user in a very friendly way. The problem of db migration is still there, but I can envision an import/export to XML (or someth

Re: dbsettings, and user configurable app settings

2010-02-26 Thread Wes Winham
I'd love to see a better way of managing settings in the core of django. It's a real pain point sometimes for writing and using pluggable applications and there's a wide range of ways that application developers try to tackle it. Some have basically no settings, some plan on users reading the docum