mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-26 16:09:49 +03:00
Merge 86033e5504
into 20f8956c8f
This commit is contained in:
commit
b8f4f77930
|
@ -113,8 +113,8 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
|
||||||
self.headers = {}
|
self.headers = {}
|
||||||
|
|
||||||
# Calls to 'reverse' will not be fully qualified unless we set the scheme/host/port here.
|
# Calls to 'reverse' will not be fully qualified unless we set the scheme/host/port here.
|
||||||
prefix = '%s://%s' % (request.is_secure() and 'https' or 'http', request.get_host())
|
#prefix = '%s://%s' % (request.is_secure() and 'https' or 'http', request.get_host())
|
||||||
set_script_prefix(prefix)
|
#set_script_prefix(prefix)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.initial(request, *args, **kwargs)
|
self.initial(request, *args, **kwargs)
|
||||||
|
@ -156,7 +156,10 @@ class View(ResourceMixin, RequestMixin, ResponseMixin, AuthMixin, DjangoView):
|
||||||
# merge with headers possibly set at some point in the view
|
# merge with headers possibly set at some point in the view
|
||||||
response.headers.update(self.headers)
|
response.headers.update(self.headers)
|
||||||
|
|
||||||
return self.render(response)
|
result = self.render(response)
|
||||||
|
#set_script_prefix("/")
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
class ModelView(View):
|
class ModelView(View):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user