mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Added two docstrings
This commit is contained in:
@@ -60,6 +60,12 @@ class MultiDomainMiddleware:
|
|||||||
|
|
||||||
|
|
||||||
class SessionMiddleware(BaseSessionMiddleware):
|
class SessionMiddleware(BaseSessionMiddleware):
|
||||||
|
"""
|
||||||
|
We override the default implementation from django because we need to handle
|
||||||
|
cookie domains differently depending on whether we are on the main domain or
|
||||||
|
a custom domain.
|
||||||
|
"""
|
||||||
|
|
||||||
def process_response(self, request, response):
|
def process_response(self, request, response):
|
||||||
try:
|
try:
|
||||||
accessed = request.session.accessed
|
accessed = request.session.accessed
|
||||||
@@ -98,6 +104,12 @@ class SessionMiddleware(BaseSessionMiddleware):
|
|||||||
|
|
||||||
|
|
||||||
class CsrfViewMiddleware(BaseCsrfMiddleware):
|
class CsrfViewMiddleware(BaseCsrfMiddleware):
|
||||||
|
"""
|
||||||
|
We override the default implementation from django because we need to handle
|
||||||
|
cookie domains differently depending on whether we are on the main domain or
|
||||||
|
a custom domain.
|
||||||
|
"""
|
||||||
|
|
||||||
def process_response(self, request, response):
|
def process_response(self, request, response):
|
||||||
if getattr(response, 'csrf_processing_done', False):
|
if getattr(response, 'csrf_processing_done', False):
|
||||||
return response
|
return response
|
||||||
|
|||||||
Reference in New Issue
Block a user