Skip to content

Commit

Permalink
enable textile filter for templates
Browse files Browse the repository at this point in the history
  • Loading branch information
iartarisi committed Sep 19, 2012
1 parent bd66283 commit 07b5bff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pip-requires
@@ -1,3 +1,4 @@
Flask
psycopg2
sqlalchemy
sqlalchemy
textile
3 changes: 3 additions & 0 deletions popcorn/__init__.py
Expand Up @@ -21,7 +21,9 @@
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

from flask import Flask, url_for, request
from textile import textile

from popcorn.database import db_session

Expand All @@ -43,3 +45,4 @@ def url_for_other_page(page=None):
return url_for(request.endpoint, **args)

app.jinja_env.globals['url_for_other_page'] = url_for_other_page
app.jinja_env.filters['textile'] = lambda value: textile(value)
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -13,6 +13,6 @@
packages=find_packages(exclude=["*.test", "test", "*.test.*"]),
include_package_data=True,
zip_safe=False,
install_requires=['Flask', 'sqlalchemy', 'psycopg2'],
install_requires=['Flask', 'sqlalchemy', 'psycopg2', 'textile'],
test_suite="popcorn.test"
)

0 comments on commit 07b5bff

Please sign in to comment.