summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2017-02-13 22:12:30 +0100
committerJelle van der Waa <jelle@vdwaa.nl>2017-05-02 21:13:56 +0200
commit353f803c4d0be7f4803873cd76359115303a4bca (patch)
treeb90bb6ed9b21398cc497e7c6ce9d092e66dac012
parentc4dd0ead1557ff249b57c06c082516104e62062e (diff)
downloadarchweb-353f803c4d0be7f4803873cd76359115303a4bca.tar.gz
archweb-353f803c4d0be7f4803873cd76359115303a4bca.zip
Remove the last piece of django-jinja existance
-rw-r--r--mirrors/templatetags/jinja2.py53
-rw-r--r--requirements.txt2
-rw-r--r--requirements_prod.txt2
-rw-r--r--settings.py11
4 files changed, 0 insertions, 68 deletions
diff --git a/mirrors/templatetags/jinja2.py b/mirrors/templatetags/jinja2.py
deleted file mode 100644
index 04e50238..00000000
--- a/mirrors/templatetags/jinja2.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from datetime import timedelta
-from django_jinja import library
-from markupsafe import Markup
-
-
-@library.global_function
-def country_flag(country):
- if not country:
- return ''
- html = '<span class="fam-flag fam-flag-%s" title="%s"></span> ' % (
- unicode(country.code).lower(), unicode(country.name))
- return Markup(html)
-
-
-@library.filter
-def duration(value):
- if not value and type(value) != timedelta:
- return u''
- # does not take microseconds into account
- total_secs = value.seconds + value.days * 24 * 3600
- mins = total_secs // 60
- hrs, mins = divmod(mins, 60)
- return '%d:%02d' % (hrs, mins)
-
-
-@library.filter
-def hours(value):
- if not value and type(value) != timedelta:
- return u''
- # does not take microseconds into account
- total_secs = value.seconds + value.days * 24 * 3600
- mins = total_secs // 60
- hrs, mins = divmod(mins, 60)
- if hrs == 1:
- return '%d hour' % hrs
- return '%d hours' % hrs
-
-
-@library.filter
-def floatvalue(value, arg=2):
- if value is None:
- return u''
- return '%.*f' % (arg, value)
-
-
-@library.filter
-def percentage(value, arg=1):
- if not value and type(value) != float:
- return u''
- new_val = value * 100.0
- return '%.*f%%' % (arg, new_val)
-
-# vim: set ts=4 sw=4 et:
diff --git a/requirements.txt b/requirements.txt
index 864fac3a..a807da1f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,12 +1,10 @@
-e git+git://github.com/fredj/cssmin.git@master#egg=cssmin
Django==1.8.18
IPy==0.83
-Jinja2==2.8
Markdown==2.6.2
MarkupSafe==0.23
bencode==1.0
django-countries==3.3
-django-jinja==2.2.0
jsmin==2.1.1
pgpdump==1.5
pytz>=2015.4
diff --git a/requirements_prod.txt b/requirements_prod.txt
index bcb30f3e..7d311e3e 100644
--- a/requirements_prod.txt
+++ b/requirements_prod.txt
@@ -1,12 +1,10 @@
-e git+git://github.com/fredj/cssmin.git@master#egg=cssmin
Django==1.7.8
IPy==0.83
-Jinja2==2.7.3
Markdown==2.6.2
MarkupSafe==0.23
bencode==1.0
django-countries==3.3
-django-jinja==1.3.3
jsmin==2.1.1
pgpdump==1.5
psycopg2==2.6.1
diff --git a/settings.py b/settings.py
index 2d36d063..4a0ca9d2 100644
--- a/settings.py
+++ b/settings.py
@@ -47,16 +47,6 @@ AUTH_PROFILE_MODULE = 'devel.UserProfile'
from os import path
TEMPLATES = [
{
- 'BACKEND': 'django_jinja.backend.Jinja2',
- 'APP_DIRS': True,
- 'DIRS': [
- path.join(DEPLOY_PATH, 'templates/jinja')
- ],
- 'OPTIONS': {
- 'match_extension': '.jinja'
- }
- },
- {
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
path.join(DEPLOY_PATH, 'templates')
@@ -124,7 +114,6 @@ INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.staticfiles',
'django_countries',
- 'django_jinja',
'main',
'mirrors',