From 0545e3e0ec864eaed4facc94158e3ed9da1dfb2b Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 23 Mar 2012 18:23:17 -0500 Subject: Django 1.4 admin and admin media changes Signed-off-by: Dan McGee --- templates/admin/index.html | 10 +++++----- templates/devel/admin_log.html | 4 ++-- templates/packages/search.html | 12 ++++++++---- 3 files changed, 15 insertions(+), 11 deletions(-) (limited to 'templates') diff --git a/templates/admin/index.html b/templates/admin/index.html index 1755d86..203206d 100644 --- a/templates/admin/index.html +++ b/templates/admin/index.html @@ -1,7 +1,7 @@ {% extends "admin/base_site.html" %} -{% load i18n %} +{% load i18n admin_static %} -{% block extrastyle %}{{ block.super }}{% endblock %} +{% block extrastyle %}{{ block.super }}{% endblock %} {% block coltype %}colMS{% endblock %} @@ -36,19 +36,19 @@ {% blocktrans with name=app.name %}{{ name }}{% endblocktrans %} {% for model in app.models %} - {% if model.perms.change %} + {% if model.admin_url %} {{ model.name }} {% else %} {{ model.name }} {% endif %} - {% if model.perms.add %} + {% if model.add_url %} {% trans 'Add' %} {% else %}   {% endif %} - {% if model.perms.change %} + {% if model.admin_url %} {% trans 'Change' %} {% else %}   diff --git a/templates/devel/admin_log.html b/templates/devel/admin_log.html index 0f22ba2..1629c10 100644 --- a/templates/devel/admin_log.html +++ b/templates/devel/admin_log.html @@ -1,7 +1,7 @@ {% extends "admin/base_site.html" %} -{% load i18n %} +{% load i18n admin_static %} -{% block extrastyle %}{{ block.super }}{% endblock %} +{% block extrastyle %}{{ block.super }}{% endblock %} {% block breadcrumbs %}{% endblock %} diff --git a/templates/packages/search.html b/templates/packages/search.html index ae67b18..030f267 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -1,13 +1,13 @@ {% extends "base.html" %} {% load package_extras %} -{% load adminmedia %} +{% load admin_static %} {% block title %}Arch Linux - Package Database{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block head %} {% if is_paginated and page_obj.number > 1 %}{% endif %} - + {% endblock %} {% block content %} @@ -126,8 +126,12 @@ title="AUR package database">Arch User Repository (AUR).

+{% load cdn %}{% jquery %} - - + + {{search_form.media}} {% endblock %} -- cgit v1.2.3-24-g4f1b From 90e08b4863dfaecafee5b151478bda4513b12e85 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 23 Mar 2012 19:29:40 -0500 Subject: Make all datetime objects fully timezone aware This is most of the transition to Django 1.4 `USE_TZ = True`. We need to ensure we don't mix aware and non-aware datetime objects when dealing with datetimes in the code. Add a utc_now() helper method that we can use most places, and ensure there is always a timezone attached when necessary. Signed-off-by: Dan McGee --- templates/devel/clock.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'templates') diff --git a/templates/devel/clock.html b/templates/devel/clock.html index 72a57d0..3b00075 100644 --- a/templates/devel/clock.html +++ b/templates/devel/clock.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load tz %} {% block title %}Arch Linux - Developer World Clocks{% endblock %} @@ -10,7 +11,6 @@ depends on developers keeping the time zone information up to date, so if you see 'UTC' listed, pester them to update their settings.

- Arch Server Time: {{ now|date:"Y-m-d H:i T" }}
UTC Time: {{ utc_now|date:"Y-m-d H:i T" }}

@@ -33,7 +33,7 @@ {{ dev.userprofile.alias }} {{ dev.userprofile.location }} {{ dev.userprofile.time_zone }} - {{ dev.current_time|date:"Y-m-d H:i T" }} + {{ utc_now|timezone:dev.userprofile.time_zone|date:"Y-m-d H:i T" }} {% endfor %} -- cgit v1.2.3-24-g4f1b From 8e10699d53281be53c88a3695de6aa496e084dc6 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Fri, 23 Mar 2012 20:09:38 -0500 Subject: Use 'url from future' everywhere The old-style url template tag disappears in Django 1.5, so we can and should convert to the new-style tag now. Signed-off-by: Dan McGee --- templates/base.html | 14 +++++++------- templates/public/download.html | 5 +++-- templates/public/index.html | 31 ++++++++++++++++--------------- templates/releng/add.html | 3 ++- templates/releng/iso_overview.html | 3 ++- templates/releng/result_list.html | 3 ++- templates/releng/result_section.html | 7 ++++--- templates/releng/results.html | 5 +++-- templates/releng/thanks.html | 7 ++++--- templates/visualize/index.html | 7 ++++--- 10 files changed, 47 insertions(+), 38 deletions(-) (limited to 'templates') diff --git a/templates/base.html b/templates/base.html index 0da77cf..fa30df1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,4 +1,4 @@ - +{% load url from future %} {% block title %}Arch Linux{% endblock %} @@ -10,7 +10,7 @@ - + {% block head %}{% endblock %} @@ -25,7 +25,7 @@
  • Wiki
  • Bugs
  • AUR
  • -
  • Download
  • +
  • Download
  • @@ -34,20 +34,20 @@
    {% if user.is_authenticated %} diff --git a/templates/public/index.html b/templates/public/index.html index 00edf8c..53ccd2d 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load markup cache cdn %} +{% load url from future %} {% block head %} @@ -30,13 +31,13 @@ title="Arch Wiki">wiki if you want to learn more about Arch.

    -

    Learn more...

    - Latest News + Latest News

    @@ -57,7 +58,7 @@ {% else %} {% if forloop.counter0 == 5 %}

    - Older News

    @@ -137,7 +138,7 @@

    Support

    diff --git a/templates/releng/add.html b/templates/releng/add.html index 8488b40..ed02984 100644 --- a/templates/releng/add.html +++ b/templates/releng/add.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load url from future %} {% block title %}Arch Linux - Test Result Entry{% endblock %} @@ -13,7 +14,7 @@ installation properly. Some options require you to check several things (such as config files), this will be mentioned alongside the option.

    There is also an overview of all feedback on the - results page. Once we have + results page. Once we have builds that are properly tested (enough successful feedback for all important features of the ISO or a slightly earlier ISO), we can release new official media.

    diff --git a/templates/releng/iso_overview.html b/templates/releng/iso_overview.html index 5a4445b..76479c5 100644 --- a/templates/releng/iso_overview.html +++ b/templates/releng/iso_overview.html @@ -1,10 +1,11 @@ {% extends "base.html" %} +{% load url from future %} {% block content %}

    Failures and Successes for Testing ISOs

    -

    Go back to testing results

    +

    Go back to testing results

    diff --git a/templates/releng/result_list.html b/templates/releng/result_list.html index 512e1bf..6226421 100644 --- a/templates/releng/result_list.html +++ b/templates/releng/result_list.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load url from future %} {% block content %}
    @@ -7,7 +8,7 @@ {{ iso_name|default:"" }} -

    Go back to testing results

    +

    Go back to testing results

    diff --git a/templates/releng/result_section.html b/templates/releng/result_section.html index 08e46fb..c82a553 100644 --- a/templates/releng/result_section.html +++ b/templates/releng/result_section.html @@ -1,3 +1,4 @@ +{% load url from future %} @@ -6,20 +7,20 @@ {% for item in option.values %}
    {% if option.is_rollback %}Rollback: {% endif %}{{ option.name|title }} Last Success
    - + {{ item.value.name|lower }} {% if item.success %} - + {{ item.success.name }} {% else %}Never succeeded{% endif %} {% if item.failure %} - + {{ item.failure.name }} {% else %}Never failed{% endif %} diff --git a/templates/releng/results.html b/templates/releng/results.html index 4ff3c86..71af708 100644 --- a/templates/releng/results.html +++ b/templates/releng/results.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load url from future %} {% block title %}Arch Linux - Release Engineering Testbuild Results{% endblock %} @@ -9,12 +10,12 @@

    This is an overview screen showing a test results matrix of release engineering produced ISOs. Various options and configurations are shown with last success and last failure results, if known. To help improve ISO - quality, you are encouraged to give feedback + quality, you are encouraged to give feedback if you have tested and used any ISOs. Both successful and failed results are encouraged and welcome.

    For a overview of which ISOs tested best, have a look at - the overview.

    + the overview.

    For more information, see the documentation diff --git a/templates/releng/thanks.html b/templates/releng/thanks.html index 80018b0..66d65a5 100644 --- a/templates/releng/thanks.html +++ b/templates/releng/thanks.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load url from future %} {% block title %}Arch Linux - Feedback - Thanks!{% endblock %} @@ -7,9 +8,9 @@

    Thanks!

    Thank you for taking the time to give us this information! Your results have been succesfully added to our database.

    -

    You can now go back to the results, - give more feedback, or - have a look at the look at +

    You can now go back to the results, + give more feedback, or + have a look at the look at the ISO test overview.

    {% endblock %} diff --git a/templates/visualize/index.html b/templates/visualize/index.html index a7727b1..a7855eb 100644 --- a/templates/visualize/index.html +++ b/templates/visualize/index.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% load url from future %} {% block title %}Arch Linux - Visualizations{% endblock %} @@ -34,11 +35,11 @@ {% endblock %} -- cgit v1.2.3-24-g4f1b