Re: NoReverseMatch

2017-04-28 Thread Will Holmes
Hey, Traceback: == ERROR: test_event_view (cal.tests.EventsTestCase) -- Traceback (most recent call last): File "/Users/williamholmes/organiser/organis

NoReverseMatch

2017-04-28 Thread Will Holmes
Hey all, Can anyone tell me the (probably quite obvious) reason my reverse match isn't working? Template: Url: url(r'^events/(\d+)/delete_event$', views.delete_event, name='delete_event'), View: def delete_event(request, id): Events.objects.filter(id=id).delete() return redirect(

Re: Using Django with groupby

2017-04-21 Thread Will Holmes
return_dict: return_dict[event.start_date.day].append(event) else: return_dict[event.start_date.day] = [event] return return_dict On Thursday, April 20, 2017 at 4:35:36 PM UTC+1, Will Holmes wrote: > > Hi guys, > > > I

Using Django with groupby

2017-04-20 Thread Will Holmes
Hi guys, I am using django to develop a calendar web app where users can create events that are then displayed on a month by month view. I have written a custom template tag that takes Python's HTMLCalendar formatmonth function and overlays events that are on that day. It is currently se

Re: NoReverseMatch when trying to use get_absolute_url with custom template tag

2017-03-30 Thread Will Holmes
Oh yeah i see. Brilliant sorted it! Thanks for your help Melvyn. -- 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 django-users+unsubscr...@googlegroups.com. To p

NoReverseMatch when trying to use get_absolute_url with custom template tag

2017-03-29 Thread Will Holmes
I am making a calendar app which has a custom template tag that takes the python HTML template function and overlays objects from the Events model on the correct days. I am trying to get the displayed objects to have a link directly to an object detail/edit view and am trying to use get_absol