├── jinja2 ├── testsuite │ ├── res │ │ ├── __init__.py │ │ └── templates │ │ │ ├── test.html │ │ │ ├── foo │ │ │ └── test.html │ │ │ ├── broken.html │ │ │ └── syntaxerror.html │ ├── doctests.py │ ├── debug.py │ ├── utils.py │ ├── tests.py │ └── __init__.py ├── defaults.py ├── optimizer.py ├── __init__.py ├── visitor.py └── tests.py ├── markdown ├── extensions │ ├── __init__.py │ ├── extra.py │ ├── html_tidy.py │ ├── meta.py │ ├── abbr.py │ ├── tables.py │ ├── def_list.py │ ├── fenced_code.py │ ├── imagelinks.py │ └── rss.py ├── etree_loader.py ├── postprocessors.py ├── blockparser.py └── commandline.py ├── .gitignore ├── blog ├── static │ ├── css │ │ ├── handheld.css │ │ ├── fonts │ │ │ ├── slkscr-webfont.eot │ │ │ ├── slkscr-webfont.ttf │ │ │ ├── slkscr-webfont.woff │ │ │ ├── slkscrb-webfont.eot │ │ │ ├── slkscrb-webfont.ttf │ │ │ ├── slkscrb-webfont.woff │ │ │ ├── Chunkfive-webfont.eot │ │ │ ├── Chunkfive-webfont.ttf │ │ │ ├── Chunkfive-webfont.woff │ │ │ ├── DroidSansMono-webfont.eot │ │ │ ├── DroidSansMono-webfont.ttf │ │ │ ├── DroidSansMono-webfont.woff │ │ │ ├── fontin_sans_b_45b-webfont.eot │ │ │ ├── fontin_sans_b_45b-webfont.ttf │ │ │ ├── fontin_sans_b_45b-webfont.woff │ │ │ ├── fontin_sans_i_45b-webfont.eot │ │ │ ├── fontin_sans_i_45b-webfont.ttf │ │ │ ├── fontin_sans_i_45b-webfont.woff │ │ │ ├── fontin_sans_r_45b-webfont.eot │ │ │ ├── fontin_sans_r_45b-webfont.ttf │ │ │ └── fontin_sans_r_45b-webfont.woff │ │ ├── syntax.css │ │ └── boilerplate.css │ ├── favicon.ico │ ├── img │ │ ├── img_1.png │ │ ├── img_10.png │ │ ├── img_11.png │ │ ├── img_12.png │ │ ├── img_2.png │ │ ├── img_3.png │ │ ├── img_4.png │ │ ├── img_5.png │ │ ├── img_6.png │ │ ├── img_7.png │ │ ├── img_8.png │ │ └── img_9.png │ ├── js │ │ ├── plugins.js │ │ └── script.js │ └── pages │ │ └── about.md ├── templates │ ├── about.html │ ├── home.html │ ├── login.html │ ├── admin.html │ ├── edit_entry.html │ ├── add_entry.html │ ├── layout.html │ └── list_entries.html ├── __init__.py ├── schema │ ├── schema.sql │ └── fixture-sqlite.sql └── models.py ├── werkzeug ├── debug │ ├── shared │ │ ├── less.png │ │ ├── more.png │ │ ├── source.png │ │ ├── console.png │ │ ├── codetable.tmpl │ │ ├── vartable.tmpl │ │ └── body.tmpl │ ├── templates │ │ ├── source.html │ │ ├── traceback_plaintext.html │ │ ├── help_command.html │ │ ├── frame.html │ │ ├── dump_object.html │ │ ├── traceback_summary.html │ │ ├── console.html │ │ └── traceback_full.html │ ├── utils.py │ └── render.py ├── contrib │ ├── __init__.py │ ├── limiter.py │ └── testtools.py ├── posixemulation.py └── security.py ├── app.yaml ├── config └── __init__.py ├── main.py ├── index.yaml ├── flask ├── globals.py ├── __init__.py ├── session.py ├── logging.py ├── testing.py ├── signals.py ├── ctx.py ├── wrappers.py └── templating.py ├── LICENSE └── pygments ├── styles ├── vs.py ├── fruity.py ├── bw.py ├── borland.py ├── trac.py ├── native.py ├── vim.py ├── __init__.py ├── autumn.py ├── perldoc.py ├── manni.py ├── emacs.py ├── pastie.py ├── friendly.py ├── default.py ├── murphy.py └── colorful.py ├── formatters ├── __init__.py └── bbcode.py ├── console.py ├── plugin.py ├── filter.py ├── formatter.py ├── __init__.py ├── lexers └── special.py └── scanner.py /jinja2/testsuite/res/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /markdown/extensions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jinja2/testsuite/res/templates/test.html: -------------------------------------------------------------------------------- 1 | BAR 2 | -------------------------------------------------------------------------------- /jinja2/testsuite/res/templates/foo/test.html: -------------------------------------------------------------------------------- 1 | FOO 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | *.swp 3 | *.db 4 | *.*~ 5 | config.cfg 6 | -------------------------------------------------------------------------------- /jinja2/testsuite/res/templates/broken.html: -------------------------------------------------------------------------------- 1 | Before 2 | {{ fail() }} 3 | After 4 | -------------------------------------------------------------------------------- /blog/static/css/handheld.css: -------------------------------------------------------------------------------- 1 | *{float:none;font-size:80%;background:#fff;color:#000;} 2 | -------------------------------------------------------------------------------- /blog/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/favicon.ico -------------------------------------------------------------------------------- /jinja2/testsuite/res/templates/syntaxerror.html: -------------------------------------------------------------------------------- 1 | Foo 2 | {% for item in broken %} 3 | ... 4 | {% endif %} 5 | -------------------------------------------------------------------------------- /blog/static/img/img_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_1.png -------------------------------------------------------------------------------- /blog/static/img/img_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_10.png -------------------------------------------------------------------------------- /blog/static/img/img_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_11.png -------------------------------------------------------------------------------- /blog/static/img/img_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_12.png -------------------------------------------------------------------------------- /blog/static/img/img_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_2.png -------------------------------------------------------------------------------- /blog/static/img/img_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_3.png -------------------------------------------------------------------------------- /blog/static/img/img_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_4.png -------------------------------------------------------------------------------- /blog/static/img/img_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_5.png -------------------------------------------------------------------------------- /blog/static/img/img_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_6.png -------------------------------------------------------------------------------- /blog/static/img/img_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_7.png -------------------------------------------------------------------------------- /blog/static/img/img_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_8.png -------------------------------------------------------------------------------- /blog/static/img/img_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/img/img_9.png -------------------------------------------------------------------------------- /werkzeug/debug/shared/less.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/werkzeug/debug/shared/less.png -------------------------------------------------------------------------------- /werkzeug/debug/shared/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/werkzeug/debug/shared/more.png -------------------------------------------------------------------------------- /werkzeug/debug/shared/source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/werkzeug/debug/shared/source.png -------------------------------------------------------------------------------- /werkzeug/debug/shared/console.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/werkzeug/debug/shared/console.png -------------------------------------------------------------------------------- /blog/static/css/fonts/slkscr-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/slkscr-webfont.eot -------------------------------------------------------------------------------- /blog/static/css/fonts/slkscr-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/slkscr-webfont.ttf -------------------------------------------------------------------------------- /blog/static/css/fonts/slkscr-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/slkscr-webfont.woff -------------------------------------------------------------------------------- /blog/static/css/fonts/slkscrb-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/slkscrb-webfont.eot -------------------------------------------------------------------------------- /blog/static/css/fonts/slkscrb-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/slkscrb-webfont.ttf -------------------------------------------------------------------------------- /blog/static/css/fonts/slkscrb-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/slkscrb-webfont.woff -------------------------------------------------------------------------------- /blog/static/css/fonts/Chunkfive-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/Chunkfive-webfont.eot -------------------------------------------------------------------------------- /blog/static/css/fonts/Chunkfive-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/Chunkfive-webfont.ttf -------------------------------------------------------------------------------- /blog/static/css/fonts/Chunkfive-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/Chunkfive-webfont.woff -------------------------------------------------------------------------------- /blog/static/css/fonts/DroidSansMono-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/DroidSansMono-webfont.eot -------------------------------------------------------------------------------- /blog/static/css/fonts/DroidSansMono-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/DroidSansMono-webfont.ttf -------------------------------------------------------------------------------- /blog/static/css/fonts/DroidSansMono-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/DroidSansMono-webfont.woff -------------------------------------------------------------------------------- /blog/static/css/fonts/fontin_sans_b_45b-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/fontin_sans_b_45b-webfont.eot -------------------------------------------------------------------------------- /blog/static/css/fonts/fontin_sans_b_45b-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/fontin_sans_b_45b-webfont.ttf -------------------------------------------------------------------------------- /blog/static/css/fonts/fontin_sans_b_45b-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/fontin_sans_b_45b-webfont.woff -------------------------------------------------------------------------------- /blog/static/css/fonts/fontin_sans_i_45b-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/fontin_sans_i_45b-webfont.eot -------------------------------------------------------------------------------- /blog/static/css/fonts/fontin_sans_i_45b-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/fontin_sans_i_45b-webfont.ttf -------------------------------------------------------------------------------- /blog/static/css/fonts/fontin_sans_i_45b-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/fontin_sans_i_45b-webfont.woff -------------------------------------------------------------------------------- /blog/static/css/fonts/fontin_sans_r_45b-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/fontin_sans_r_45b-webfont.eot -------------------------------------------------------------------------------- /blog/static/css/fonts/fontin_sans_r_45b-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/fontin_sans_r_45b-webfont.ttf -------------------------------------------------------------------------------- /blog/static/css/fonts/fontin_sans_r_45b-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudlygeek/proudlygeek-blog/HEAD/blog/static/css/fonts/fontin_sans_r_45b-webfont.woff -------------------------------------------------------------------------------- /app.yaml: -------------------------------------------------------------------------------- 1 | application: proudlygeek 2 | version: 1 3 | runtime: python 4 | api_version: 1 5 | 6 | 7 | handlers: 8 | - url: /.* 9 | script: main.py 10 | 11 | - url: /static 12 | static_dir: static 13 | expiration: "7d" 14 | -------------------------------------------------------------------------------- /werkzeug/debug/shared/codetable.tmpl: -------------------------------------------------------------------------------- 1 | 2 | <% for line in lines %> 3 | 4 | 5 | 6 | 7 | <% endfor %> 8 |
$line.lineno$line.code
9 | -------------------------------------------------------------------------------- /blog/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block title %}About Me{% endblock %} 3 | {% block body %} 4 |
5 |
6 | {{entry.content}} 7 |
8 |
9 | {% endblock %} 10 | -------------------------------------------------------------------------------- /werkzeug/debug/templates/source.html: -------------------------------------------------------------------------------- 1 | 2 | <% for line in lines %> 3 | 4 | 5 | 6 | 7 | <% endfor %> 8 |
${line.lineno}$escape(line.code)
9 | -------------------------------------------------------------------------------- /werkzeug/debug/templates/traceback_plaintext.html: -------------------------------------------------------------------------------- 1 | Traceback (most recent call last): 2 | <% for frame in traceback.frames %> 3 | File "$frame.filename", line $frame.lineno, in $frame.function_name 4 | $frame.current_line.strip() 5 | <% endfor %> 6 | $traceback.exception 7 | -------------------------------------------------------------------------------- /werkzeug/debug/templates/help_command.html: -------------------------------------------------------------------------------- 1 | <%py missing = object() %> 2 |
3 | <% if title and text %> 4 |

$title

5 |
$text
6 | <% else %> 7 |

Help

8 |

Type help(object) for help about object.

9 | <% endif %> 10 |
11 | -------------------------------------------------------------------------------- /werkzeug/debug/templates/frame.html: -------------------------------------------------------------------------------- 1 |
2 |

File "$escape(frame.filename)", 3 | line $frame.lineno, 4 | in $escape(frame.function_name)

5 |
${escape(frame.current_line.strip())}
6 |
7 | -------------------------------------------------------------------------------- /blog/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | 4 | blog 5 | ~~~~~~~~~~~~~~~~~~ 6 | 7 | A simple blog app written with Flask which 8 | supports sqlite and Google App Engine's Datastore. 9 | 10 | :copyright: (c) 2010 by Gianluca Bargelli. 11 | :license: MIT License, see LICENSE for more details. 12 | 13 | 14 | """ 15 | -------------------------------------------------------------------------------- /werkzeug/debug/templates/dump_object.html: -------------------------------------------------------------------------------- 1 |
2 |

$escape(title)

3 | <% if repr %> 4 |
$repr
5 | <% endif %> 6 | 7 | <% for key, value in items %> 8 | 9 | 10 | 11 | 12 | <% endfor %> 13 |
$escape(key)$value
14 |
15 | -------------------------------------------------------------------------------- /config/__init__.py: -------------------------------------------------------------------------------- 1 | class Config(object): 2 | PLATFORM = 'sqlite' 3 | DATABASE = '/tmp/blog.db' 4 | DEBUG = False 5 | TESTING = False 6 | SECRET_KEY = 'development key' 7 | MAX_PAGE_ENTRIES = 5 8 | 9 | class ProductionConfig(Config): 10 | DATABASE_URI = 'mysql://user@localhost/foo' 11 | 12 | class DevelopmentConfig(Config): 13 | DEBUG = True 14 | 15 | class TestinConfig(Config): 16 | TESTING = True 17 | -------------------------------------------------------------------------------- /blog/templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block title %}Home{% endblock %} 3 | {% block header %} 4 | 12 | {% endblock %} 13 | {% block body %} 14 | {% endblock %} 15 | -------------------------------------------------------------------------------- /werkzeug/debug/shared/vartable.tmpl: -------------------------------------------------------------------------------- 1 | 2 | <% if type == 'empty' %> 3 | 4 | <% elif type == 'simple' %> 5 | 6 | <% elif type == 'dict' %> 7 | 8 | <% for key, item in value %> 9 | 10 | <% endfor %> 11 | <% elif type == 'list' %> 12 | <% for item in value %> 13 | 14 | <% endfor %> 15 | <% endif %> 16 |
no data given
$escape(value)
NameValue
$escape(key)$escape(item)
$escape(item)
17 | -------------------------------------------------------------------------------- /main.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from blog.views import app 3 | 4 | def main(): 5 | if app.config['PLATFORM']=='sqlite': 6 | try: 7 | import sqlite3 8 | except: 9 | raise NameError("Sqlite3 module not found.") 10 | 11 | app.run() 12 | 13 | elif app.config['PLATFORM']=='gae': 14 | try: 15 | from google.appengine.ext.webapp.util import run_wsgi_app 16 | except: 17 | raise NameError ("Google App Engine SDK module not found.") 18 | 19 | run_wsgi_app(app) 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /werkzeug/debug/utils.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | werkzeug.debug.utils 4 | ~~~~~~~~~~~~~~~~~~~~ 5 | 6 | Various other utilities. 7 | 8 | :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. 9 | :license: BSD. 10 | """ 11 | from os.path import join, dirname 12 | from werkzeug.templates import Template 13 | 14 | 15 | def get_template(filename): 16 | return Template.from_file(join(dirname(__file__), 'templates', filename)) 17 | 18 | 19 | def render_template(template_filename, **context): 20 | return get_template(template_filename).render(**context) 21 | -------------------------------------------------------------------------------- /index.yaml: -------------------------------------------------------------------------------- 1 | indexes: 2 | 3 | - kind: Entry 4 | properties: 5 | - name: tags 6 | - name: creation_date 7 | direction: desc 8 | 9 | # AUTOGENERATED 10 | 11 | # This index.yaml is automatically updated whenever the dev_appserver 12 | # detects that a new type of query is run. If you want to manage the 13 | # index.yaml file manually, remove the above marker line (the line 14 | # saying "# AUTOGENERATED"). If you want to manage some indexes 15 | # manually, move them above the marker line. The index.yaml file is 16 | # automatically uploaded to the admin console when you next deploy 17 | # your application using appcfg.py. 18 | -------------------------------------------------------------------------------- /flask/globals.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | flask.globals 4 | ~~~~~~~~~~~~~ 5 | 6 | Defines all the global objects that are proxies to the current 7 | active context. 8 | 9 | :copyright: (c) 2010 by Armin Ronacher. 10 | :license: BSD, see LICENSE for more details. 11 | """ 12 | 13 | from werkzeug import LocalStack, LocalProxy 14 | 15 | # context locals 16 | _request_ctx_stack = LocalStack() 17 | current_app = LocalProxy(lambda: _request_ctx_stack.top.app) 18 | request = LocalProxy(lambda: _request_ctx_stack.top.request) 19 | session = LocalProxy(lambda: _request_ctx_stack.top.session) 20 | g = LocalProxy(lambda: _request_ctx_stack.top.g) 21 | -------------------------------------------------------------------------------- /werkzeug/contrib/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | werkzeug.contrib 4 | ~~~~~~~~~~~~~~~~ 5 | 6 | Contains user-submitted code that other users may find useful, but which 7 | is not part of the Werkzeug core. Anyone can write code for inclusion in 8 | the `contrib` package. All modules in this package are distributed as an 9 | add-on library and thus are not part of Werkzeug itself. 10 | 11 | This file itself is mostly for informational purposes and to tell the 12 | Python interpreter that `contrib` is a package. 13 | 14 | :copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details. 15 | :license: BSD, see LICENSE for more details. 16 | """ 17 | -------------------------------------------------------------------------------- /blog/templates/login.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block title %}Login{% endblock %} 3 | {% block header %} 4 | {% endblock %} 5 | {% block body %} 6 |

Please login

7 | {% if error %}

Error: {{ error }}{% endif %} 8 |

9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 17 |
18 | {% endblock %} 19 | {% block footer %}{% endblock %} 20 | -------------------------------------------------------------------------------- /werkzeug/debug/templates/traceback_summary.html: -------------------------------------------------------------------------------- 1 |
2 | <% if traceback.is_syntax_error %> 3 | <% if include_title %> 4 |

Syntax Error

5 | <% endif %> 6 | 11 |
$escape(traceback.exception)
12 | <% else %> 13 | <% if include_title %> 14 |

Traceback (most recent call last):

15 | <% endif %> 16 | 21 |
$escape(traceback.exception)
22 | <% endif %> 23 |
24 | -------------------------------------------------------------------------------- /blog/static/js/plugins.js: -------------------------------------------------------------------------------- 1 | 2 | // remap jQuery to $ 3 | (function($){ 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | })(window.jQuery); 16 | 17 | 18 | 19 | // usage: log('inside coolFunc',this,arguments); 20 | // paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/ 21 | window.log = function(){ 22 | log.history = log.history || []; // store logs to an array for reference 23 | log.history.push(arguments); 24 | if(this.console){ 25 | console.log( Array.prototype.slice.call(arguments) ); 26 | } 27 | }; 28 | 29 | 30 | 31 | // catch all document.write() calls 32 | (function(doc){ 33 | var write = doc.write; 34 | doc.write = function(q){ 35 | log('document.write(): ',arguments); 36 | if (/docwriteregexwhitelist/.test(q)) write.apply(doc,arguments); 37 | }; 38 | })(document); 39 | 40 | 41 | -------------------------------------------------------------------------------- /blog/static/js/script.js: -------------------------------------------------------------------------------- 1 | /* Author: scroolose 2 | http://got-ravings.blogspot.com/2010/06/line-numbers-in-embedded-gists.html 3 | */ 4 | 5 | function addLineNumbersToAllGists() { 6 | $('.gist').each( function() { 7 | _addLineNumbersToGist('#' + $(this).attr('id')); 8 | }); 9 | } 10 | 11 | function addLineNumbersToGist(id) { 12 | _addLineNumbersToGist('#gist-' + id); 13 | } 14 | 15 | function _addLineNumbersToGist(css_selector) { 16 | $(document).ready( function() { 17 | $(css_selector + ' .line').each(function(i, e) { 18 | $(this).prepend( 19 | $('
').css({ 20 | 'float' : 'left', 21 | 'width': '30px', 22 | 'font-weight' : 'bold', 23 | 'color': '#808080' 24 | }).text(++i) 25 | ); 26 | }); 27 | }); 28 | } 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /blog/templates/admin.html: -------------------------------------------------------------------------------- 1 | {% extends 'layout.html' %} 2 | {% block title %}Admin Panel{% endblock %} 3 | {% block header %}{% endblock %} 4 | {% block body %} 5 |

Administration Panel

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {% for entry in entries %} 16 | 17 | 18 | 19 | 21 | 28 | 29 | {% else %} 30 | No entries 31 | {% endfor %} 32 | 33 |
Entries
idslugauthortitletag(s)
{{entry.id}}{{entry.slug}}{{entry.author}} 20 | {{entry.title}} 22 | {% for tag in entry.tags %} 23 | {{tag}} 24 | {% else %} 25 | - 26 | {% endfor %} 27 |
34 | {% endblock %} 35 | {% block footer%}{% endblock %} 36 | -------------------------------------------------------------------------------- /jinja2/testsuite/doctests.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | jinja2.testsuite.doctests 4 | ~~~~~~~~~~~~~~~~~~~~~~~~~ 5 | 6 | The doctests. Collects all tests we want to test from 7 | the Jinja modules. 8 | 9 | :copyright: (c) 2010 by the Jinja Team. 10 | :license: BSD, see LICENSE for more details. 11 | """ 12 | import unittest 13 | import doctest 14 | 15 | 16 | def suite(): 17 | from jinja2 import utils, sandbox, runtime, meta, loaders, \ 18 | ext, environment, bccache, nodes 19 | suite = unittest.TestSuite() 20 | suite.addTest(doctest.DocTestSuite(utils)) 21 | suite.addTest(doctest.DocTestSuite(sandbox)) 22 | suite.addTest(doctest.DocTestSuite(runtime)) 23 | suite.addTest(doctest.DocTestSuite(meta)) 24 | suite.addTest(doctest.DocTestSuite(loaders)) 25 | suite.addTest(doctest.DocTestSuite(ext)) 26 | suite.addTest(doctest.DocTestSuite(environment)) 27 | suite.addTest(doctest.DocTestSuite(bccache)) 28 | suite.addTest(doctest.DocTestSuite(nodes)) 29 | return suite 30 | -------------------------------------------------------------------------------- /blog/schema/schema.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS user; 2 | CREATE TABLE user ( 3 | id INTEGER PRIMARY KEY autoincrement, 4 | username VARCHAR(30) NOT NULL, 5 | password VARCHAR(30) NOT NULL, 6 | rank_id_FK INTEGER NOT NULL REFERENCES rank(id) 7 | ); 8 | DROP TABLE IF EXISTS rank; 9 | CREATE TABLE rank ( 10 | id INTEGER PRIMARY KEY autoincrement, 11 | role_name VARCHAR(20) NOT NULL 12 | ); 13 | 14 | DROP TABLE IF EXISTS entry; 15 | CREATE TABLE entry ( 16 | id INTEGER NOT NULL, 17 | slug VARCHAR(80) NOT NULL, 18 | title VARCHAR(80) NOT NULL, 19 | body TEXT NOT NULL, 20 | creation_date DATE NOT NULL, 21 | last_date DATE, 22 | user_id_FK INTEGER NOT NULL REFERENCES user(id), 23 | PRIMARY KEY(id, slug) 24 | ); 25 | 26 | DROP TABLE IF EXISTS entry_tags; 27 | CREATE TABLE entry_tags ( 28 | slug_entry_FK INTEGER REFERENCES entry(id), 29 | id_tag_FK INTEGER REFERENCES tag(id), 30 | PRIMARY KEY(slug_entry_FK, id_tag_FK) 31 | ); 32 | 33 | DROP TABLE IF EXISTS tag; 34 | CREATE TABLE tag ( 35 | id INTEGER PRIMARY KEY autoincrement, 36 | name VARCHAR(10) NOT NULL 37 | ); 38 | -------------------------------------------------------------------------------- /blog/templates/edit_entry.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block title %}Edit {{ entry.title }}{% endblock %} 3 | {% block header %} {% endblock %} 4 | 5 | {% block body %} 6 |
7 |
8 |

9 |

10 | 11 | 17 |

18 |

Entry's text

19 |

Tags:

20 | 21 |

22 |
23 |
24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) <2010> 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /jinja2/defaults.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | jinja2.defaults 4 | ~~~~~~~~~~~~~~~ 5 | 6 | Jinja default filters and tags. 7 | 8 | :copyright: (c) 2010 by the Jinja Team. 9 | :license: BSD, see LICENSE for more details. 10 | """ 11 | from jinja2.utils import generate_lorem_ipsum, Cycler, Joiner 12 | 13 | 14 | # defaults for the parser / lexer 15 | BLOCK_START_STRING = '{%' 16 | BLOCK_END_STRING = '%}' 17 | VARIABLE_START_STRING = '{{' 18 | VARIABLE_END_STRING = '}}' 19 | COMMENT_START_STRING = '{#' 20 | COMMENT_END_STRING = '#}' 21 | LINE_STATEMENT_PREFIX = None 22 | LINE_COMMENT_PREFIX = None 23 | TRIM_BLOCKS = False 24 | NEWLINE_SEQUENCE = '\n' 25 | 26 | 27 | # default filters, tests and namespace 28 | from jinja2.filters import FILTERS as DEFAULT_FILTERS 29 | from jinja2.tests import TESTS as DEFAULT_TESTS 30 | DEFAULT_NAMESPACE = { 31 | 'range': xrange, 32 | 'dict': lambda **kw: kw, 33 | 'lipsum': generate_lorem_ipsum, 34 | 'cycler': Cycler, 35 | 'joiner': Joiner 36 | } 37 | 38 | 39 | # export all constants 40 | __all__ = tuple(x for x in locals().keys() if x.isupper()) 41 | -------------------------------------------------------------------------------- /blog/templates/add_entry.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block title %}Add a new entry{% endblock %} 3 | {% block header %} 4 | {% endblock %} 5 | {% block body %} 6 | {% if errors %} 7 |

8 | Error: 9 |

88 | 99 | {% endblock %} 100 | --------------------------------------------------------------------------------