Changes between Version 3 and Version 4 of DeveloperGuidelines/Templates/Migration


Ignore:
Timestamp:
01/05/15 09:12:01 (10 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Templates/Migration

    v3 v4  
    131131It is therefore recommended to migrate all templates. Follow the steps above and/or ask for support on our mailing list to migrate your templates.
    132132
     133== Importing Template Modules ==
     134
     135If you have template-specific modules inside your template folder, you can import them in config.py like in any other Python package, e.g.:
     136
     137{{{
     138from controllers import index
     139}}}
     140
     141Be careful with name collisions, though - ideally, module names like "gluon.py" or "s3.py" should be avoided inside templates. If there is an unresolvable name collision, make sure you are explicit about the import path for outside modules.
     142
     143To import shared modules from other templates, use the template-path, e.g.:
     144
     145{{{
     146from templates.SSF.controllers import subscriptions
     147}}}
     148