Skip to content

Commit 00d3dd1

Browse files
eliasfankGreyZmeem
authored andcommitted
Fix url for multiple sites support
Resolve #101 I'm also working with multiple sites and my solution was to use the name of the site according to the admin_site of the class. This way it could make the app more dynamic and without any negative effects.
1 parent 5d790f9 commit 00d3dd1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

djangoql/admin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ def get_urls(self):
166166
return custom_urls + super(DjangoQLSearchMixin, self).get_urls()
167167

168168
def introspect(self, request):
169-
suggestions_url = reverse('admin:%s_%s_djangoql_suggestions' % (
169+
suggestions_url = reverse('%s:%s_%s_djangoql_suggestions' % (
170+
self.admin_site.name,
170171
self.model._meta.app_label,
171172
self.model._meta.model_name,
172173
))

0 commit comments

Comments
 (0)