On 14/02/2011 9:37am, vivek_12315 wrote:
Hello all,
while coding for views in django, i feel the need of generating files,
more like logs. But i want all those logs to be generated in a
specific directory.
So, can I use my settings.py file for defining such a location of dir.
and in views files' i can refer to that settings value some how ?
Is there a way for this ? Does settings.py allow only standard
settings to be defined ?
Yes then no.
Create a setting for your log location and then *anywhere* in your code
just import that setting.
You could say 'from settings import LOG_DIR' or if you are already doing
'from django.conf import settings' then you can use settings.LOG_DIR
--
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
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.