Yes, I did that, but for some reason, it is still not working, here's the contents of my views.py: from django.http import HttpResponse from django.shortcuts import render_to_response import datetime
def hello(request): return HttpResponse("Hello world") def search_form(request): return render_to_response('search_form.html') def current_datetime(request): now = datetime.datetime.now() html = "<html><body>It is now %s.</body></html>" % now return HttpResponse(html) Does order matter when I am importing? On May 2, 7:28 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Sun, May 2, 2010 at 10:17 PM, kelp <kelp...@gmail.com> wrote: > > Hello, > > Thanks! That fixed the problem, but now I am getting another one. I am > > getting an AttributeError now: > >http://dpaste.com/190232/ > > Before the url pattern that references views.search_form, the book mentions > adding: > > from django.shortcuts import render_to_response > > def search_form(request): > return render_to_response('search_form.html') > > to your views.py code. Did you do that? > > > This shows up even when I access localhost:8000/hello/ or basically > > anything I have set up in urls.py > > Yes, it would. All of your url patterns must be valid in order for any of > them to be used. If there is an error processing any of your url patterns > (as there is now, since it appears the search_form view doe snot exist in > views.py) it will be reflected on any attempt to evaluate your url pattern > configuration. > > Karen > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.