Changes between Version 2 and Version 3 of EggCookingTutorial/AdvancedEggCooking2
- Timestamp:
- Aug 27, 2005, 5:46:28 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EggCookingTutorial/AdvancedEggCooking2
v2 v3 22 22 Create ''helloworld.css'' in ''./helloworld-plugin/helloworld/htdocs/css/'': 23 23 {{{ 24 #!text/css 24 25 div.helloworld h1 { 25 26 color: red; … … 41 42 Modify ''setup.py'' to include our static data: 42 43 {{{ 44 #!python 43 45 from setuptools import setup 44 46 … … 57 59 Add static data path to end of our plugin in file ''helloworld.py'': 58 60 {{{ 61 #!python 59 62 def get_htdocs_dir(self): 60 63 """ … … 70 73 To make Trac to load our stylesheet you need to modify ''process_request'' method starting from line 23 to following: 71 74 {{{ 75 #!python 72 76 def process_request(self, req): 73 77 add_stylesheet(req, 'css/helloworld.css') … … 81 85 Our new ''helloworld.cs'': 82 86 {{{ 87 #!text/html 83 88 <?cs include "header.cs" ?> 84 89 <?cs include "macros.cs" ?> … … 101 106 102 107 Now you have successfully completed nice simple plugin that uses it's own template and servers some static data. 108 109 110 [[TagIt(tutorial)]]