Skip to content

Commit

Permalink
Support Django 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Simen Heggestøyl committed Jun 1, 2017
1 parent 1f8178f commit 3d2262b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions taggit_autocomplete_jqueryui/views.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
from django.db.models.loading import cache

from django.apps import apps
from django.http import HttpResponse
from django.utils.datastructures import MultiValueDictKeyError

Expand All @@ -8,7 +9,7 @@

def tag_list_view(request):
app_label, model_class = TAGGIT_AUTOCOMPLETE_TAG_MODEL.split('.')
Tag = cache.get_model(app_label, model_class)
Tag = apps.get_model(app_label, model_class)
try:
tags = (Tag.objects.
filter(name__istartswith=request.GET['term']).
Expand Down

0 comments on commit 3d2262b

Please sign in to comment.