Getting started

You need to have a version of Albatross which has the Albatross Forms support included (or have installed it by hand yourself). You can quickly test whether it is present by running:

$ python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from albatross.ext import form

If it's missing, you'll see an import error.

Adding the <alx-form> tag

In each Albatross application, there is a point at which an instance of App (or a subclass thereof) is created, usually in or app.cgi or wherever the main entry point of the application is. This instance needs to be told about the new tag. That's done in code that looks something like this:

   1 from albatross.ext import form
   2 ...
   4 if __name__ == '__main__':
   5     app = App()
   6     for tag_class in form.tag_classes:
   7         app.register_tagclasses(tag_class)

None: Getting_started (last edited 2011-02-15 06:05:18 by localhost)