Changes between Version 1 and Version 2 of EggCookingTutorial/AdvancedEggCooking
- Timestamp:
- Aug 27, 2005, 5:43:33 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EggCookingTutorial/AdvancedEggCooking
v1 v2 16 16 In that directory create new file ''helloworld.cs'': 17 17 {{{ 18 #!text/html 18 19 <?cs include "header.cs" ?> 19 20 <?cs include "macros.cs" ?> … … 36 37 Line 4 is changed from 37 38 {{{ 39 #!python 38 40 from trac.web.chrome import INavigationContributor 39 41 }}} 40 42 to 41 43 {{{ 44 #!python 42 45 from trac.web.chrome import INavigationContributor, ITemplateProvider 43 46 }}} … … 45 48 Line 9 is changed from 46 49 {{{ 50 #!python 47 51 implements(INavigationContributor, IRequestHandler) 48 52 }}} 49 53 {{{ 54 #!python 50 55 implements(INavigationContributor, IRequestHandler, ITemplateProvider) 51 56 }}} … … 53 58 Starting from line 23 old ''process_request'' method is replaced by 54 59 {{{ 60 #!python 55 61 def process_request(self, req): 56 62 return 'helloworld.cs', None … … 59 65 And to end of file you need to tell where your template is located 60 66 {{{ 67 #!python 61 68 # ITemplateProvider methods 62 69 def get_templates_dir(self): … … 71 78 Complete version of ''helloworld.py'': 72 79 {{{ 80 #!python 73 81 # Helloworld plugin 74 82 … … 112 120 So change ''setup.py'' to be like: 113 121 {{{ 122 #!python 114 123 from setuptools import setup 115 124 … … 130 139 131 140 Now you have added basic template for your plugin let's add final twist, put some static content like own stylesheet and one image. Continue to [wiki:EggCookingTutorial/AdvancedEggCooking2 EggCookingTutorial/AdvancedEggCooking2] 141 142 143 [[TagIt(tutorial)]] 144