diff options
author | Sean Finney <seanius@debian.org> | 2008-06-11 01:05:17 +0200 |
---|---|---|
committer | Sean Finney <seanius@debian.org> | 2008-06-11 01:05:17 +0200 |
commit | 6a70f64a3cac69d9d6dc8346ad845db07f6c1dc5 (patch) | |
tree | 6d9a50f32d7f89b51cadb688d81e7b8578905a08 /patchtracker | |
parent | 90b32ea02cd73f90f66b9d0698cc6f71a6f77125 (diff) | |
download | patch-tracker-6a70f64a3cac69d9d6dc8346ad845db07f6c1dc5.tar.gz |
initial stab at cgi-based patch generation
complete with many ugly hacks to workaround the lack
of an underlying database. hopefully it's all marked
with XXX for later fixing :)
does not cover all patch cases, in fact currently it only
covers series patch viewing and downloading.
Diffstat (limited to 'patchtracker')
-rw-r--r-- | patchtracker/Patch.py | 2 | ||||
-rwxr-xr-x | patchtracker/Writers.py | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/patchtracker/Patch.py b/patchtracker/Patch.py index 64cf9c9..2f604e1 100644 --- a/patchtracker/Patch.py +++ b/patchtracker/Patch.py @@ -54,7 +54,7 @@ class PatchSeries (list): continue # here's the name name = stuff[0] - print "\t\t\t%s: %s"%(self.style,name) + #print "\t\t\t%s: %s"%(self.style,name) self.names.append(name) # anything else are either patch args or comments self.patchargs[name] = [] diff --git a/patchtracker/Writers.py b/patchtracker/Writers.py index 74dd95d..9b6ded4 100755 --- a/patchtracker/Writers.py +++ b/patchtracker/Writers.py @@ -58,6 +58,17 @@ class LetterTocTemplate(OurTemplate): tpl = os.sep.join([Conf.template_dir, "letter_toc.tmpl"]) OurTemplate.__init__(self, file=tpl) +class ErrorTemplate(OurTemplate): + def __init__(self, msg): + tpl = os.sep.join([Conf.template_dir, "cgi_error.tmpl"]) + OurTemplate.__init__(self, file=tpl, searchList={'error':msg}) + +class PatchTemplate(OurTemplate): + def __init__(self, pkg=None, vers=None, name=None, patch=None): + tpl = os.sep.join([Conf.template_dir, "patch_view.tmpl"]) + sl = {'package':pkg, 'version':vers, 'name':name, 'patch':str(patch)} + OurTemplate.__init__(self, file=tpl, searchList=sl) + class PageWriter: def __init__(self, filename, template): try: |