Django 1.2 won't run my view -


i'm getting 404 django server though it's aware of view code. if purposely misspelled name of view function, django complains, know it's looking in right place , aware of function.

my urls.py entry looks this

url(r"^pdfgen/$", 'apps.pdfgen.views.pdfgen'), 

and view code this

def pdfgen(request):     html = "<html><body>this test.</body></html>"     return httpresponse(html) 

so why django 404's when visit localhost:xxxx/pdfgen/ ?

if purposely misspelled name of view function, django complains, know it's looking in right place , aware of function.

that doesn't mean request hitting correct view - means django can't load url conf when include views don't exist. sure django running view think is, need add logging or print statements view, or raise exception in it.

update question include url patterns. request matching view further up, returning 404.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -