Hello everyone!
I was wondering what technique people use to return pretty pages with
410 status code (ResponseGone) since search engines keep coming back
for removed pages that return 404. I currently use something like
this, but maybe someone has come up with a nicer shortcut or
implementation:
# skipping imports
try:
stuff = Stuff.objects.get(slug=stuff_slug)
except:
t = loader.get_template('410.html')
return HttpResponseGone(t.render(Context()))
Thanks.
--
Metin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---