diff --git a/example/date_views/views.py b/example/date_views/views.py index 60e13f4..37b6279 100644 --- a/example/date_views/views.py +++ b/example/date_views/views.py @@ -40,6 +40,12 @@ class MyDayArchiveView(BuildableDayArchiveView): class MyDetailView(BuildableDetailView): queryset = Dateline.objects.all() + def set_kwargs(self, obj): + self.kwargs = { + 'state_slug': obj.state_slug, + 'city_slug': obj.city_slug, + } + def get_object(self, queryset=None): return self.queryset.get( state_slug=self.kwargs['state_slug'], diff --git a/example/project/settings.py b/example/project/settings.py index 67662e7..62c371f 100644 --- a/example/project/settings.py +++ b/example/project/settings.py @@ -128,6 +128,7 @@ 'date_views.views.MyYearArchiveView', 'date_views.views.MyMonthArchiveView', 'date_views.views.MyDayArchiveView', + 'date_views.views.MyDetailView', ) BUILD_DIR = os.path.join(BASE_DIR, '.build/') STATIC_ROOT = os.path.join(BASE_DIR, '.static/')