URL-parameters and logic in Django class-based views (TemplateView)

To access the url parameters in class based views, use self.args or self.kwargs so you would access it by doing self.kwargs['year']

Leave a Comment