0001-misc-unify-context-processors-into-an-extended-one-2.patch
wcs/context_processors.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU General Public License |
15 | 15 |
# along with this program; if not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from quixote import get_publisher, get_response |
|
17 |
from quixote import get_publisher, get_response, get_request
|
|
18 | 18 | |
19 | 19 |
def publisher(request): |
20 |
return {'publisher': get_publisher} |
|
21 | ||
22 |
def response(request): |
|
23 |
return {'response': get_response} |
|
20 |
return {'publisher': get_publisher, |
|
21 |
'response': get_response, |
|
22 |
'user': lambda: get_request() and get_request().user, |
|
23 |
} |
wcs/settings.py | ||
---|---|---|
99 | 99 |
"django.template.context_processors.tz", |
100 | 100 |
"django.contrib.messages.context_processors.messages", |
101 | 101 |
"wcs.context_processors.publisher", |
102 |
"wcs.context_processors.response", |
|
103 | 102 |
], |
104 | 103 |
'loaders': [ |
105 | 104 |
'wcs.utils.TemplateLoader', |
106 |
- |