# or per-calendar-view basis.
#url(r'^%s/(?P<slug>[\w-]+)' % self.location_permalink_base, ...)
- if self.tag_archive_page:
+ if self.tag_archive_page_id:
urlpatterns += patterns('',
url(r'^%s$' % self.tag_permalink_base, self.tag_archive_view, name='tag_archive')
)
- if self.owner_archive_page:
+ if self.owner_archive_page_id:
urlpatterns += patterns('',
url(r'^%s$' % self.owner_permalink_base, self.owner_archive_view, name='owner_archive')
)
- if self.location_archive_page:
+ if self.location_archive_page_id:
urlpatterns += patterns('',
url(r'^%s$' % self.location_permalink_base, self.location_archive_view, name='location_archive')
)
def get_events_by_location(self, request, app_label, model, pk, extra_context=None):
try:
- ct = ContentType.objects.get(app_label=app_label, model=model)
+ ct = ContentType.objects.get_by_natural_key(app_label, model)
location = ct.model_class()._default_manager.get(pk=pk)
except ObjectDoesNotExist:
raise Http404