Changeset 1064

Show
Ignore:
Timestamp:
07/26/06 16:43:00 (2 years ago)
Author:
mgood
Message:

AccountManagerPlugin:

make sure templates are loadable when LoginModule is the only component enabled

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • accountmanagerplugin/0.9/acct_mgr/web_ui.py

    r1047 r1064  
    175175class LoginModule(auth.LoginModule): 
    176176 
     177    implements(ITemplateProvider) 
     178 
    177179    def authenticate(self, req): 
    178180        if req.method == 'POST' and req.path_info.startswith('/login'): 
     
    221223    enabled = property(enabled) 
    222224 
     225    # ITemplateProvider 
     226     
     227    def get_htdocs_dirs(self): 
     228        """Return the absolute path of a directory containing additional 
     229        static resources (such as images, style sheets, etc). 
     230        """ 
     231        return [] 
     232 
     233    def get_templates_dirs(self): 
     234        """Return the absolute path of the directory containing the provided 
     235        ClearSilver templates. 
     236        """ 
     237        from pkg_resources import resource_filename 
     238        return [resource_filename(__name__, 'templates')] 
     239 
  • accountmanagerplugin/trunk/acct_mgr/web_ui.py

    r1047 r1064  
    175175class LoginModule(auth.LoginModule): 
    176176 
     177    implements(ITemplateProvider) 
     178 
    177179    def authenticate(self, req): 
    178180        if req.method == 'POST' and req.path_info.startswith('/login'): 
     
    221223    enabled = property(enabled) 
    222224 
     225    # ITemplateProvider 
     226     
     227    def get_htdocs_dirs(self): 
     228        """Return the absolute path of a directory containing additional 
     229        static resources (such as images, style sheets, etc). 
     230        """ 
     231        return [] 
     232 
     233    def get_templates_dirs(self): 
     234        """Return the absolute path of the directory containing the provided 
     235        ClearSilver templates. 
     236        """ 
     237        from pkg_resources import resource_filename 
     238        return [resource_filename(__name__, 'templates')] 
     239