Wiadomość napisana w dniu 2009-06-03, o godz. 10:16, przez vishy: > 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?
You can use separate settings files for development and deployment, this is the way most people do deployment-specific configurations. For example, you can have main settings module that imports all names from settings_deployment and settings_local, witch catched ImportError exceptions, like: <settings.py> try: from settings_deployment import * except ImportError: # not a prod environment pass try: from settings_local import * except ImportError: # no local specific modifications pass Putting these imports at the bottom of settings.py will cause the values will be overwritten with imported ones. -- Artificial intelligence stands no chance against natural stupidity Jarek Zgoda, R&D, Redefine jarek.zg...@redefine.pl --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---