Hi, For relative paths, os.path module will do the trick - it is platform independent. Use os.path's ``join``/``split`` methods and ``sep`` attribute. If you are depending on absolute paths (which probably for both platforms would just differ) you may simply call platform.system() and write a switch doing the magic depending on what you got.
By the way, having two different files may not be that bad. On the other hand, settings module for django is just a python module and as so, you may make any magic tricks you want. You may even consider splitting settings or establishing 'ini' file. Be sure to check wiki at http://code.djangoproject.com/wiki/SplitSettings - there is nice write up about settings module. Good luck. On Dec 24, 2009, at 11:25 PM, Benjamin Welton wrote: > Hey all, > > Im fairly new to django and iv got a quick question on what the > proper way to set up a django web application is when in a cross > platform deployment environment (such as setting up paths, ect). Im > currently using the Apache wsgi -> django connector on both > environments. Im thinking that one way i could do this would be to have > two separate wsgi files load the proper paths and just tell apache to > use the wsgi file for that particular platform (still leaves and issue > with the settings.py file however). > > I'm sure that other people have come across this issue and im > curious on what the proper way to set up django for cross platform use > is (without having to keep multiple platform specific files that need to > be swapped in and out). > > Ben > > > > -- > > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@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. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.