Changes between Version 10 and Version 11 of EggCookingTutorial/BasicEggCooking


Ignore:
Timestamp:
Oct 1, 2005, 12:41:15 AM (19 years ago)
Author:
muness
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • EggCookingTutorial/BasicEggCooking

    v10 v11  
    2626== Main plugin ==
    2727
    28 First step is to generate main module for this plugin. We will construct simple plugin that will display "Hello world!" on screen when accessed through /helloworld URL. Plugin also provides "Hello" button that is by default rendered on far right in main navigation bar.
     28The first step is to generate the main module for this plugin. We will construct a simple plugin that will display "Hello world!" on the screen when accessed through /helloworld URL. The plugin also provides a "Hello" button that is, by default, rendered on the far right in the main navigation bar.
    2929
    3030So create ''helloworld.py'' in ''./helloworld-plugin/helloworld/'':
     
    6161}}}
    6262
    63 == Make it as a module ==
     63== Make it a module ==
    6464
    65 Since this is not enough, we need to make our simple plugin as a module. To do so, you simply create that magic ''_''____''_init_''____''_.py'' into ''./helloworld-plugin/helloworld/'':
     65To make the plugin a module, you simply create that magic ''_''____''_init_''____''_.py'' in ''./helloworld-plugin/helloworld/'':
    6666{{{
    6767#!python
     
    7070}}}
    7171
    72 == Make it as an egg ==
     72== Make it an egg ==
    7373
    74 Now it's time to make it as an egg. For that we need a chicken called ''setup.py'' that is created into ''./helloworld-plugin/'':
     74Now it's time to make it an egg. For that we need a chicken called ''setup.py'' in ''./helloworld-plugin/'':
    7575{{{
    7676#!python
     
    8383}}}
    8484
    85 To make egg loadable in Trac we need to create one file more. in ''./helloworld-plugin/!TracHelloworld.egg-info/'' create file ''trac_plugin.txt'':
     85To make the egg loadable in Trac we need to create one more file. In ''./helloworld-plugin/!TracHelloworld.egg-info/'' create the file ''trac_plugin.txt'':
    8686{{{
    8787helloworld
     
    9090== First deployment ==
    9191
    92 Now you could try to build your first plugin. Run command {{{python setup.py bdist_egg}}} in directory where you created it. If everthing went OK you should have small .egg file in ''./dist'' directory.
     92Now try to build the plugin. Run the command {{{python setup.py bdist_egg}}} in the directory where you created it. If everthing went OK you should have a .egg file in ''./dist'' directory.
    9393
    9494Copy this ''.egg'' file to ''/[your trac env]/plugins'' directory. If you're using mod_python you have to restart Apache.
     
    9898== Aftermath ==
    9999
    100 Now you have successfully created your first egg. You can continue now reading [wiki:EggCookingTutorial/AdvancedEggCooking EggCookingTutorial/AdvancedEggCooking] to really integrate plugin into Trac layout.
    101 
     100Now you have successfully created your first egg. You can continue by reading [wiki:EggCookingTutorial/AdvancedEggCooking EggCookingTutorial/AdvancedEggCooking] to learn how to use Trac templates.