On Jun 3, 9:16 am, vishy <vishalsod...@gmail.com> wrote: > Hi, > > I am developing an application on windows. I decided to upload it on > webfaction n see how deployment goes. The issues I faced was with > paths given - > 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
Jarek has shown you one way to do it, by having separate local settings files. Another way is to set the template path dynamically in settings.py: import os.path OUR_ROOT = os.path.dirname(os.path.realpath(__file__)) TEMPLATE_DIRS = ( os.path.realpath(os.path.join(OUR_ROOT, 'templates')), ) I prefer this way as it means you don't depend on files that aren't in version control - although you might still use the local settings trick to override other settings, like database name/path. -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---