return redirect("url", arg=True)
from django.views.generic import RedirectView
from django.urls import reverse
from django.utils.http import urlencode
class SomeRedirectView(RedirectView):
def get_redirect_url(self, **kwargs):
query_dict = {'allowed': True}
return f'{reverse("index")}?{urlencode(query_dict)}'