471,350 Members | 1,633 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

Import error in django

9
Hi... I am using python 2.5.1 with django .97 pre. I am trying to have a page from the url config
(r'^users/', include('dbp.users.views.show')),

I have my view as

from django.http import HttpResponse
def show(request):
return HttpResponse("some thing here.")

on trying to access the page using url http://localhost:8000/users/ I get the error

ImportError at /users/
No module named show
Request Method: GET
Request URL: http://localhost:8000/users/
Exception Type: ImportError
Exception Value: No module named show

On commenting the line return...... , the error changes to
IndentationError at /users/
expected an indented block (views.py, line 6)
Request Method: GET
Request URL: http://localhost:8000/users/
Exception Type: IndentationError
Exception Value: expected an indented block (views.py, line 6)

Plz help. Thanks alot.
Sep 5 '07 #1
0 1122

Post your reply

Sign in to post your reply or Sign up for a free account.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.