root/branches/pluggable-contents/common/context_processors.py

Revision 37, 439 bytes (checked in by nobu, 1 year ago)

fixed #13 テーマの切り替えを実装。

Line 
1 # vim: encoding=utf-8 :
2
3 from django.conf import settings
4 from django.contrib.sites.models import Site
5
6
7 def site(request):
8     current_site = Site.objects.get_current()
9     return {
10         'SITE_NAME': current_site.name,
11         'SITE_DOMAIN': current_site.domain,
12     }
13
14 def path_info(request):
15     return {
16         'PATH_INFO': request.path,
17     }
18
19 def theme(request):
20     return {
21         'DESIGN_THEME': settings.DESIGN_THEME,
22     }
Note: See TracBrowser for help on using the browser.