Changes between Version 1 and Version 2 of EggCookingTutorial/AdvancedEggCooking


Ignore:
Timestamp:
Aug 27, 2005, 5:43:33 PM (19 years ago)
Author:
Christian Boos
Comment:

added syntax highlighting and tagging as tutorial

Legend:

Unmodified
Added
Removed
Modified
  • EggCookingTutorial/AdvancedEggCooking

    v1 v2  
    1616In that directory create new file ''helloworld.cs'':
    1717{{{
     18#!text/html
    1819<?cs include "header.cs" ?>
    1920<?cs include "macros.cs" ?>
     
    3637Line 4 is changed from
    3738{{{
     39#!python
    3840from trac.web.chrome import INavigationContributor
    3941}}}
    4042to
    4143{{{
     44#!python
    4245from trac.web.chrome import INavigationContributor, ITemplateProvider
    4346}}}
     
    4548Line 9 is changed from
    4649{{{
     50#!python
    4751    implements(INavigationContributor, IRequestHandler)
    4852}}}
    4953{{{
     54#!python
    5055    implements(INavigationContributor, IRequestHandler, ITemplateProvider)
    5156}}}
     
    5358Starting from line 23 old ''process_request'' method is replaced by
    5459{{{
     60#!python
    5561    def process_request(self, req):
    5662        return 'helloworld.cs', None
     
    5965And to end of file you need to tell where your template is located
    6066{{{
     67#!python
    6168    # ITemplateProvider methods
    6269    def get_templates_dir(self):
     
    7178Complete version of ''helloworld.py'':
    7279{{{
     80#!python
    7381# Helloworld plugin
    7482
     
    112120So change ''setup.py'' to be like:
    113121{{{
     122#!python
    114123from setuptools import setup
    115124
     
    130139
    131140Now 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