Changes between Version 27 and Version 28 of EggCookingTutorial/BasicEggCooking
- Timestamp:
- Feb 25, 2008, 6:46:20 PM (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
EggCookingTutorial/BasicEggCooking
v27 v28 3 3 = Egg cooking = 4 4 5 Since Trac 0.9 it has been possible to write plugins for Trac to extend Trac functionality. Even better, you can deploy plugins as [http://peak.telecommunity.com/DevCenter/PythonEggs Python eggs] thatreally makes plugin development fun and easy.5 Since Trac 0.9 it has been possible to write plugins for Trac to extend Trac functionality. Even better, you can deploy plugins as [http://peak.telecommunity.com/DevCenter/PythonEggs Python eggs], which really makes plugin development fun and easy. 6 6 7 7 This tutorial shows how to make an egg, and load an egg in Trac. In the advanced parts you'll learn how to serve templates and static content from an egg. … … 89 89 }}} 90 90 91 You will also have to add special [http://peak.telecommunity.com/DevCenter/EggFormats#project-metadata egg metadata] to cater to trac's plugin loader. Create the directory92 ''./TracHelloworld.egg-info'' which corresponds to ''PACKAGE''and edit the file ''trac_plugin.txt'' underneath it, adding the following:91 You will also have to add special [http://peak.telecommunity.com/DevCenter/EggFormats#project-metadata egg metadata] to cater to Trac's plugin loader. Create the directory 92 ''./TracHelloworld.egg-info'', which corresponds to ''PACKAGE'', and edit the file ''trac_plugin.txt'' underneath it, adding the following: 93 93 94 94 {{{ … … 98 98 == First deployment == 99 99 100 Now try to build the plugin. Run the command {{{python setup.py bdist_egg}}} in the directory where you created it. If everything went OK you should have a .egg file in ''./dist'' directory.100 Now try to build the plugin. Run the command {{{python setup.py bdist_egg}}} in the directory where you created it. If everything went OK, you should have a .egg file in ''./dist'' directory. 101 101 102 102 Copy this ''.egg'' file to ''/[your trac env]/plugins'' directory. Restart the trac server. If you're using mod_python you have to restart Apache. 103 103 104 Now you should see ''Hello'' link at far right in main navigation bar when accessing your site. Click it.104 Now you should see ''Hello'' link at far right in the main navigation bar when accessing your site. Click it. 105 105 106 106 == Aftermath == 107 107 108 Now you have successfully created your first egg. You can continue by reading [wiki:EggCookingTutorial/AdvancedEggCooking EggCookingTutorial/AdvancedEggCooking] to learn how to use templates in your plugins, and make its output look like other Trac pages.108 Now that you have successfully created your first egg, you can continue by reading [wiki:EggCookingTutorial/AdvancedEggCooking EggCookingTutorial/AdvancedEggCooking] to learn how to use templates in your plugins, and make its output look like other Trac pages. 109 109 110 110