Changeset 56
- Timestamp:
- 07/07/09 14:14:23 (3 years ago)
- Location:
- plesonet_admin/trunk
- Files:
-
- 2 modified
-
admin_settings.py (modified) (1 diff)
-
templatetags/plesonet_admin_tags.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plesonet_admin/trunk/admin_settings.py
r53 r56 82 82 ] 83 83 84 A CTIONS = [ {'url': reverse('catalogue_import'),85 'name':_('Import catalogue'),},86 {'url': reverse('renovation_service_import'),87 'name':_('Import calculator'),},88 {'url': reverse('do_rss_import'),89 'name':_('RSS Import'),},90 {'url': reverse('do_send_subscription'),91 'name':_('Send subscription'),},92 ]84 ADMIN_ACTIONS = [ {'url': reverse('catalogue_import'), 85 'name':_('Import catalogue'),}, 86 {'url': reverse('renovation_service_import'), 87 'name':_('Import calculator'),}, 88 {'url': reverse('do_rss_import'), 89 'name':_('RSS Import'),}, 90 {'url': reverse('do_send_subscription'), 91 'name':_('Send subscription'),}, 92 ] 93 93 94 94 -
plesonet_admin/trunk/templatetags/plesonet_admin_tags.py
r43 r56 2 2 from django import template 3 3 from django.utils.translation import ugettext_lazy as _ 4 from plesonet_admin.admin_settings import *5 4 from django.conf import settings 6 5 … … 23 22 #build new list 24 23 groups = [] 25 for g in ADMIN_GROUPS:24 for g in settings.ADMIN_GROUPS: 26 25 gmod = [] 27 26 for m in g['models']: … … 64 63 def render(self, context): 65 64 try: 66 context['custom_actions'] = ACTIONS 65 context['custom_actions'] = settings.ADMIN_ACTIONS 66 for ca in context['custom_actions']: 67 if callable(ca['url']): 68 ca['url'] = ca['url']() 67 69 except NameError: 68 70 context['custom_actions'] = []

