Thursday, March 27, 2014

Re: wsgi does not work as intended even it works fine when python runserver

Are you seeing any error messages ?

On Saturday, 22 March 2014 11:07:32 UTC+2, Jun Tanaka wrote:

wsgi does not work as usually even it works fine when python runserver 
I use django version 1.3

I have two issues here.
1. how to add projectname inside of the url
2.static is not connected right

this works.

But not when
The layout is not shown correctly because static file is not read. 

django.wsgi as follows
import os, sys

os.environ['DJANGO_SETTINGS_MODULE'] = 'projectname.settings'

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

static in
    # Put strings here, like "/home/html/static" or "C:/www/django/static".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
urlpatterns = patterns('',
    (r'^simple_project/add/(?P<status>\w*)$', 'simple_project.views.index'),

Anyone who know a solution please giver me an advise. 

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment