From 6ad2b896fb6cabacbbaad5efda4ea418320df2ec Mon Sep 17 00:00:00 2001 From: max Date: Mon, 21 May 2012 17:25:24 +0700 Subject: [PATCH] Added faq --- zerobin/default_settings.py | 1 + zerobin/routes.py | 6 ++++++ zerobin/views/faq.tpl | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 zerobin/views/faq.tpl diff --git a/zerobin/default_settings.py b/zerobin/default_settings.py index 3b9ab3d..5d97c4b 100644 --- a/zerobin/default_settings.py +++ b/zerobin/default_settings.py @@ -58,6 +58,7 @@ GROUP = None MENU = ( ('Home', '/'), # internal link. First link will be highlited ('Download 0bin', 'https://github.com/sametmax/0bin'), # external link + ('Faq', '/faq/'), # faq ('Contact', 'mailto:your@email.com') # email ) diff --git a/zerobin/routes.py b/zerobin/routes.py index 681b569..afa1ee6 100644 --- a/zerobin/routes.py +++ b/zerobin/routes.py @@ -38,6 +38,12 @@ def index(): return GLOBAL_CONTEXT +@app.route('/faq/') +@view('faq') +def index(): + return GLOBAL_CONTEXT + + @app.route('/paste/create', method='POST') def create_paste(): diff --git a/zerobin/views/faq.tpl b/zerobin/views/faq.tpl new file mode 100644 index 0000000..a8121d2 --- /dev/null +++ b/zerobin/views/faq.tpl @@ -0,0 +1,35 @@ +
+ +

FAQ

+ + %for i, entry in enumerate(settings.MENU): + %if "mailto:" in entry[1]: +

If a question does not appear here you can + . +

+ %end + %end + +
+ +
+ +
What's the name of the captain?
+
The name of the captain is Igloo !
+
+
What's the name of the captain?
+
The name of the captain is Igloo !
+
+
What's the name of the captain?
+
The name of the captain is Igloo !
+ +
+ +
+ + + +%rebase base settings=settings