|
|
|
|
@ -406,9 +406,16 @@ class ConferenceDetail(ObjectStatMixin, JitterCacheMixin, MetadataMixin, DetailV |
|
|
|
|
slug = self.kwargs.get(self.slug_url_kwarg, None) |
|
|
|
|
try: |
|
|
|
|
city = City.objects.get(old_url=slug) |
|
|
|
|
return HttpResponseRedirect('/conference/city/%s/'%city.url) |
|
|
|
|
except City.DoesNotExist: |
|
|
|
|
return super(ConferenceDetail, self).dispatch(request, *args, **kwargs) |
|
|
|
|
# return HttpResponseRedirect('/conference/city/%s/'%city.url) |
|
|
|
|
# except City.DoesNotExist: |
|
|
|
|
# return super(ConferenceDetail, self).dispatch(request, *args, **kwargs) |
|
|
|
|
if city: |
|
|
|
|
return HttpResponseRedirect('/conference/city/%s/'%city.url) |
|
|
|
|
except Exception: |
|
|
|
|
try: |
|
|
|
|
return super(ConferenceDetail, self).dispatch(request, *args, **kwargs) |
|
|
|
|
except: |
|
|
|
|
raise Http404('NotFound') |
|
|
|
|
|
|
|
|
|
def get_context_data(self, **kwargs): |
|
|
|
|
context = super(ConferenceDetail, self).get_context_data(**kwargs) |
|
|
|
|
|