Show
Ignore:
Timestamp:
07/07/09 14:14:23 (3 years ago)
Author:
nazar
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plesonet_admin/trunk/templatetags/plesonet_admin_tags.py

    r43 r56  
    22from django import template 
    33from django.utils.translation import ugettext_lazy as _ 
    4 from plesonet_admin.admin_settings import * 
    54from django.conf import settings  
    65 
     
    2322        #build new list 
    2423        groups = [] 
    25         for g in ADMIN_GROUPS: 
     24        for g in settings.ADMIN_GROUPS: 
    2625            gmod = [] 
    2726            for m in g['models']: 
     
    6463    def render(self, context): 
    6564        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']() 
    6769        except NameError: 
    6870            context['custom_actions'] = []