From 6a70f64a3cac69d9d6dc8346ad845db07f6c1dc5 Mon Sep 17 00:00:00 2001 From: Sean Finney Date: Wed, 11 Jun 2008 01:05:17 +0200 Subject: 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. --- templates/cgi_error.tmpl | 12 ++++++++++++ templates/patch_view.tmpl | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 templates/cgi_error.tmpl create mode 100644 templates/patch_view.tmpl (limited to 'templates') diff --git a/templates/cgi_error.tmpl b/templates/cgi_error.tmpl new file mode 100644 index 0000000..6b39f2e --- /dev/null +++ b/templates/cgi_error.tmpl @@ -0,0 +1,12 @@ +#import templates +#extends templates.skeleton +#from cgi import escape +#def title +Oh noes! Error! +#end def +#def body +

There was an error processing ur request

+
+ $escape($error) +
+#end def diff --git a/templates/patch_view.tmpl b/templates/patch_view.tmpl new file mode 100644 index 0000000..b3f645e --- /dev/null +++ b/templates/patch_view.tmpl @@ -0,0 +1,19 @@ +#import templates +#extends templates.skeleton +#import pygments +#from pygments.lexers import DiffLexer +#from pygments.formatters import HtmlFormatter +#def title +Patch information for $package / $version / $name +#end def +#def body +

$package / $version / $name

+
+ + download this patch + +
+
+ $pygments.highlight($patch, $DiffLexer(), $HtmlFormatter(style='colorful', noclasses=True)) +
+#end def -- cgit v1.2.3