[Answer]-Django Calendar View โ€“ How to Pass the URL

1๐Ÿ‘

โœ…

I think second argument for url should be either a string representing your function or a function object:

url(r'^calendar/(?P<pk>\d+)/(?P<start__year>\d+)/(?P<start__month>\d+)/$', calendar)

Additionally, when you used named groups in your url (ie. start__year, start_month) they are passed to your view function as kwargs not as positional arguments

def calendar(request, pk, start__year, start__month):
    pass
๐Ÿ‘คdm03514

Leave a comment