Hello,
I use pudge for a small site and would like to apply some slight
modifications.
I am not very familar with python / pudge, thus I can in the same time
produce some documentation which is suitable for newcomers.
Below I have placed some questions into a pudge template. Your answers
will help me to save time, which I can invest to modify code and produce
documentation.
Any comments are welcome!
-
Pudge template:
<?python
activate python.
import pudge
activate pudge from within python
def initialize(t):
what is "t"?
e.g. instance of which class?
represents what? (e.g. this html template?)
g = t.generator
the generator object (pudge/generator.py - Class Generator)
if not hasattr(t, 'title'):
t.title = 'Untitled'
t.doc_title = g.index_document['title']
t.home_url = g.organization_url or g.blog_url or g.trac_url
t.home_title = g.organization
t.page_item = 'page_item'
use the generator object to create variables (attributes), which are
used later below.
?>
<html xmlns="http://www.w3.org/1999/xhtml"
Meaning of "xmlns"
Which pudge-source-code processes this (could not find "xmlns" within
sources)?
xmlns:py="http://purl.org/kid/ns#"
meaning o xmlns:py?
location within pudge source-codes
py:def="layout">
meaning of "py:def"?
location within pudge source-codes
<head>
<title>${title}</title>
${title}, as assigned above to "t.title" with the python code.
<link rel="stylesheet" type="text/css" href="layout.css"/>
standard style sheet tag
<link py:if="generator.syndication_url"
rel="alternate"
type="application/rss+xml"
title="RSS 2.0" href="${generator.syndication_url}"/>
Which pudge-source-code processes this (could not find "xmlns" within
sources)?
meaning of "py:if"?
location within pudge source-codes?
.
--
http://lazaridis.com
_______________________________________________
Pudge mailing list
[email protected]
http://lesscode.org/mailman/listinfo/pudge