Changes between Version 5 and Version 6 of DeveloperGuidelines/Templates/CustomPages
- Timestamp:
- 06/24/12 12:38:55 (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DeveloperGuidelines/Templates/CustomPages
v5 v6 38 38 * If a custom View template is passed in from the Template folder then this will need to be provided as a File not a String to work in compiled mode: 39 39 {{{ 40 import os 40 from os import path 41 41 from gluon import current 42 42 response = current.response 43 path = os.path.join(current.request.folder, "private", "templates",44 43 view = path.join(current.request.folder, "private", "templates", 44 response.s3.theme, "views", "index.html") 45 45 try: 46 46 # Pass view as file not str to work in compiled mode 47 response.view = open( path, "rb")47 response.view = open(view, "rb") 48 48 except IOError: 49 49 from gluon.http import HTTP 50 raise HTTP("404", "Unable to open Custom View: %s" % path)50 raise HTTP("404", "Unable to open Custom View: %s" % view) 51 51 }}} 52 52 == Custom Page ==