Skip to content

Commit

Permalink
Fix url for multiple sites support
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
eliasfank authored and GreyZmeem committed Dec 7, 2023
1 parent 5d790f9 commit 00d3dd1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion djangoql/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ def get_urls(self):
return custom_urls + super(DjangoQLSearchMixin, self).get_urls()

def introspect(self, request):
suggestions_url = reverse('admin:%s_%s_djangoql_suggestions' % (
suggestions_url = reverse('%s:%s_%s_djangoql_suggestions' % (
self.admin_site.name,
self.model._meta.app_label,
self.model._meta.model_name,
))
Expand Down

0 comments on commit 00d3dd1

Please sign in to comment.