On Jun 3, 1:16 am, vishy <vishalsod...@gmail.com> wrote: > for templates - I had given absolute path of directory on windows, > for database(using sqlite) - just the name.But, for deployment I had > to change both the paths. Is there any way which I can avoid this? > > thanks
Another method is to sniff the hostname: from socket import gethostname PRODUCTION = gethostname() in ('server_name',) if PRODUCTION: # set production paths here else: # set development paths here --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---