Hey All,

Been trying to modify the settings.py file through admin using
something along the lines of:

settings.py file:
----------------------
from config.models import SiteSetting
........
........
config= SiteSetting.objects.get(pk=1)
TIME_ZONE = config.timezone
----------------------

'config' is the app I created to control the settings values (for
example, timezone). This is failing and trowing a 'cannot import
gettext' error on the development server, which leads me to believe
you cannot modify the settings.py file? Or am I doing something wrong?

I know my model is correct and if I comment out my setting.py code
above, it syncdbs fine, runs in admin and is editable. So I guess my
question to you all is how can I modify the settings.py file, if at
all?

One other related question, how can I make a model that only has one
entity so i don't need to run:
SiteSetting.objects.get(pk=1)
but can run
SiteSetting.timezone
instead? Is it possible? Is there a better way around this?

Thanks for any help you can offer!

Cheers,
Dana
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to