Update django version in requirements.txt
[pgweb/local.git] / dep / django-selectable / selectable / views.py
blob5d8ef623f7c5fd40e4a1ac65daa20991b2459d10
1 from __future__ import unicode_literals
3 from django.http import Http404
5 from selectable.registry import registry
8 def get_lookup(request, lookup_name):
10 lookup_cls = registry.get(lookup_name)
11 if lookup_cls is None:
12 raise Http404('Lookup %s not found' % lookup_name)
14 lookup = lookup_cls()
15 return lookup.results(request)