from django.conf import settings
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.conf import settings
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
-from django.http import HttpResponse, HttpResponseRedirect, Http404
+from django.http import HttpResponse, HttpResponseRedirect, Http404, HttpResponsePermanentRedirect
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.contrib.auth.decorators import login_required, user_passes_test
from django.core.urlresolvers import reverse
from django.db.models import Q
from django.contrib.auth.decorators import login_required, user_passes_test
raise Http404
except models.Tag.MultipleObjectsReturned, e:
return differentiate_tags(request, e.tags, e.ambiguous_slugs)
raise Http404
except models.Tag.MultipleObjectsReturned, e:
return differentiate_tags(request, e.tags, e.ambiguous_slugs)