views:

82

answers:

3

I have a django project that runs on a Linux server, and I've been working on it both on Linux and OS X. I've noticed that some of the pages are a bit off, to put it politely, in Internet Explorer, and so I checked out the subversion repository on Windows and tried to run a local server.

My media directory has symbolic links to all of the media from each different app, and obviously Windows doesn't know what to do with them. I could simply hard-copy or link everything manually in Windows, but then I wouldn't be able to check that in (since the site runs on a Linux server), so it'd be a pain in the neck.

What is typically done in this case?

A: 

Set up a configuration using httpd and mod_wsgi that has appropriate Alias directives for the static media.

Ignacio Vazquez-Abrams
But when I run the app locally, I'm just using `python manage.py runserver`, which doesn't use Apache (unless I'm misunderstanding you)
Jesse Beder
It is possible to run httpd locally. A Win32 version does exist.
Ignacio Vazquez-Abrams
A: 

you could also add some static.serve links in your urls.py for debugging purpose :

if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^static/(?P<path>.*)/?$', 'django.views.static.serve', {'document_root':settings.MEDIA_ROOT, 'show_indexes':True})
)

quicker than setting up apache+friends on win32.

jujule
I'm actually doing this for testing locally, even on Linux or OS X - but I still use the main media directory as the target, which contains all the symbolic links.
Jesse Beder
yes. so you can'copy' these links to urls.py format
jujule
A: 

Instead, of running a server on Windows just to test for IE, you can run a server from on an IP that identifies your machine on your network. Just run

python manage.py runserver ad.dr.re.ss:8000

To find the (local) address of your machine, access your router logs to see who's connected (I'm sure there's a better way, but this worked for me).

Jesse Beder