Hello garagefan,
On Nov 18, 7:07 am, garagefan wrote:
> what are our options to grant admin based settings? Obviously a model
> called settings with perhaps it's own admin template to only allow/
> show a single entry into this model/db is possible. But should it
> really warrant an additional database call every time the page is
> loaded to grab the settings(lets ignore caching for the moment)?
Don't discount this method to quickly if you use it with caching.
I've had some success with this technique. Django's contributed Sites
< http://code.djangoproject.com/browser/django/trunk/django/contrib/sites
> application shows a use case. Sites is used extensively in many
projects. From there you can modify the admin for your app to allow
only working with the record that was created at syncdb. This may not
be needed depending on the skill level of your users. Modifying the
admin in this manner is not fully covered in the docs. You will need
to dig around the web and the code for some of the techniques needed
for this type of admin customization.
> How
> about an xml file that is editable by the admin? seems like a valid
> option to have a config.xml associated with a project and to have the
> admin site access to it, i presume a feature like this would require a
> hook into the admin site.
Another technique I've been experimenting with is modifying the
settings.py file for a project from an app then reloading the source
code. Of course you have to have a stack that is setup to use this
technique for this method to work. Apache with Graham Dumpleton's
mod_wsgi can reload source code <
http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode
>.
Toodle-looo
creecode
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.