magic-removal: Changed get_list_or_404 to take the model class, not the magic model module
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a56ba15f73
commit
2478533c82
|
@ -17,8 +17,8 @@ def get_object_or_404(klass, **kwargs):
|
|||
except klass.DoesNotExist:
|
||||
raise Http404
|
||||
|
||||
def get_list_or_404(mod, **kwargs):
|
||||
obj_list = mod.get_list(**kwargs)
|
||||
def get_list_or_404(klass, **kwargs):
|
||||
obj_list = klass._default_manager.get_list(**kwargs)
|
||||
if not obj_list:
|
||||
raise Http404
|
||||
return obj_list
|
||||
|
|
Loading…
Reference in New Issue