misc: unify context processors into an extended one (#23856)

This commit is contained in:
Frédéric Péters 2018-05-16 11:01:43 +02:00
parent c298493c4b
commit 771dec087b
2 changed files with 5 additions and 6 deletions

View File

@ -14,10 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
from quixote import get_publisher, get_response
from quixote import get_publisher, get_response, get_request
def publisher(request):
return {'publisher': get_publisher}
def response(request):
return {'response': get_response}
return {'publisher': get_publisher,
'response': get_response,
'user': lambda: get_request() and get_request().user,
}

View File

@ -99,7 +99,6 @@ TEMPLATES = [
"django.template.context_processors.tz",
"django.contrib.messages.context_processors.messages",
"wcs.context_processors.publisher",
"wcs.context_processors.response",
],
'loaders': [
'wcs.utils.TemplateLoader',