Thank you in advance for helping a beginning django user. I'm getting an unexpected exception that is pointing me towards the urlresolvers.py file. It confuses me. I read a couple of other posts with a similar error (specifically "HttpResponse' object has no attribute 'rindex'") but the solution there seemed to be to not use version .95. I'm using .96 and I'm wondering what I'm doing wrong with my code. My traceback looks like this:
Traceback (most recent call last): File "C:\Python25\lib\site-packages\django\core\handlers\base.py" in get_response 68. callback, callback_args, callback_kwargs = resolver.resolve(request.path) File "C:\Python25\lib\site-packages\django\core\urlresolvers.py" in resolve 162. sub_match = pattern.resolve(new_path) File "C:\Python25\lib\site-packages\django\core\urlresolvers.py" in resolve 118. return self.callback, args, kwargs File "C:\Python25\lib\site-packages\django\core\urlresolvers.py" in _get_callback 123. mod_name, func_name = get_mod_func(self._callback_str) File "C:\Python25\lib\site-packages\django\core\urlresolvers.py" in get_mod_func 25. dot = callback.rindex('.') AttributeError at /calendar/ 'HttpResponse' object has no attribute 'rindex' My urls.py looks like this (I'm just getting started on this project.) from django.conf.urls.defaults import * from theremnant.eventcalendar.views import upcomingEvents urlpatterns = patterns('', # Example: # (r'^theremnant/', include('theremnant.foo.urls')), (r'^calendar/', upcomingEvents()), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), ) I'm pretty sure that the problem is in there, probably in the import statement. but I've compared it to the django docs for .96 and the Lost-theories source and it seems to fit the style. I am sorry if posting this view code is too much. I don't think it's necessary, but I thought it'd be better to give too much information. from django.shortcuts import render_to_response import datetime from theremnant.eventcalendar.models import Event def upcomingEvents(): janEvents = Event.objects.filter(start_DateTime__month = 1) febEvents = Event.objects.filter(start_DateTime__month = 2) marEvents = Event.objects.filter(start_DateTime__month = 3) aprEvents = Event.objects.filter(start_DateTime__month = 4) mayEvents = Event.objects.filter(start_DateTime__month = 5) junEvents = Event.objects.filter(start_DateTime__month = 6) julEvents = Event.objects.filter(start_DateTime__month = 7) augEvents = Event.objects.filter(start_DateTime__month = 8) sepEvents = Event.objects.filter(start_DateTime__month = 9) octEvents = Event.objects.filter(start_DateTime__month = 10) novEvents = Event.objects.filter(start_DateTime__month = 11) decEvents = Event.objects.filter(start_DateTime__month = 12) eventsByMonth = {'january':janEvents, 'february':febEvents, 'march':marEvents, 'april':aprEvents, 'may':mayEvents, 'june':junEvents, 'july':julEvents, 'august':augEvents, 'september':sepEvents, 'october':octEvents, 'november':novEvents, 'december':novEvents} return render_to_response('calendar.html', eventsByMonth) Thanks for your help. Ryan Vanasse --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---