mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
[soc2009/admin-ui] The Kaplan-Moss commandeth that thou shalt not allow any ol' anonymous user to make arbitrary queries. And so it was done.
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/admin-ui@11411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
81e8b8bbd5
commit
f1c47d24b1
@ -4,6 +4,7 @@ from django.db.models.query import QuerySet
|
||||
from django.utils.encoding import smart_str
|
||||
from django.http import HttpResponse, HttpResponseNotFound
|
||||
from django.conf import settings
|
||||
from django.contrib.admin.views import staff_member_required
|
||||
|
||||
def foreignkey_autocomplete(request, related_string_functions=None):
|
||||
"""
|
||||
@ -55,4 +56,5 @@ def foreignkey_autocomplete(request, related_string_functions=None):
|
||||
else:
|
||||
data = to_string_function(obj)
|
||||
return HttpResponse(data)
|
||||
return HttpResponseNotFound()
|
||||
return HttpResponseNotFound()
|
||||
foreignkey_autocomplete = staff_member_required(foreignkey_autocomplete)
|
Loading…
x
Reference in New Issue
Block a user