Changeset 6030 for main


Ignore:
Timestamp:
9 May 2011, 10:33:52 (14 years ago)
Author:
Henrik Bettermann
Message:

Use default page templates also in other subpackages.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/layout.py

    r6028 r6030  
    11"""Basic layout components.
    22"""
     3import os
    34import grok
     5import grokcore.view
    46from hurry.resource import mode
    57from megrok.layout import Page, Layout, EditForm, DisplayForm, AddForm
     
    1820
    1921grok.templatedir('templates')
     22default_waeup_display_template = grokcore.view.PageTemplateFile(
     23    os.path.join('templates', 'default_waeup_display_form.pt'))
     24default_waeup_display_template.__grok_name__ = 'default_waeup_display_form'
     25
     26default_waeup_edit_template = grokcore.view.PageTemplateFile(
     27    os.path.join('templates', 'default_waeup_edit_form.pt'))
     28default_waeup_edit_template.__grok_name__ = 'default_waeup_edit_form'
     29
    2030
    2131def NullValidator(*args, **kw):
     
    8494    """
    8595    grok.baseclass()
    86     grok.template('default_waeup_display_form')
     96    template = default_waeup_display_template
    8797
    8898class WAeUPEditFormPage(EditForm, UtilityView):
     
    90100    """
    91101    grok.baseclass()
    92     grok.template('default_waeup_edit_form')
     102    template = default_waeup_edit_template
    93103   
    94104    def setUpWidgets(self,ignore_request=False):
Note: See TracChangeset for help on using the changeset viewer.