Hi Robert,
In those cases a HTTP 404 is the right response, to help Search Engines realise that such a URL doesn’t exist and to show users a "Page Not Found" message. To create a nice looking 404 response for users just write a view to handle it and add the “handler404” entry to your root URLConf module (the one near the settings.py module).
Adding something like this to urls.py:
handler404 = ‘views.http404_handler’
And creating that view in the corresponding views.py module:
from django.http import HttpResponseNotFound
from django.template import loader, RequestContext
def http404_handler(request):
t = loader.get_template("404.html")
return HttpResponseNotFound(
t.render(RequestContext(request, {'request_path': request.path})))
Also create the template 404.html in your templates directory.
Good luck,
Daniel