summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorjelle van der Waa <jelle@vdwaa.nl>2018-01-29 20:10:10 +0100
committerAngel Velásquez <angvp@archlinux.org>2018-01-29 14:10:10 -0500
commit148692cd8fc79b3e43ef0f2c40a2da9d87c9da9e (patch)
treed34782a388091c4f14b24b9d0878f4a8265beef2 /templates
parent2ff2b26aa92c8efd21090562091361924a3a9428 (diff)
downloadarchweb-148692cd8fc79b3e43ef0f2c40a2da9d87c9da9e.tar.gz
archweb-148692cd8fc79b3e43ef0f2c40a2da9d87c9da9e.zip
More code refactoring / tests (#79)
* main: move tests to main/tests Move the templatetags tests to main/tests/test_templatetags. * main: Add test for templatetags country Create a test for the templatetag country_flag. * main: remove duplicate floatvalue floatvalue is only used in the mirrors templates and the same exact function exists in the mirror_status templatetags. * main: Remove duplicate hours filter The hours filter is also defined in the mirror_status and only used in mirrors. * main: move percentage filter to mirrors Move the percentage filter to the only user of it and add a test for basic use cases. * main: remove duplicate duration implementation The duration templatetag filter is also defined in mirror_status.py * templates: remove unrequired import flags * main: Add missing testcase for country_flag Add the None test case, so that the function is fully covered. * todolists: create tests for Todolist model Add basic tests for the Todolist model
Diffstat (limited to 'templates')
-rw-r--r--templates/mirrors/error_table.html1
-rw-r--r--templates/mirrors/mirror_details.html1
-rw-r--r--templates/mirrors/mirror_details_urls.html1
-rw-r--r--templates/mirrors/status.html1
-rw-r--r--templates/mirrors/status_table.html1
-rw-r--r--templates/mirrors/url_details_logs.html1
6 files changed, 4 insertions, 2 deletions
diff --git a/templates/mirrors/error_table.html b/templates/mirrors/error_table.html
index 03de4944..479a0117 100644
--- a/templates/mirrors/error_table.html
+++ b/templates/mirrors/error_table.html
@@ -1,4 +1,5 @@
{% load flags %}
+{% load mirror_status %}
<table id="errorlog_mirrors" class="results">
<thead>
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index 40e76190..ec7bd424 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -2,7 +2,6 @@
{% load cycle from future %}
{% load static from staticfiles %}
{% load mirror_status %}
-{% load flags %}
{% load admin_urls %}
{% block title %}Arch Linux - {{ mirror.name }} - Mirror Details{% endblock %}
diff --git a/templates/mirrors/mirror_details_urls.html b/templates/mirrors/mirror_details_urls.html
index 4cada31e..a2df00de 100644
--- a/templates/mirrors/mirror_details_urls.html
+++ b/templates/mirrors/mirror_details_urls.html
@@ -1,4 +1,5 @@
{% load flags %}
+{% load mirror_status %}
<table id="available_urls" class="results">
<thead>
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
index 24408be7..39d68460 100644
--- a/templates/mirrors/status.html
+++ b/templates/mirrors/status.html
@@ -1,7 +1,6 @@
{% extends "base.html" %}
{% load static from staticfiles %}
{% load mirror_status %}
-{% load flags %}
{% block title %}Arch Linux - Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}{% endblock %}
diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html
index 1effe5a2..77f6e454 100644
--- a/templates/mirrors/status_table.html
+++ b/templates/mirrors/status_table.html
@@ -1,4 +1,5 @@
{% load flags %}
+{% load mirror_status %}
<table id="{{ table_id }}" class="results">
<thead>
<tr>
diff --git a/templates/mirrors/url_details_logs.html b/templates/mirrors/url_details_logs.html
index a87e58d4..2396fde7 100644
--- a/templates/mirrors/url_details_logs.html
+++ b/templates/mirrors/url_details_logs.html
@@ -1,4 +1,5 @@
{% load flags %}
+{% load mirror_status %}
<table id="check_logs" class="results">
<thead>