Added two docstrings

This commit is contained in:
Raphael Michel
2015-11-09 21:14:20 +01:00
parent 6c9e8ae3a7
commit e51029f9f7

View File

@@ -60,6 +60,12 @@ class MultiDomainMiddleware:
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):
try:
accessed = request.session.accessed
@@ -98,6 +104,12 @@ class SessionMiddleware(BaseSessionMiddleware):
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):
if getattr(response, 'csrf_processing_done', False):
return response