This forum is no longer active. Please post your questions to our new community site

Changing the folder where projects are created

Subscribe to Changing the folder where projects are created 4 post(s), 2 voice(s)

Avatar saajjj 4 post(s)

First off thanks to all involved for making this stack, it’s awesome!

I have been working with the stack for a while and everything works as expected (yay).

Recently, I wanted to transfer my project to another location than the default (in Windows7 this is C:\Users\me\BitNami DjangoStack projects)

Specifically, I wanted to switch that to C:\work. The only file where I could find absolute reference to the default project location was in django.wsgi where we see:


import os, sys
sys.path.append(‘C:/Users/me/BitNami DjangoStack projects’)
sys.path.append(‘C:/Users/me/BitNami DjangoStack projects/myproj’)
os.environ[‘DJANGO_SETTINGS_MODULE’] = ‘myproj.settings’

import django.core.handlers.wsgi

application = django.core.handlers.wsgi.WSGIHandler()


I switched the relevant lines above to be like:


But this doesn’t work.

Instead of picking up the django app from the new location, I just get the default Apache document root html file. The one with the ‘click here to view your project’ link.

Can anyone point me in the right direction? I’ve been through the wsgi apache and django docs but can’t seem to figure it out :-/

P.S. I’m using Django 1.3 x64 on Win7

Thanks for any help

Avatar Beltrán Rueda Administrator 3,714 post(s)

Could you try the following workaround?…

Avatar saajjj 4 post(s)

Thanks for your reply Beltran, I had already seen that topic but just went over it again to ensure that I did go through all that was mentioned there.

My issue has been solved and was completely unrelated to the above. What I did was exactly correct.

For other people who may chance upon this thread, my problem was due to how Win7 behaves with its permissions and rights.

My user is part of the Administrator group on the local machine. I use Komodo as my IDE.

I’m not sure how this was happening but although Komodo was saving files. If I opened the same file when running Komodo as an Administrator (right click ‘Run as Administrator), those changes weren’t showing.

I will be making a video of the phenomenom where I open the same file into two differnet instances of Komodo (one started normally and the other started as administrator) and that same file looks different!

I realized this completely by accident when I was checking httpd.conf in Notepad. Further Googling has revealed that Win7 implements various levels of ‘admins’ so, even when you’re a local admin you’re not actually an admin with full rights. This problem only exists if you want to modify files of which the owners are the ‘Administrator’ group.

The same happened with Notepad, with one difference. If I start Notepad normally and try to edit and save httpd.conf, Notepad raises a permission denied error (unlike Komodo). If I start Notepad as an administrator (right click ‘Run as Administrator’), then the same file can be modified without issue.

What’s intriguing to me is how win7 mainatins multiple versions of the same file for different users (in the case of Komodo).

Thanks for your help again.

Avatar Beltrán Rueda Administrator 3,714 post(s)

I’m glad to fixed the issue. Thanks for posting your solution, this will help to other users.