From fe3335e2882c6e675d569597b2983d62c5f8924b Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Mon, 18 Jun 2012 12:48:07 -0700 Subject: [PATCH] Switch to django-compressor --- .gitignore | 1 + .../base/static/css}/main.css | 0 .../base/static}/img/logo-airmo-lg.png | Bin .../base/static/js}/libs/jquery-1.4.4.min.js | 0 .../base/static/js}/libs/jquery-1.7.2.min.js | 0 airmozilla/base/templates/main_base.html | 13 ++- airmozilla/main/templates/main/home.html | 5 +- .../static/manage/css}/bootstrap.min.css | 0 .../manage/static/manage/css}/manage.css | 4 +- .../img}/glyphicons-halflings-white.png | Bin .../manage/img}/glyphicons-halflings.png | Bin .../manage/static/manage/js}/bootstrap.min.js | 0 .../templates/{ => manage}/_form_buttons.html | 0 .../templates/{ => manage}/event_edit.html | 0 .../templates/{ => manage}/event_request.html | 0 .../templates/{ => manage}/group_edit.html | 0 .../templates/{ => manage}/group_new.html | 0 .../manage/templates/{ => manage}/groups.html | 0 .../manage/templates/{ => manage}/home.html | 2 +- .../templates/{ => manage}/manage_base.html | 12 ++- .../{ => manage}/participant_edit.html | 0 .../templates/{ => manage}/user_edit.html | 0 .../manage/templates/{ => manage}/users.html | 0 airmozilla/manage/views.py | 18 ++-- airmozilla/settings/base.py | 19 ---- airmozilla/settings/local.py-dist | 10 +- airmozilla/urls.py | 8 +- media/css/.gitignore | 0 media/img/.gitignore | 0 media/js/.gitignore | 0 media/js/main/libs/jquery.cookie.js | 96 ------------------ requirements/dev.txt | 1 + vendor | 2 +- 33 files changed, 44 insertions(+), 147 deletions(-) rename {media/css/main => airmozilla/base/static/css}/main.css (100%) rename {media => airmozilla/base/static}/img/logo-airmo-lg.png (100%) rename {media/js/main => airmozilla/base/static/js}/libs/jquery-1.4.4.min.js (100%) rename {media/js/main => airmozilla/base/static/js}/libs/jquery-1.7.2.min.js (100%) rename {media/css/manage => airmozilla/manage/static/manage/css}/bootstrap.min.css (100%) rename {media/css/manage => airmozilla/manage/static/manage/css}/manage.css (53%) rename {media/img/manage => airmozilla/manage/static/manage/img}/glyphicons-halflings-white.png (100%) rename {media/img/manage => airmozilla/manage/static/manage/img}/glyphicons-halflings.png (100%) rename {media/js/manage => airmozilla/manage/static/manage/js}/bootstrap.min.js (100%) rename airmozilla/manage/templates/{ => manage}/_form_buttons.html (100%) rename airmozilla/manage/templates/{ => manage}/event_edit.html (100%) rename airmozilla/manage/templates/{ => manage}/event_request.html (100%) rename airmozilla/manage/templates/{ => manage}/group_edit.html (100%) rename airmozilla/manage/templates/{ => manage}/group_new.html (100%) rename airmozilla/manage/templates/{ => manage}/groups.html (100%) rename airmozilla/manage/templates/{ => manage}/home.html (86%) rename airmozilla/manage/templates/{ => manage}/manage_base.html (81%) rename airmozilla/manage/templates/{ => manage}/participant_edit.html (100%) rename airmozilla/manage/templates/{ => manage}/user_edit.html (100%) rename airmozilla/manage/templates/{ => manage}/users.html (100%) delete mode 100644 media/css/.gitignore delete mode 100644 media/img/.gitignore delete mode 100644 media/js/.gitignore delete mode 100644 media/js/main/libs/jquery.cookie.js diff --git a/.gitignore b/.gitignore index dfdf4352..b56fe5a5 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ tmp/* *~ *.mo .virtualenv +/static/ diff --git a/media/css/main/main.css b/airmozilla/base/static/css/main.css similarity index 100% rename from media/css/main/main.css rename to airmozilla/base/static/css/main.css diff --git a/media/img/logo-airmo-lg.png b/airmozilla/base/static/img/logo-airmo-lg.png similarity index 100% rename from media/img/logo-airmo-lg.png rename to airmozilla/base/static/img/logo-airmo-lg.png diff --git a/media/js/main/libs/jquery-1.4.4.min.js b/airmozilla/base/static/js/libs/jquery-1.4.4.min.js similarity index 100% rename from media/js/main/libs/jquery-1.4.4.min.js rename to airmozilla/base/static/js/libs/jquery-1.4.4.min.js diff --git a/media/js/main/libs/jquery-1.7.2.min.js b/airmozilla/base/static/js/libs/jquery-1.7.2.min.js similarity index 100% rename from media/js/main/libs/jquery-1.7.2.min.js rename to airmozilla/base/static/js/libs/jquery-1.7.2.min.js diff --git a/airmozilla/base/templates/main_base.html b/airmozilla/base/templates/main_base.html index 9b2b495e..b59a08a3 100644 --- a/airmozilla/base/templates/main_base.html +++ b/airmozilla/base/templates/main_base.html @@ -1,19 +1,22 @@ - + {% block page_title %}Air Mozilla{% endblock %} - + {% block site_css %} - {{ css('main_css') }} + {% compress css %} + + {% endcompress %} {% endblock %} {% block content %}{% endblock %} {% block site_js %} - {{ js('main_js') }} + {% compress js %} + + {% endcompress %} {% endblock %} - diff --git a/airmozilla/main/templates/main/home.html b/airmozilla/main/templates/main/home.html index 8a70ef55..3224eda7 100644 --- a/airmozilla/main/templates/main/home.html +++ b/airmozilla/main/templates/main/home.html @@ -6,11 +6,12 @@ {% if request.user.is_active %} +

{{ _('You are logged in as {username}')|f(username=request.user) }}. {{ _('Log out') }}

{% else %}

{{ _('Log in with BrowserID') }}

-
+ {{ csrf() }} {{ browserid_form.as_p() }}
@@ -18,7 +19,7 @@ {% endblock %} {% block site_js %} - {{ js('main_js') }} + {{ super() }} {% if not request.user.is_active %} {{ browserid_form.media }} {% endif %} diff --git a/media/css/manage/bootstrap.min.css b/airmozilla/manage/static/manage/css/bootstrap.min.css similarity index 100% rename from media/css/manage/bootstrap.min.css rename to airmozilla/manage/static/manage/css/bootstrap.min.css diff --git a/media/css/manage/manage.css b/airmozilla/manage/static/manage/css/manage.css similarity index 53% rename from media/css/manage/manage.css rename to airmozilla/manage/static/manage/css/manage.css index f777c0d7..403a07e7 100644 --- a/media/css/manage/manage.css +++ b/airmozilla/manage/static/manage/css/manage.css @@ -1,4 +1,6 @@ -[class^="icon-"] {background-image: url("/media/img/manage/glyphicons-halflings.png")} +[class^="icon-"] { + background-image: url("../img/glyphicons-halflings.png"); +} body { padding-top: 15px; diff --git a/media/img/manage/glyphicons-halflings-white.png b/airmozilla/manage/static/manage/img/glyphicons-halflings-white.png similarity index 100% rename from media/img/manage/glyphicons-halflings-white.png rename to airmozilla/manage/static/manage/img/glyphicons-halflings-white.png diff --git a/media/img/manage/glyphicons-halflings.png b/airmozilla/manage/static/manage/img/glyphicons-halflings.png similarity index 100% rename from media/img/manage/glyphicons-halflings.png rename to airmozilla/manage/static/manage/img/glyphicons-halflings.png diff --git a/media/js/manage/bootstrap.min.js b/airmozilla/manage/static/manage/js/bootstrap.min.js similarity index 100% rename from media/js/manage/bootstrap.min.js rename to airmozilla/manage/static/manage/js/bootstrap.min.js diff --git a/airmozilla/manage/templates/_form_buttons.html b/airmozilla/manage/templates/manage/_form_buttons.html similarity index 100% rename from airmozilla/manage/templates/_form_buttons.html rename to airmozilla/manage/templates/manage/_form_buttons.html diff --git a/airmozilla/manage/templates/event_edit.html b/airmozilla/manage/templates/manage/event_edit.html similarity index 100% rename from airmozilla/manage/templates/event_edit.html rename to airmozilla/manage/templates/manage/event_edit.html diff --git a/airmozilla/manage/templates/event_request.html b/airmozilla/manage/templates/manage/event_request.html similarity index 100% rename from airmozilla/manage/templates/event_request.html rename to airmozilla/manage/templates/manage/event_request.html diff --git a/airmozilla/manage/templates/group_edit.html b/airmozilla/manage/templates/manage/group_edit.html similarity index 100% rename from airmozilla/manage/templates/group_edit.html rename to airmozilla/manage/templates/manage/group_edit.html diff --git a/airmozilla/manage/templates/group_new.html b/airmozilla/manage/templates/manage/group_new.html similarity index 100% rename from airmozilla/manage/templates/group_new.html rename to airmozilla/manage/templates/manage/group_new.html diff --git a/airmozilla/manage/templates/groups.html b/airmozilla/manage/templates/manage/groups.html similarity index 100% rename from airmozilla/manage/templates/groups.html rename to airmozilla/manage/templates/manage/groups.html diff --git a/airmozilla/manage/templates/home.html b/airmozilla/manage/templates/manage/home.html similarity index 86% rename from airmozilla/manage/templates/home.html rename to airmozilla/manage/templates/manage/home.html index 85a3daf7..f58ca5f8 100644 --- a/airmozilla/manage/templates/home.html +++ b/airmozilla/manage/templates/manage/home.html @@ -1,4 +1,4 @@ -{% extends "manage_base.html" %} +{% extends "manage/manage_base.html" %} {% set page = "home" %} {% block manage_title %} diff --git a/airmozilla/manage/templates/manage_base.html b/airmozilla/manage/templates/manage/manage_base.html similarity index 81% rename from airmozilla/manage/templates/manage_base.html rename to airmozilla/manage/templates/manage/manage_base.html index 0e551828..0149b3a3 100644 --- a/airmozilla/manage/templates/manage_base.html +++ b/airmozilla/manage/templates/manage/manage_base.html @@ -25,14 +25,17 @@ {% block page_title %}Air Mozilla Management{% endblock %} {% block site_css %} - {{ css('manage_css') }} + {% compress css %} + + + {% endcompress %} {% endblock %}