From c40fc2d0dca1ee89fb5948eedfa3e342250371ad Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 26 Jul 2015 18:11:08 +0000 Subject: [PATCH 01/46] Added staticfiles and CDN-related settings to settings.py - Legacy-Id: 9885 --- ietf/settings.py | 59 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/ietf/settings.py b/ietf/settings.py index b4866275d..d296e1fd9 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -21,9 +21,16 @@ sys.path.append(os.path.abspath(BASE_DIR + "/..")) import datetime +from ietf import __version__ + DEBUG = True TEMPLATE_DEBUG = DEBUG +# Valid values: +# 'production', 'test', 'development' +# Override this in settings_local.py if it's not the desired setting: +SERVER_MODE = 'development' + # Domain name of the IETF IETF_DOMAIN = 'ietf.org' @@ -91,8 +98,34 @@ USE_TZ = False MEDIA_URL = 'https://www.ietf.org/' -STATIC_URL = "/" -STATIC_ROOT = os.path.abspath(BASE_DIR + "/../static/") +# Absolute path to the directory static files should be collected to. +# Example: "/var/www/example.com/static/" +STATIC_ROOT = os.path.abspath(BASE_DIR + "/../static/lib/") + + +SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE = True + +# URL to use when referring to static files located in STATIC_ROOT. +if SERVER_MODE != 'production' and SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE: + STATIC_URL = "/lib/" +else: + STATIC_URL = "https://www.ietf.org/lib/dt/%s/"%__version__ + +# Destination for components handled by djangobower +COMPONENT_ROOT = STATIC_ROOT + +# List of finder classes that know how to find static files in +# various locations. +STATICFILES_FINDERS = ( + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + 'ietf.storage.CdnStorageFinder', +) + + +# Absolute path to the files not served through the staticfiles app +STATIC_LOCAL = os.path.abspath(BASE_DIR + "/../static/") + WSGI_APPLICATION = "ietf.wsgi.application" @@ -191,19 +224,26 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'ietf.context_processors.rfcdiff_base_url', ) +# Additional locations of static files +STATICFILES_DIRS = ( + os.path.join(BASE_DIR, 'static'), +) + INSTALLED_APPS = ( # Django apps - 'django.contrib.auth', - 'django.contrib.contenttypes', - 'django.contrib.sessions', - 'django.contrib.sites', - 'django.contrib.sitemaps', 'django.contrib.admin', 'django.contrib.admindocs', + 'django.contrib.auth', + 'django.contrib.contenttypes', 'django.contrib.humanize', 'django.contrib.messages', + 'django.contrib.sessions', + 'django.contrib.sitemaps', + 'django.contrib.sites', + 'django.contrib.staticfiles', # External apps 'bootstrap3', + 'djangobwr', 'form_utils', 'tastypie', 'widget_tweaks', @@ -278,11 +318,6 @@ INTERNAL_IPS = ( IDTRACKER_BASE_URL = "https://datatracker.ietf.org" RFCDIFF_BASE_URL = "https://www.ietf.org/rfcdiff" -# Valid values: -# 'production', 'test', 'development' -# Override this in settings_local.py if it's not true -SERVER_MODE = 'development' - # The name of the method to use to invoke the test suite TEST_RUNNER = 'ietf.utils.test_runner.IetfTestRunner' From 415f42af822783255b0f4be73b27b2e7f3e027a7 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 26 Jul 2015 18:12:15 +0000 Subject: [PATCH 02/46] Added a static directory to hold possible future staticfiles and also README and bower.json files related to the CDN-related changes. - Legacy-Id: 9886 --- ietf/static/README.rst | 22 ++++++++++++++++++++++ ietf/static/bower.json | 17 +++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 ietf/static/README.rst create mode 100644 ietf/static/bower.json diff --git a/ietf/static/README.rst b/ietf/static/README.rst new file mode 100644 index 000000000..5b4595ae1 --- /dev/null +++ b/ietf/static/README.rst @@ -0,0 +1,22 @@ +Handling of External Javascript and CSS Components +================================================== + +This directory (``ietf/static/``) exists for the sole purpose of providing a visible +location for ``ietf/static/bower.json``, a bower_ file which lists the external +web assets used by the datatracker. + +In order to update the version of a component listed in ``ietf/static/bower.json``, +or add a new one, you should edit ``bower.json``, and then run the management command:: + + $ ietf/manage.py bower_install + +That command will fetch the required version of each external component listed in ``bower.json`` +(actually, it will do this for *all* ``bower.json`` files found in the ``static/`` directories +of all ``INSTALLED_APPS`` and the directories in ``settings.STATICFILES_DIRS``), saving them +temporarily under ``.tmp/bower_components/``; it will then extract the relevant ``js`` and +``css`` files and place them in an appropriately named directory under ``static/lib/``. The +latter location is controlled by ``COMPONENT_ROOT`` in ``settings.py``. + +(Not surprisingly, you need to have bower_ installed in order to use this management command.) + +.. _bower: http://bower.io/ diff --git a/ietf/static/bower.json b/ietf/static/bower.json new file mode 100644 index 000000000..ec91739b8 --- /dev/null +++ b/ietf/static/bower.json @@ -0,0 +1,17 @@ +{ + "name": "datatracker", + "version": "6.0.0", + "ignore": [], + "main": [], + "dependencies": { + "bootstrap": "3.3.4", + "bootstrap-datepicker": "1.3.1", + "font-awesome": "4.3.0", + "jquery": "1.11.2", + "jquery.cookie": "1.4.1", + "qunit": "1.12.0", + "select2": "3.5.2", + "select2-bootstrap-css": "1.4.6" + }, + "devDependencies": {} +} From a2bd61c29e097807d20f6633c318b16e5a16d34a Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 26 Jul 2015 18:12:59 +0000 Subject: [PATCH 03/46] Added a static/README file to provide guidance on the new static files setup. - Legacy-Id: 9887 --- static/README.rst | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 static/README.rst diff --git a/static/README.rst b/static/README.rst new file mode 100644 index 000000000..27691afc1 --- /dev/null +++ b/static/README.rst @@ -0,0 +1,57 @@ +Handling of External Javascript and CSS Components +================================================== + +This directory (``static/``) holds a number of subdirectories, where one is handled +differently than the rest: the ``lib/`` subdirectory holds distribution files for external +client-side components, currently (18 Apr 2015) this means ``js`` and ``css`` components. + +These components each reside in their own subdirectory, which is named with the component +name: + + henrik@zinfandel $ ls -l static/lib + total 44 + drwxr-xr-x 6 henrik henrik 4096 Jul 25 15:25 bootstrap + drwxr-xr-x 4 henrik henrik 4096 Jul 25 15:25 bootstrap-datepicker + drwxr-xr-x 4 henrik henrik 4096 Jul 25 15:25 font-awesome + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 jquery + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 jquery.cookie + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptmono + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptsans + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptserif + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 select2 + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 select2-bootstrap-css + +If resources served over a CDN and/or with a high max-age don't have different URLs for +different versions, then any component upgrade which is accompanied by a change in template +functionality will be have a long transition time during which the new pages are served with +old components, with possible breakage. We want to avoid this. + +The intention is that after a release has been checked out, but before it is deployed, +the whole static directory should be copied to a location which is accessible under the +URL given by STATIC_URL -- in production mode this URL contains the datatracker release +version, which will let the CDN serve the static files which correspond to the current +release. + +With the exception of the ``pt*`` fonts, all components under ``static/lib/`` are managed +through a bower_ file; ``ietf/static/bower.json``. In order to install a new +version of a component, you should update the ``bower.json`` file, and then run the management +command:: + + $ ietf/manage.py bower_install + +That command will fetch the required version of each external component listed in +``bower.json`` (actually, it will do this for *all* ``bower.json`` files found in the +``static/`` directories of all ``INSTALLED_APPS``), saving them temporarily under +``.tmp/bower_components/``; it will then extract the relevant ``js`` and ``css`` files and +place them in an appropriately named directory under ``static/lib/``. The location +used by ``bower_install`` is is controlled by ``COMPONENT_ROOT`` in ``settings.py``. + +Any datatracker-specific static files which should be served by the CDN rather than +directly by the datatracker web server should be moved from under ``static/ to ``ietf/static/``, +so that they will be collected by the ``ietf/manage.py collectstatic`` command and +placed under `static/lib/`` from where they will be made available to the CDN. Any +template files referencing the files in question will need to be updated to use the +``{% static 'foo/bar.jpg' %}`` notation to reference the files, so that the correct +static url will be emitted. + +.. _bower: http://bower.io/ From f9fa3eb1cc2ab20ffbe18a3faf67e5585321a543 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 26 Jul 2015 18:14:30 +0000 Subject: [PATCH 04/46] Modified the development and test settings for static files to match the new settings. - Legacy-Id: 9888 --- ietf/urls.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ietf/urls.py b/ietf/urls.py index a243c6d2f..5ede11fc4 100644 --- a/ietf/urls.py +++ b/ietf/urls.py @@ -74,10 +74,10 @@ for n,a in api._api_list: if settings.SERVER_MODE in ('development', 'test'): urlpatterns += patterns('', - (r'^(?P(?:images|css|js|test|static|fonts|other)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), - (r'^(?Padmin/(?:img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), - (r'^(?Psecretariat/(img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), - (r'^(?Probots\.txt)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT+"dev/"}), + (r'^(?P(?:images|css|js|test|static|fonts|other)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL}), + (r'^(?Padmin/(?:img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL}), + (r'^(?Psecretariat/(img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL}), + (r'^(?Probots\.txt)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL+"dev/"}), (r'^_test500/$', lambda x: None), (r'^environment/$', 'ietf.help.views.environment'), ) From 54aac4e12a5b85f9191066360b2dc6fa48ca02ab Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sun, 26 Jul 2015 18:15:24 +0000 Subject: [PATCH 05/46] Updated templates to use the 'static' template tag to dynamically point to the correct static files location. - Legacy-Id: 9889 --- ietf/templates/base.html | 17 ++++++++--------- ietf/templates/doc/change_shepherd.html | 8 ++++---- ietf/templates/doc/draft/change_replaces.html | 8 ++++---- .../doc/status_change/make_last_call.html | 6 +++--- ietf/templates/group/edit.html | 8 ++++---- ietf/templates/group/edit_milestones.html | 12 ++++++------ ietf/templates/group/stream_edit.html | 8 ++++---- ietf/templates/ipr/details_edit.html | 10 +++++----- ietf/templates/ipr/email.html | 6 +++--- ietf/templates/liaisons/edit.html | 12 ++++++------ ietf/templates/meeting/agenda_list.html | 3 ++- ietf/templates/meeting/landscape_edit.html | 4 ++-- ietf/templates/meeting/properties_edit.html | 4 ++-- ietf/templates/meeting/room-view.html | 6 +++--- ietf/templates/meeting/room_edit.html | 4 ++-- ietf/templates/meeting/timeslot_edit.html | 4 ++-- ietf/templates/nomcom/edit_nomcom.html | 6 +++--- ietf/templates/nomcom/edit_position.html | 8 ++++---- ietf/templates/submit/submission_status.html | 7 ++++--- 19 files changed, 71 insertions(+), 70 deletions(-) diff --git a/ietf/templates/base.html b/ietf/templates/base.html index 7f11dd367..6dafc1791 100644 --- a/ietf/templates/base.html +++ b/ietf/templates/base.html @@ -1,4 +1,4 @@ - {% load ietf_filters %} + {% load ietf_filters staticfiles %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %}{% origin %} @@ -8,18 +8,18 @@ {% block title %}No title{% endblock %} - - - + + + {% comment %} {% endcomment %} + - - - - - - - - -
-
- - - - - - - - - -
- -
-
hidden rooms:0/11
-
-
-
-
hidden days:0/7
-
-
- -
- -
- -
-
-
- < -
- Unassigned Events: - name: mtg_83 -
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
x
- Mon (2013-12-02) -
-
-
-
-
-
x
- Tue (2013-12-03) - -
-
-
-
-
0900-1130 1300-1500 0900-1130
-
X
-
apple (61)
- - -
-
X
-
orange (70)
- - -
-
X
-
grape (80)
- - -
-
X
-
pineapple (90)
- - -
-
X
-
tomato (100)
- - -
-
X
-
squash (110)
- - -
-
X
-
raisin (120)
- - -
-
X
-
cucumber (130)
- - -
- - - -
- - -
-
Session Information:
- -
-
- - - - -
Group: -
Name:
Area:
-
- -
- - - - - -
Duration/Capacity:
Location:
Responsible AD:
Requested By:
-
- -
-
Special Requests
- - - - - - - - - - - -
- Group conflicts - -
    -
-
- be present - -
    -
-
-
-
-
- -
-
- -
-
- - APP - - GEN - - INT - - IRTF - - OPS - - RAI - - RTG - - SEC - - TSV - -
-
- -
- -
Agenda name: mtg_83
-
-
-

- -
-
-
- - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - From ff274b5e8b733323078e2fa6c0ff30cdc7fc55c5 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 12:57:08 +0000 Subject: [PATCH 29/46] Removed the link under bootstrap/static; it's not needed any more. - Legacy-Id: 9935 --- bootstrap/static/custom-bootstrap | 1 - 1 file changed, 1 deletion(-) delete mode 120000 bootstrap/static/custom-bootstrap diff --git a/bootstrap/static/custom-bootstrap b/bootstrap/static/custom-bootstrap deleted file mode 120000 index 85d8c32f3..000000000 --- a/bootstrap/static/custom-bootstrap +++ /dev/null @@ -1 +0,0 @@ -../dist \ No newline at end of file From 71cfe9459fcd1edc89ad972a275804301cdcaa61 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 12:59:14 +0000 Subject: [PATCH 30/46] - Legacy-Id: 9937 --- ietf/static/coverage/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 ietf/static/coverage/.gitignore diff --git a/ietf/static/coverage/.gitignore b/ietf/static/coverage/.gitignore new file mode 100644 index 000000000..33662f554 --- /dev/null +++ b/ietf/static/coverage/.gitignore @@ -0,0 +1 @@ +/* From 8aeca50394707c8ade19ce2c7e6f81f1549cefac Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 14:53:04 +0000 Subject: [PATCH 31/46] Writeup of CDN-related changes. - Legacy-Id: 9944 --- README-CDN.rst | 222 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 222 insertions(+) create mode 100644 README-CDN.rst diff --git a/README-CDN.rst b/README-CDN.rst new file mode 100644 index 000000000..33ecdb118 --- /dev/null +++ b/README-CDN.rst @@ -0,0 +1,222 @@ +================================================================================ + Serving Static Datatracker Files via a CDN +================================================================================ + +Intro +===== + +With release 6.4.0, the way that the static files used by the datatracker are +handled changes substantially. Static files were previously versioned under a +top-level ``static/`` directory, but this is not the case any more. External +files (such as for instance ``jquery.min.js``) are now placed under +``ietf/externals/static/`` and updated using a tool called bower_, while +datatracker-specific files (images, css, js, etc.) are located under +``ietf/static/ietf/`` and ``ietf/secr/static/secr/`` respectively. + +The following sections provide more details about handling of internals, +externals, and how deployment is done. + + +Serving Static Files via CDN +============================ + +If resources served over a CDN and/or with a high max-age don't have different +URLs for different versions, then any component upgrade which is accompanied +by a change in template functionality will have a long transition time +during which the new pages are served with old components, with possible +breakage. We want to avoid this. + +The intention is that after a release has been checked out, but before it is +deployed, the standard django 'collectstatic' management command will be +run, resulting in all static files being collected from their working +directory location and placed in an appropiate location for serving via CDN. +This location will have the datatracker release version as part of its URL, +so that after the deployment of a new release, the CDN will be forced to fetch +the appropriate static files for that release. + +An important part of this is to set up the ``STATIC_ROOT`` and ``STATIC_URL`` +settings appropriately. In 6.4.0, the setting is as follows in production +mode:: + + STATIC_URL = "https://www.ietf.org/lib/dt/%s/"%__version__ + STATIC_ROOT = CDN_ROOT + "/a/www/www6s/lib/dt/%s/"%__version__ + +The result is that all static files collected via the ``collectstatic`` +command will be placed in a location served via CDN, with the release +version being part of the URL. + +In development mode, ``STATIC_URL`` is set to ``/static/``, and Django's +``staticfiles`` infrastructure makes the static files available under that +local URL root. + + +Handling of External Javascript and CSS Components +================================================== + +In order to make it easy to keep track of and upgrade external components, +these are now handled by a tool called ``bower``, via a new management +command ``bower_install``. Each external component is listed in a file +``ietf/bower.json``. In order to update the version of a component listed in +``ietf/bower.json``, or add a new one, you should edit ``bower.json``, and +then run the management command:: + + $ ietf/manage.py bower_install + +(Not surprisingly, you need to have bower_ installed in order to use this +management command.) + +That command will fetch the required version of each external component listed +in ``bower.json`` (actually, it will do this for *all* ``bower.json`` files +found in the ``static/`` directories of all ``INSTALLED_APPS`` and the +directories in ``settings.STATICFILES_DIRS``), saving them temporarily under +``.tmp/bower_components/``; it will then extract the relevant production +``js`` and ``css`` files and place them in an appropriately named directory +under ``ietf/externals/static/``. The latter location is taken from +``COMPONENT_ROOT`` in ``settings.py``. + +Managing external components via bower has the additional benefit of +managing dependencies -- components that have dependencies will pull in +these, so that they also are placed under ``ietf/externals/static/``. +You still have to manually add the necessary stylesheet and/or javascript +references to your templates, though. + +The ``bower_install`` command is not run automatically by ``bin/mkrelease``, +since it needs an updated ``bower.json`` in order to do anything interesting. +So when you're intending to update an external web asset to a newer version, +you need to edit the ``bower.json`` file, run ``manage.py bower_install``, +verify that the new version doesn't break things, and then commit the new +files under ``ietf/externals/static/`` and the updated ``bower.json``. + +.. _bower: http://bower.io/ + +The ``ietf/externals/static/`` Directory +----------------------------------------- + +The directory ``ietf/externals/static/`` holds a number of subdirectories +which hold distribution files for external client-side components, collected +by ``bower_install`` as described above. Currently +(01 Aug 2015) this means ``js`` and ``css`` components and fonts. + +These components each reside in their own subdirectory, which is named with +the component name:: + + henrik@zinfandel $ ls -l ietf/externals/static/ + total 40 + drwxr-xr-x 6 henrik henrik 4096 Jul 25 15:25 bootstrap + drwxr-xr-x 4 henrik henrik 4096 Jul 25 15:25 bootstrap-datepicker + drwxr-xr-x 4 henrik henrik 4096 Jul 25 15:25 font-awesome + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 jquery + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 jquery.cookie + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptmono + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptsans + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:24 ptserif + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 select2 + drwxr-xr-x 2 henrik henrik 4096 Jul 25 15:25 select2-bootstrap-css + +The ``pt*`` fonts are an exception, in that there is no bower component +available for these fonts, so they have been put in place manually. + + +Handling of Internal Static Files +================================= + +Previous to this release, internal static files were located under +``static/``, mixed together with the external components. They are now +located under ``ietf/static/ietf/`` and ``ietf/secr/static/secr``, and will be +collected for serving via CDN by the ``collectstatic`` command. Any static +files associated with a particular app will be handled the same way (which +means that all ``admin/`` static files automatically will be handled correctly, too). + +Handling of Customised Bootstrap Files +====================================== + +We are using a customised version of Bootstrap_, which is handled specially, +by a SVN externals definition in ``ietf/static/ietf``. That pulls the content +of the ``bootstrap/dist/`` directory (which is generated by running ``grunt`` +in the ``bootstrap/`` directory) into ``ietf/static/ietf/bootstrap``, from +where it is collected by ``collectstatic``. + +Changes to Template Files +========================= + +In order to make the template files refer to the correct versioned CDN URL +(as given by the STATIC_URL root) all references to static files in the +templates have been updated to use the ``static`` template tag when referring +to static files. This will automatically result in both serving static files +from the right place in development mode, and referring to the correct +versioned URL in production mode and the simpler ``/static/`` urls in +development mode. + +.. _bootstrap: http://getbootstrap.com/ + +Deployment +========== + +During deployment, it is now necessary to run the management command:: + + $ ietf/manage.py collectstatic + +before activating a new release. The deployment README file has been updated +accordingly, and now reads as follows:: + + In order to fetch a new release of the django datatracker code, simply + check out the appropriate tag from svn: + + svn co http://svn.tools.ietf.org/svn/tools/ietfdb/tags/$releasenumber + + Don't forget to copy $releasenumber/ietf/settings_local.py from the + old release to the new one; otherwise it won't work! + + cp $oldreleasenumber/ietf/settings_local.py $releasenumber/ietf/ + + Change into the new directory: + + cd $releasenumber + + Next, upgrade pip and install requirements: + + pip install --upgrade pip + pip install -r requirements.txt + + Run migrations: + + ietf/manage.py migrate + + * NEW * + Move static files to the appropriate directory for serving via CDN: + + ietf/manage.py collectstatic + + * NEW * + Run some basic datatracker system checks: + + ietf/manage.py check + + Change back out to the parent directory: + + cd .. + + and then re-point the 'web' symlink: + + rm ./web; ln -s $releasenumber web + + and finally restart apache: + + sudo /etc/init.d/apache2 restart + + It's now also a good idea to go to the datatracker front page: + + http://datatracker.ietf.org/ + + to check that it's alive and kicking, and displaying the new release + number at the bottom of the left-side menubar :-) -- if not, revert the + symlink step, re-pointing the symlink to the release that was running + before the new release, and restart apache again to roll back to that. + + Finally, make sure the datatracker rsyncs over to IETFB, and then run the + PIP commands on ietfb as well: + + ssh ietfb + pip install --upgrade pip + pip install -r requirements.txt + From 9cb8f65c8e7bb0da09a32ba86e764fec99015c10 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 14:53:59 +0000 Subject: [PATCH 32/46] Updated templates to use the static template tag for static files. - Legacy-Id: 9945 --- ietf/secr/templates/announcement/confirm.html | 3 +- ietf/secr/templates/areas/add.html | 4 +- ietf/secr/templates/areas/edit.html | 4 +- ietf/secr/templates/areas/list.html | 4 +- ietf/secr/templates/areas/people.html | 8 ++-- ietf/secr/templates/areas/view.html | 4 +- ietf/secr/templates/base_secr.html | 9 ++-- ietf/secr/templates/base_site.html | 3 +- ietf/secr/templates/drafts/abstract.html | 3 +- ietf/secr/templates/drafts/add.html | 3 +- ietf/secr/templates/drafts/approvals.html | 3 +- ietf/secr/templates/drafts/authors.html | 7 ++-- ietf/secr/templates/drafts/confirm.html | 3 +- ietf/secr/templates/drafts/dates.html | 3 +- ietf/secr/templates/drafts/edit.html | 7 ++-- ietf/secr/templates/drafts/email.html | 3 +- ietf/secr/templates/drafts/extend.html | 3 +- ietf/secr/templates/drafts/makerfc.html | 3 +- ietf/secr/templates/drafts/replace.html | 3 +- ietf/secr/templates/drafts/revision.html | 3 +- ietf/secr/templates/drafts/search.html | 3 +- ietf/secr/templates/drafts/view.html | 3 +- ietf/secr/templates/drafts/withdraw.html | 3 +- ietf/secr/templates/groups/add.html | 3 +- ietf/secr/templates/groups/charter.html | 3 +- ietf/secr/templates/groups/edit.html | 3 +- ietf/secr/templates/groups/edit_gm.html | 5 ++- ietf/secr/templates/groups/people.html | 7 ++-- ietf/secr/templates/groups/search.html | 3 +- ietf/secr/templates/groups/view.html | 3 +- ietf/secr/templates/groups/view_gm.html | 3 +- ietf/secr/templates/meetings/add.html | 5 ++- .../templates/meetings/base_rooms_times.html | 9 ++-- ietf/secr/templates/meetings/blue_sheet.html | 3 +- .../secr/templates/meetings/edit_meeting.html | 3 +- ietf/secr/templates/meetings/main.html | 3 +- .../templates/meetings/notifications.html | 3 +- ietf/secr/templates/meetings/schedule.html | 3 +- ietf/secr/templates/meetings/select.html | 3 +- .../secr/templates/meetings/select_group.html | 3 +- ietf/secr/templates/meetings/view.html | 3 +- ietf/secr/templates/proceedings/convert.html | 4 +- .../templates/proceedings/edit_slide.html | 4 +- .../proceedings/interim_meeting.html | 4 +- .../templates/proceedings/interim_select.html | 4 +- ietf/secr/templates/proceedings/main.html | 4 +- .../secr/templates/proceedings/recording.html | 7 ++-- .../templates/proceedings/recording_edit.html | 4 +- .../templates/proceedings/replace_slide.html | 4 +- ietf/secr/templates/proceedings/select.html | 6 +-- ietf/secr/templates/proceedings/status.html | 4 +- .../proceedings/upload_presentation.html | 4 +- .../templates/proceedings/upload_unified.html | 8 ++-- ietf/secr/templates/proceedings/view.html | 4 +- ietf/secr/templates/proceedings/wait.html | 6 +-- ietf/secr/templates/roles/base_roles.html | 7 ++-- ietf/secr/templates/roles/main.html | 9 ++-- ietf/secr/templates/rolodex/add.html | 3 +- ietf/secr/templates/rolodex/edit.html | 3 +- ietf/secr/templates/rolodex/search.html | 3 +- ietf/secr/templates/sreq/confirm.html | 3 +- ietf/secr/templates/sreq/edit.html | 6 +-- ietf/secr/templates/sreq/locked.html | 3 +- ietf/secr/templates/sreq/main.html | 3 +- ietf/secr/templates/sreq/new.html | 5 ++- ietf/secr/templates/sreq/tool_status.html | 3 +- ietf/secr/templates/sreq/view.html | 3 +- .../templates/telechat/base_telechat.html | 5 ++- ietf/templates/401.html | 3 +- ietf/templates/404.html | 3 +- ietf/templates/500.html | 3 +- ietf/templates/base.html | 18 ++++---- ietf/templates/community/manage_clist.html | 4 +- ietf/templates/doc/change_shepherd.html | 2 +- ietf/templates/doc/document_charter.html | 2 +- .../doc/document_conflict_review.html | 4 +- ietf/templates/doc/document_draft.html | 2 +- ietf/templates/doc/draft/change_replaces.html | 2 +- ietf/templates/doc/frontpage.html | 4 +- ietf/templates/doc/index_active_drafts.html | 2 +- ietf/templates/doc/state_help.html | 4 +- .../doc/status_change/edit_relations.html | 4 +- ietf/templates/doc/status_change/start.html | 4 +- ietf/templates/group/edit.html | 2 +- ietf/templates/group/edit_milestones.html | 4 +- ietf/templates/group/stream_edit.html | 2 +- ietf/templates/ipr/details_edit.html | 4 +- ietf/templates/ipr/search.html | 4 +- ietf/templates/ipr/search_result.html | 4 +- ietf/templates/liaisons/edit.html | 4 +- ietf/templates/meeting/agenda_list.html | 28 ++++++------- ietf/templates/meeting/landscape_edit.html | 30 ++++++------- ietf/templates/meeting/properties_edit.html | 28 ++++++------- ietf/templates/meeting/room-view.html | 8 ++-- ietf/templates/meeting/room_edit.html | 30 ++++++------- ietf/templates/meeting/timeslot_edit.html | 42 +++++++++---------- ietf/templates/meeting/week-view.html | 4 +- ietf/templates/nomcom/edit_position.html | 2 +- ietf/templates/submit/submission_status.html | 2 +- 99 files changed, 297 insertions(+), 245 deletions(-) diff --git a/ietf/secr/templates/announcement/confirm.html b/ietf/secr/templates/announcement/confirm.html index 4a3b4cdd7..f86c2a33b 100644 --- a/ietf/secr/templates/announcement/confirm.html +++ b/ietf/secr/templates/announcement/confirm.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Announcement{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/areas/add.html b/ietf/secr/templates/areas/add.html index 44ff75fbd..19edd797c 100644 --- a/ietf/secr/templates/areas/add.html +++ b/ietf/secr/templates/areas/add.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Areas - Add{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/areas/edit.html b/ietf/secr/templates/areas/edit.html index b2a4fc383..238c295dc 100644 --- a/ietf/secr/templates/areas/edit.html +++ b/ietf/secr/templates/areas/edit.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Areas - Edit{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/areas/list.html b/ietf/secr/templates/areas/list.html index 191b94cca..67e2e03ee 100644 --- a/ietf/secr/templates/areas/list.html +++ b/ietf/secr/templates/areas/list.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Areas{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/areas/people.html b/ietf/secr/templates/areas/people.html index bc1e513c5..51c2bd4c0 100644 --- a/ietf/secr/templates/areas/people.html +++ b/ietf/secr/templates/areas/people.html @@ -1,11 +1,11 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Areas - People{% endblock %} {% block extrahead %}{{ block.super }} - - - + + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/areas/view.html b/ietf/secr/templates/areas/view.html index 344abfbef..fb5ae8ab5 100644 --- a/ietf/secr/templates/areas/view.html +++ b/ietf/secr/templates/areas/view.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Areas - View{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/base_secr.html b/ietf/secr/templates/base_secr.html index 2ddc9ea7b..2bfc545ee 100644 --- a/ietf/secr/templates/base_secr.html +++ b/ietf/secr/templates/base_secr.html @@ -1,12 +1,13 @@ +{% load staticfiles %} {% block title %}{% endblock %} - - - + + + {% if not server_mode == "production" %} - + {% endif %} {% block extrastyle %}{% endblock %} diff --git a/ietf/secr/templates/base_site.html b/ietf/secr/templates/base_site.html index 2d473be59..207ade7b6 100644 --- a/ietf/secr/templates/base_site.html +++ b/ietf/secr/templates/base_site.html @@ -1,6 +1,7 @@ {% extends "base_secr.html" %} {% load i18n %} {% load ietf_filters %} +{% load staticfiles %} {% block title %}{{ title }}{% if user|has_role:"Secretariat" %} Secretariat Dashboard {% else %} WG Chair Dashboard {% endif %}{% endblock %} @@ -32,7 +33,7 @@ {% endblock %} diff --git a/ietf/secr/templates/drafts/abstract.html b/ietf/secr/templates/drafts/abstract.html index 3fac38d7b..65e4a7260 100644 --- a/ietf/secr/templates/drafts/abstract.html +++ b/ietf/secr/templates/drafts/abstract.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Abstract{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/add.html b/ietf/secr/templates/drafts/add.html index 65712f4d5..5eac3b363 100644 --- a/ietf/secr/templates/drafts/add.html +++ b/ietf/secr/templates/drafts/add.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Add{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/approvals.html b/ietf/secr/templates/drafts/approvals.html index 02d4754f7..4d7ce5096 100644 --- a/ietf/secr/templates/drafts/approvals.html +++ b/ietf/secr/templates/drafts/approvals.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Approvals{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/authors.html b/ietf/secr/templates/drafts/authors.html index ecdca86b2..2620db1fb 100644 --- a/ietf/secr/templates/drafts/authors.html +++ b/ietf/secr/templates/drafts/authors.html @@ -1,11 +1,12 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Authors{% endblock %} {% block extrahead %}{{ block.super }} - - - + + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/confirm.html b/ietf/secr/templates/drafts/confirm.html index a6308749a..f3be09232 100644 --- a/ietf/secr/templates/drafts/confirm.html +++ b/ietf/secr/templates/drafts/confirm.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Confirm{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/dates.html b/ietf/secr/templates/drafts/dates.html index 212bcdfd6..bf6d62722 100644 --- a/ietf/secr/templates/drafts/dates.html +++ b/ietf/secr/templates/drafts/dates.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Submission Dates{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/edit.html b/ietf/secr/templates/drafts/edit.html index 2d50099e0..bd1990fb4 100644 --- a/ietf/secr/templates/drafts/edit.html +++ b/ietf/secr/templates/drafts/edit.html @@ -1,11 +1,12 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Edit{% endblock %} {% block extrahead %}{{ block.super }} - - - + + + diff --git a/ietf/secr/templates/drafts/email.html b/ietf/secr/templates/drafts/email.html index 91b3c1a80..e07354daa 100644 --- a/ietf/secr/templates/drafts/email.html +++ b/ietf/secr/templates/drafts/email.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Email{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/extend.html b/ietf/secr/templates/drafts/extend.html index 63f306652..01d68cedb 100644 --- a/ietf/secr/templates/drafts/extend.html +++ b/ietf/secr/templates/drafts/extend.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Extend{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/makerfc.html b/ietf/secr/templates/drafts/makerfc.html index ed47ed7a2..962f76093 100644 --- a/ietf/secr/templates/drafts/makerfc.html +++ b/ietf/secr/templates/drafts/makerfc.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Make RFC{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/replace.html b/ietf/secr/templates/drafts/replace.html index f164b4f7c..79ab62f5e 100644 --- a/ietf/secr/templates/drafts/replace.html +++ b/ietf/secr/templates/drafts/replace.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Replace{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/revision.html b/ietf/secr/templates/drafts/revision.html index 54785069f..d24547dcb 100644 --- a/ietf/secr/templates/drafts/revision.html +++ b/ietf/secr/templates/drafts/revision.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Revision{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/search.html b/ietf/secr/templates/drafts/search.html index 970bb48fa..35fa810a1 100644 --- a/ietf/secr/templates/drafts/search.html +++ b/ietf/secr/templates/drafts/search.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Search{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/view.html b/ietf/secr/templates/drafts/view.html index eea7ac7c0..6d9f0a5e6 100644 --- a/ietf/secr/templates/drafts/view.html +++ b/ietf/secr/templates/drafts/view.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - View{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/drafts/withdraw.html b/ietf/secr/templates/drafts/withdraw.html index 7b3425463..3a2157aef 100644 --- a/ietf/secr/templates/drafts/withdraw.html +++ b/ietf/secr/templates/drafts/withdraw.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Drafts - Withdraw{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/groups/add.html b/ietf/secr/templates/groups/add.html index bf47973b5..6111f7ab9 100644 --- a/ietf/secr/templates/groups/add.html +++ b/ietf/secr/templates/groups/add.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Groups - Add{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/groups/charter.html b/ietf/secr/templates/groups/charter.html index 03c88527c..e87476ff4 100644 --- a/ietf/secr/templates/groups/charter.html +++ b/ietf/secr/templates/groups/charter.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Groups - Charter{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/groups/edit.html b/ietf/secr/templates/groups/edit.html index 0dcb37166..b3d21dc12 100644 --- a/ietf/secr/templates/groups/edit.html +++ b/ietf/secr/templates/groups/edit.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Groups - Edit{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/groups/edit_gm.html b/ietf/secr/templates/groups/edit_gm.html index 8f4a12ecd..dd8a7ca9c 100644 --- a/ietf/secr/templates/groups/edit_gm.html +++ b/ietf/secr/templates/groups/edit_gm.html @@ -1,10 +1,11 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Groups - Edit{% endblock %} {% block extrahead %}{{ block.super }} - - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/groups/people.html b/ietf/secr/templates/groups/people.html index 080563f54..fd157c412 100644 --- a/ietf/secr/templates/groups/people.html +++ b/ietf/secr/templates/groups/people.html @@ -1,11 +1,12 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Groups - People{% endblock %} {% block extrahead %}{{ block.super }} - - - + + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/groups/search.html b/ietf/secr/templates/groups/search.html index 6bc16cad0..285ce7bde 100644 --- a/ietf/secr/templates/groups/search.html +++ b/ietf/secr/templates/groups/search.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Groups - Search{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/groups/view.html b/ietf/secr/templates/groups/view.html index 6cb3735be..6cdcaf18f 100644 --- a/ietf/secr/templates/groups/view.html +++ b/ietf/secr/templates/groups/view.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Groups - View{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/groups/view_gm.html b/ietf/secr/templates/groups/view_gm.html index a3c943b7b..cec5f63a7 100644 --- a/ietf/secr/templates/groups/view_gm.html +++ b/ietf/secr/templates/groups/view_gm.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Groups - View G+M{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/meetings/add.html b/ietf/secr/templates/meetings/add.html index f6062a71f..ca6b2229d 100644 --- a/ietf/secr/templates/meetings/add.html +++ b/ietf/secr/templates/meetings/add.html @@ -1,10 +1,11 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Meetings - Add{% endblock %} {% block extrahead %}{{ block.super }} - - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/meetings/base_rooms_times.html b/ietf/secr/templates/meetings/base_rooms_times.html index 176075f15..54f09b1b2 100644 --- a/ietf/secr/templates/meetings/base_rooms_times.html +++ b/ietf/secr/templates/meetings/base_rooms_times.html @@ -1,12 +1,13 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Meetings{% endblock %} {% block extrahead %}{{ block.super }} - - - - + + + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/meetings/blue_sheet.html b/ietf/secr/templates/meetings/blue_sheet.html index 70ce38d32..c2722736c 100644 --- a/ietf/secr/templates/meetings/blue_sheet.html +++ b/ietf/secr/templates/meetings/blue_sheet.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Meetings - Blue Sheet{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/meetings/edit_meeting.html b/ietf/secr/templates/meetings/edit_meeting.html index 400484411..fc940cfd4 100644 --- a/ietf/secr/templates/meetings/edit_meeting.html +++ b/ietf/secr/templates/meetings/edit_meeting.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Meetings - Edit{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/meetings/main.html b/ietf/secr/templates/meetings/main.html index a8103825e..cddcd875c 100755 --- a/ietf/secr/templates/meetings/main.html +++ b/ietf/secr/templates/meetings/main.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Meetings{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/meetings/notifications.html b/ietf/secr/templates/meetings/notifications.html index 626f9fb1a..48f21cc6b 100644 --- a/ietf/secr/templates/meetings/notifications.html +++ b/ietf/secr/templates/meetings/notifications.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Meetings{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/meetings/schedule.html b/ietf/secr/templates/meetings/schedule.html index 39055aec6..f4c320824 100644 --- a/ietf/secr/templates/meetings/schedule.html +++ b/ietf/secr/templates/meetings/schedule.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Meetings{% endblock %} {% block extrahead %}{{ block.super }} - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/meetings/select_group.html b/ietf/secr/templates/meetings/select_group.html index 8b6a8beba..3840f4e1d 100644 --- a/ietf/secr/templates/meetings/select_group.html +++ b/ietf/secr/templates/meetings/select_group.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Meetings{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/meetings/view.html b/ietf/secr/templates/meetings/view.html index f1b61a907..7c70da477 100644 --- a/ietf/secr/templates/meetings/view.html +++ b/ietf/secr/templates/meetings/view.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Meetings{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/convert.html b/ietf/secr/templates/proceedings/convert.html index 6b4625512..9e6c81a99 100644 --- a/ietf/secr/templates/proceedings/convert.html +++ b/ietf/secr/templates/proceedings/convert.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Proceedings - Convert Materials{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/edit_slide.html b/ietf/secr/templates/proceedings/edit_slide.html index aa6988e67..4459704c2 100755 --- a/ietf/secr/templates/proceedings/edit_slide.html +++ b/ietf/secr/templates/proceedings/edit_slide.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Edit Slide{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/interim_meeting.html b/ietf/secr/templates/proceedings/interim_meeting.html index 302b7b3de..49a210e30 100755 --- a/ietf/secr/templates/proceedings/interim_meeting.html +++ b/ietf/secr/templates/proceedings/interim_meeting.html @@ -1,10 +1,10 @@ {% extends "base_site.html" %} {% load ietf_filters %} - +{% load staticfiles %} {% block title %}Interim Meetings{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/interim_select.html b/ietf/secr/templates/proceedings/interim_select.html index e247373a3..8e2b2146d 100755 --- a/ietf/secr/templates/proceedings/interim_select.html +++ b/ietf/secr/templates/proceedings/interim_select.html @@ -1,10 +1,10 @@ {% extends "base_site.html" %} {% load ietf_filters %} - +{% load staticfiles %} {% block title %}Proceedings{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/main.html b/ietf/secr/templates/proceedings/main.html index b5ec407b3..18d670807 100644 --- a/ietf/secr/templates/proceedings/main.html +++ b/ietf/secr/templates/proceedings/main.html @@ -1,10 +1,10 @@ {% extends "base_site.html" %} {% load ietf_filters %} - +{% load staticfiles %} {% block title %}Proceeding manager{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/recording.html b/ietf/secr/templates/proceedings/recording.html index 338a91af5..56c39c8e7 100755 --- a/ietf/secr/templates/proceedings/recording.html +++ b/ietf/secr/templates/proceedings/recording.html @@ -1,14 +1,15 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Proceedings{% endblock %} {% block extrastyle %}{{ block.super }} - + {% endblock %} {% block extrahead %}{{ block.super }} - - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/recording_edit.html b/ietf/secr/templates/proceedings/recording_edit.html index cea5c2d97..394e77785 100755 --- a/ietf/secr/templates/proceedings/recording_edit.html +++ b/ietf/secr/templates/proceedings/recording_edit.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Edit Recording{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/replace_slide.html b/ietf/secr/templates/proceedings/replace_slide.html index 712f93863..55bfd21db 100755 --- a/ietf/secr/templates/proceedings/replace_slide.html +++ b/ietf/secr/templates/proceedings/replace_slide.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Replace Slide{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/select.html b/ietf/secr/templates/proceedings/select.html index bbe891754..a56a16aa2 100755 --- a/ietf/secr/templates/proceedings/select.html +++ b/ietf/secr/templates/proceedings/select.html @@ -1,10 +1,10 @@ {% extends "base_site.html" %} {% load ietf_filters %} - +{% load staticfiles %} {% block title %}Proceedings{% endblock %} {% block extrahead %}{{ block.super }} - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/upload_presentation.html b/ietf/secr/templates/proceedings/upload_presentation.html index af64a2bb4..760ac4ef4 100644 --- a/ietf/secr/templates/proceedings/upload_presentation.html +++ b/ietf/secr/templates/proceedings/upload_presentation.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Proceedings - Upload Presentations {% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/upload_unified.html b/ietf/secr/templates/proceedings/upload_unified.html index ce8953cf4..8a605505f 100755 --- a/ietf/secr/templates/proceedings/upload_unified.html +++ b/ietf/secr/templates/proceedings/upload_unified.html @@ -1,15 +1,15 @@ {% extends "base_site.html" %} {% load ietf_filters %} - +{% load staticfiles %} {% block title %}Proceedings{% endblock %} {% block extrastyle %}{{ block.super }} - + {% endblock %} {% block extrahead %}{{ block.super }} - - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/view.html b/ietf/secr/templates/proceedings/view.html index 5dc2523bc..8a26bbb22 100644 --- a/ietf/secr/templates/proceedings/view.html +++ b/ietf/secr/templates/proceedings/view.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Proceedings - View{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/proceedings/wait.html b/ietf/secr/templates/proceedings/wait.html index f1881ab27..9440221d8 100644 --- a/ietf/secr/templates/proceedings/wait.html +++ b/ietf/secr/templates/proceedings/wait.html @@ -1,9 +1,9 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Proceeding manager{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} @@ -16,7 +16,7 @@

Proceedings


{{ message }}

- loading... + loading... {% endblock %} diff --git a/ietf/secr/templates/roles/base_roles.html b/ietf/secr/templates/roles/base_roles.html index 3bada6378..6c119c34c 100644 --- a/ietf/secr/templates/roles/base_roles.html +++ b/ietf/secr/templates/roles/base_roles.html @@ -1,11 +1,12 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Roles{% endblock %} {% block extrahead %}{{ block.super }} - - - + + + {% endblock %} diff --git a/ietf/secr/templates/roles/main.html b/ietf/secr/templates/roles/main.html index 893534331..dc5cc636d 100755 --- a/ietf/secr/templates/roles/main.html +++ b/ietf/secr/templates/roles/main.html @@ -1,11 +1,12 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Roles{% endblock %} {% block extrahead %}{{ block.super }} - - - + + + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/rolodex/edit.html b/ietf/secr/templates/rolodex/edit.html index 5b97cf7c9..7b58b8d61 100644 --- a/ietf/secr/templates/rolodex/edit.html +++ b/ietf/secr/templates/rolodex/edit.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Rolodex - Edit{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/rolodex/search.html b/ietf/secr/templates/rolodex/search.html index 56ff73b21..1baa971ac 100644 --- a/ietf/secr/templates/rolodex/search.html +++ b/ietf/secr/templates/rolodex/search.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Rolodex - Search{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/sreq/confirm.html b/ietf/secr/templates/sreq/confirm.html index 6771acd26..c69126104 100755 --- a/ietf/secr/templates/sreq/confirm.html +++ b/ietf/secr/templates/sreq/confirm.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Sessions - View{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/sreq/edit.html b/ietf/secr/templates/sreq/edit.html index f1c7a35bd..ff2ea6afe 100755 --- a/ietf/secr/templates/sreq/edit.html +++ b/ietf/secr/templates/sreq/edit.html @@ -1,10 +1,10 @@ {% extends "base_site.html" %} - +{% load staticfiles %} {% block title %}Sessions - Edit{% endblock %} {% block extrahead %}{{ block.super }} - - + + diff --git a/ietf/secr/templates/sreq/locked.html b/ietf/secr/templates/sreq/locked.html index 4c9331a4a..8fa2c4cf8 100755 --- a/ietf/secr/templates/sreq/locked.html +++ b/ietf/secr/templates/sreq/locked.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Sessions{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/sreq/main.html b/ietf/secr/templates/sreq/main.html index d73c6cdc9..48e6b1869 100755 --- a/ietf/secr/templates/sreq/main.html +++ b/ietf/secr/templates/sreq/main.html @@ -1,10 +1,11 @@ {% extends "base_site.html" %} {% load ietf_filters %} +{% load staticfiles %} {% block title %}Sessions{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/sreq/new.html b/ietf/secr/templates/sreq/new.html index 7543fda3b..1bf64efdf 100755 --- a/ietf/secr/templates/sreq/new.html +++ b/ietf/secr/templates/sreq/new.html @@ -1,10 +1,11 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Sessions- New{% endblock %} {% block extrahead %}{{ block.super }} - - + + diff --git a/ietf/secr/templates/sreq/tool_status.html b/ietf/secr/templates/sreq/tool_status.html index d079e3645..a8943993f 100755 --- a/ietf/secr/templates/sreq/tool_status.html +++ b/ietf/secr/templates/sreq/tool_status.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Sessions{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/sreq/view.html b/ietf/secr/templates/sreq/view.html index e76d785f0..14f6bc160 100644 --- a/ietf/secr/templates/sreq/view.html +++ b/ietf/secr/templates/sreq/view.html @@ -1,9 +1,10 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Sessions - View{% endblock %} {% block extrahead %}{{ block.super }} - + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/telechat/base_telechat.html b/ietf/secr/templates/telechat/base_telechat.html index 346d796f7..c9eb2f795 100644 --- a/ietf/secr/templates/telechat/base_telechat.html +++ b/ietf/secr/templates/telechat/base_telechat.html @@ -1,10 +1,11 @@ {% extends "base_site.html" %} +{% load staticfiles %} {% block title %}Telechat{% endblock %} {% block extrahead %}{{ block.super }} - - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/templates/401.html b/ietf/templates/401.html index ff03b2900..0620f5c90 100644 --- a/ietf/templates/401.html +++ b/ietf/templates/401.html @@ -1,9 +1,10 @@ {# Copyright The IETF Trust 2012, All Rights Reserved #} {% extends "base.html" %} +{% load staticfiles %} {% block title %}401 Unauthorized{% endblock %} {% block content %} - +

Authentication Required

diff --git a/ietf/templates/404.html b/ietf/templates/404.html index 7db38356d..61c5ae9aa 100644 --- a/ietf/templates/404.html +++ b/ietf/templates/404.html @@ -1,9 +1,10 @@ {# Copyright The IETF Trust 2007, All Rights Reserved #} {% extends "base.html" %} +{% load staticfiles %} {% block title %}404 Not Found{% endblock %} {% block content %} - +

The page you were looking for couldn't be found.

diff --git a/ietf/templates/500.html b/ietf/templates/500.html index 512fc182a..a7338c38c 100644 --- a/ietf/templates/500.html +++ b/ietf/templates/500.html @@ -1,9 +1,10 @@ {# Copyright The IETF Trust 2007, All Rights Reserved #} {% extends "base.html" %} +{% load staticfiles %} {% block title %}500 Internal Server Error{% endblock %} {% block content %} - +

Internal Server Error.

diff --git a/ietf/templates/base.html b/ietf/templates/base.html index 61443f9c3..435aca4d0 100644 --- a/ietf/templates/base.html +++ b/ietf/templates/base.html @@ -18,9 +18,9 @@ {% endcomment %} - - - + + + @@ -32,11 +32,11 @@ {% block pagehead %}{% endblock %} {% if server_mode and server_mode == "production" %} - + {% else %} - + {% endif %} - + @@ -51,7 +51,7 @@ - IETF Logo + IETF Logo {% if not user.is_authenticated %} {% if server_mode and server_mode == "production" %} Datatracker @@ -156,8 +156,8 @@ - - + + {% block js %}{% endblock %} diff --git a/ietf/templates/community/manage_clist.html b/ietf/templates/community/manage_clist.html index 439609d1c..bd6630359 100644 --- a/ietf/templates/community/manage_clist.html +++ b/ietf/templates/community/manage_clist.html @@ -2,7 +2,7 @@ {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} {% load future %} - +{% load staticfiles %} {% load bootstrap3 %} {% block title %}{{ cl.long_name }}{% endblock %} @@ -34,7 +34,7 @@
  • Search for the document or documents you want to add using the datatracker search form.
  • In the search results, you'll find a link to add individual documents to your list.
  • -
    Document search + Document search diff --git a/ietf/templates/doc/change_shepherd.html b/ietf/templates/doc/change_shepherd.html index 7ec17199b..2feb9c787 100644 --- a/ietf/templates/doc/change_shepherd.html +++ b/ietf/templates/doc/change_shepherd.html @@ -33,5 +33,5 @@ {% block js %} - + {% endblock %} diff --git a/ietf/templates/doc/document_charter.html b/ietf/templates/doc/document_charter.html index c8b760a3b..8f2e8fb6a 100644 --- a/ietf/templates/doc/document_charter.html +++ b/ietf/templates/doc/document_charter.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% load ietf_filters %} {% block pagehead %} diff --git a/ietf/templates/doc/document_conflict_review.html b/ietf/templates/doc/document_conflict_review.html index 1dcb5ab9a..6d7e92a5b 100644 --- a/ietf/templates/doc/document_conflict_review.html +++ b/ietf/templates/doc/document_conflict_review.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% load ietf_filters %} {% block title %}{{ doc.title }}{% endblock %} @@ -55,7 +55,7 @@ - +
    StateState {% if not snapshot and user|has_role:"Area Director,Secretariat" %} Edit diff --git a/ietf/templates/doc/document_draft.html b/ietf/templates/doc/document_draft.html index 28c6a4631..94ff03b45 100644 --- a/ietf/templates/doc/document_draft.html +++ b/ietf/templates/doc/document_draft.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% load ietf_filters %} {% block pagehead %} diff --git a/ietf/templates/doc/draft/change_replaces.html b/ietf/templates/doc/draft/change_replaces.html index 9e13cab04..790d20244 100644 --- a/ietf/templates/doc/draft/change_replaces.html +++ b/ietf/templates/doc/draft/change_replaces.html @@ -32,5 +32,5 @@ {% block js %} - + {% endblock %} diff --git a/ietf/templates/doc/frontpage.html b/ietf/templates/doc/frontpage.html index fea2e3b52..3f2d12c55 100644 --- a/ietf/templates/doc/frontpage.html +++ b/ietf/templates/doc/frontpage.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% block title %}IETF Datatracker{% if server_mode != "production" %} -- Development Mode{% endif %}{% endblock %} {% block content %} @@ -9,7 +9,7 @@
    - + {% if server_mode != "production" %}

    Datatracker -- {{ server_mode|capfirst }} Mode

    {% else %} diff --git a/ietf/templates/doc/index_active_drafts.html b/ietf/templates/doc/index_active_drafts.html index a036a1fbf..def15017d 100644 --- a/ietf/templates/doc/index_active_drafts.html +++ b/ietf/templates/doc/index_active_drafts.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% block title %}Active Internet-Drafts{% endblock %} {% block content %} diff --git a/ietf/templates/doc/state_help.html b/ietf/templates/doc/state_help.html index e44d67f90..ffe376ea2 100644 --- a/ietf/templates/doc/state_help.html +++ b/ietf/templates/doc/state_help.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% block title %}{{ title }}{% endblock %} {% block content %} @@ -9,7 +9,7 @@

    {{ title }}

    {% if state_type.slug == "draft-iesg" %} -

    View diagram

    +

    View diagram

    {% endif %} diff --git a/ietf/templates/doc/status_change/edit_relations.html b/ietf/templates/doc/status_change/edit_relations.html index 93daea6d4..11b104b3d 100644 --- a/ietf/templates/doc/status_change/edit_relations.html +++ b/ietf/templates/doc/status_change/edit_relations.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% load bootstrap3 %} {% block title %}Edit RFCs affected by status change{% endblock %} @@ -28,6 +28,6 @@ {% endblock %} {% block js %} - + {% endblock %} diff --git a/ietf/templates/doc/status_change/start.html b/ietf/templates/doc/status_change/start.html index e2c64eea9..5e3eb221f 100644 --- a/ietf/templates/doc/status_change/start.html +++ b/ietf/templates/doc/status_change/start.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% load bootstrap3 %} {% block title %}Begin RFC status change review{% endblock %} @@ -36,5 +36,5 @@ {% endblock %} {% block js %} - + {% endblock %} diff --git a/ietf/templates/group/edit.html b/ietf/templates/group/edit.html index de4b68673..d7e31f825 100644 --- a/ietf/templates/group/edit.html +++ b/ietf/templates/group/edit.html @@ -55,7 +55,7 @@ {% block js %} - + - + - + {% endblock %} diff --git a/ietf/templates/group/stream_edit.html b/ietf/templates/group/stream_edit.html index 2602976a7..edb462d6b 100644 --- a/ietf/templates/group/stream_edit.html +++ b/ietf/templates/group/stream_edit.html @@ -46,5 +46,5 @@ {% block js %} - + {% endblock %} diff --git a/ietf/templates/ipr/details_edit.html b/ietf/templates/ipr/details_edit.html index 2048c861e..e3b33993a 100644 --- a/ietf/templates/ipr/details_edit.html +++ b/ietf/templates/ipr/details_edit.html @@ -246,7 +246,7 @@ {% block js %} - + - + {% endblock %} diff --git a/ietf/templates/ipr/search.html b/ietf/templates/ipr/search.html index 76434de48..fa354a2f9 100644 --- a/ietf/templates/ipr/search.html +++ b/ietf/templates/ipr/search.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% block title %}IPR search{% endblock %} {% block content %} @@ -10,5 +10,5 @@ {% endblock %} {% block js %} - + {% endblock %} diff --git a/ietf/templates/ipr/search_result.html b/ietf/templates/ipr/search_result.html index e1317a4ee..34740d1f6 100644 --- a/ietf/templates/ipr/search_result.html +++ b/ietf/templates/ipr/search_result.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {# Copyright The IETF Trust 2015, All Rights Reserved #} {% load origin %} - +{% load staticfiles %} {% load ietf_filters %} {% load future %} @@ -82,5 +82,5 @@ {% endblock %} {% block js %} - + {% endblock %} diff --git a/ietf/templates/liaisons/edit.html b/ietf/templates/liaisons/edit.html index 2dc87f49e..859d0e1cb 100644 --- a/ietf/templates/liaisons/edit.html +++ b/ietf/templates/liaisons/edit.html @@ -68,6 +68,6 @@ {% block js %} - - + + {% endblock %} diff --git a/ietf/templates/meeting/agenda_list.html b/ietf/templates/meeting/agenda_list.html index 082488fc1..2d0431149 100644 --- a/ietf/templates/meeting/agenda_list.html +++ b/ietf/templates/meeting/agenda_list.html @@ -8,13 +8,13 @@ {% block title %}IETF {{ meeting.number }} Meeting Agenda{% endblock %} {% load agenda_custom_tags %} {% block pagehead %} - - - + + + {% endblock pagehead %} {% block js %} - + - - - - - - + + + + + + - - - - + + + + {% endblock js %} diff --git a/ietf/templates/meeting/landscape_edit.html b/ietf/templates/meeting/landscape_edit.html index f5a63531c..8c0e06e88 100644 --- a/ietf/templates/meeting/landscape_edit.html +++ b/ietf/templates/meeting/landscape_edit.html @@ -19,12 +19,12 @@ {% block title %}IETF {{ meeting.number }} Meeting Agenda{% endblock %} {% load agenda_custom_tags %} {% block pagehead %} - - + + {% endblock pagehead %} {% block js %} - + - - - - - - + + + + + + - - - - - + + + + + + - - - - - - + + + + + + - - - - + + + + {% endblock js %} {% block content %} diff --git a/ietf/templates/meeting/room-view.html b/ietf/templates/meeting/room-view.html index 4f568fa4e..7f94ebad1 100644 --- a/ietf/templates/meeting/room-view.html +++ b/ietf/templates/meeting/room-view.html @@ -2,10 +2,10 @@ {% load origin %}{% origin %} {% load staticfiles %} - {% comment %} This sets box-sizing: border-box {% endcomment %} - + {% comment %} This sets box-sizing: border-box {% endcomment %} + - + + - - - - - - + + + + + + - + - - - + + + - + {% endblock js %} diff --git a/ietf/templates/meeting/timeslot_edit.html b/ietf/templates/meeting/timeslot_edit.html index c5144ef14..a626abded 100644 --- a/ietf/templates/meeting/timeslot_edit.html +++ b/ietf/templates/meeting/timeslot_edit.html @@ -8,13 +8,13 @@ {% block title %}IETF {{ meeting.number }} Meeting Agenda: Timeslot/Room Availability{% endblock %} {% load agenda_custom_tags %} {% block pagehead %} - - - + + + {% endblock pagehead %} {% block js %} - + - - - - - - - + + + + + + + - + - - - + + + - - - - - + + + + + - + {% endblock %} diff --git a/ietf/templates/submit/submission_status.html b/ietf/templates/submit/submission_status.html index 50deeed28..da68c7889 100644 --- a/ietf/templates/submit/submission_status.html +++ b/ietf/templates/submit/submission_status.html @@ -330,5 +330,5 @@ {% block js %} - + {% endblock %} From d37aee7ae219a6b4eae5b7e835a79e8d0f974955 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 14:55:47 +0000 Subject: [PATCH 33/46] Updated ietf/checks.py to use STATIC_ROOT instead the CDN_STATIC_PATH used with the split-static setup. - Legacy-Id: 9946 --- ietf/checks.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ietf/checks.py b/ietf/checks.py index 4f9c789ef..9e651cbb2 100644 --- a/ietf/checks.py +++ b/ietf/checks.py @@ -7,15 +7,15 @@ from django.core import checks def check_cdn_directory_exists(app_configs, **kwargs): """This checks that the path from which the CDN will serve static files for this version of the datatracker actually exists. In development and test - mode this will normally be just STATIC_ROOT, but in production it will be - a symlink to STATIC_ROOT, with a path containing the datatracker release - version. + mode STATIC_ROOT will normally be just static/, but in production it will be + set to a different part of the file system which is served via CDN, and the + path will contain the datatracker release version. """ errors = [] - if not os.path.exists(settings.STATIC_CDN_PATH): + if not os.path.exists(settings.STATIC_ROOT): errors.append(checks.Error( - 'The CDN static files path has not been set up', - hint='Set up this symlink:\n\t%s -> %s' % (settings.STATIC_CDN_PATH, settings.STATIC_ROOT), + "The static files directory has not been set up.", + hint="Please run 'ietf/manage.py collectstatic'.", obj=None, id='datatracker.E001', )) From 0bf86be4ac3275bd25527cec73f1fd7bf19e0873 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 14:57:29 +0000 Subject: [PATCH 34/46] Added a max-age to the cache control of /group/groupmenu.ajax, in order to improve local caching. - Legacy-Id: 9947 --- ietf/group/ajax.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/group/ajax.py b/ietf/group/ajax.py index cb60df63c..2b0f8dafa 100644 --- a/ietf/group/ajax.py +++ b/ietf/group/ajax.py @@ -16,7 +16,7 @@ def group_json(request, acronym): sort_keys=True, indent=2), content_type="text/json") -@cache_control(public=True) +@cache_control(public=True, max_age=30*60) @cache_page(30 * 60) def group_menu_data(request): groups = Group.objects.filter(state="active", type__in=("wg", "rg"), parent__state="active").order_by("acronym") From 1d834801af3b5c933b50d4bb6076c56da9283456 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 14:58:08 +0000 Subject: [PATCH 35/46] Removed dead code. - Legacy-Id: 9948 --- ietf/secr/context_processors.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/ietf/secr/context_processors.py b/ietf/secr/context_processors.py index ac5ed84a6..f892c1e78 100644 --- a/ietf/secr/context_processors.py +++ b/ietf/secr/context_processors.py @@ -8,6 +8,3 @@ def server_mode(request): def secr_revision_info(request): return {'secr_revision_time': __date__[7:32], 'secr_revision_date': __date__[7:17], 'secr_revision_num': __rev__[6:-2], "secr_revision_id": __id__[5:-2], "secr_version_num": __version__ } - -def static(request): - return {'SECR_STATIC_URL': settings.SECR_STATIC_URL} From 669638da6e4feb59ac9f6df716a1092871793e78 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 14:59:40 +0000 Subject: [PATCH 36/46] Simplified the static setup, using one single static location with full collectstatic usage, instead of a split static setup. - Legacy-Id: 9949 --- ietf/settings.py | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/ietf/settings.py b/ietf/settings.py index 0aaf13ca0..7f5f0770b 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -100,21 +100,22 @@ MEDIA_URL = 'https://www.ietf.org/' # Absolute path to the directory static files should be collected to. # Example: "/var/www/example.com/static/" -STATIC_ROOT = os.path.abspath(BASE_DIR + "/../static/lib/") +CDN_ROOT = "/a/www/www6s/lib/dt" SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE = True # URL to use when referring to static files located in STATIC_ROOT. if SERVER_MODE != 'production' and SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE: - STATIC_URL = "/lib/" - STATIC_CDN_PATH = STATIC_ROOT + STATIC_URL = "/static/" + STATIC_ROOT = os.path.abspath(BASE_DIR + "/../static/") else: STATIC_URL = "https://www.ietf.org/lib/dt/%s/"%__version__ - STATIC_CDN_PATH = "/a/www/www6s/lib/dt/%s/"%__version__ + STATIC_ROOT = CDN_ROOT + "%s/"%__version__ # Destination for components handled by djangobower -COMPONENT_ROOT = STATIC_ROOT +COMPONENT_ROOT = BASE_DIR + "/externals/static/" +COMPONENT_URL = STATIC_URL # List of finder classes that know how to find static files in # various locations. @@ -124,11 +125,6 @@ STATICFILES_FINDERS = ( 'ietf.utils.bower_storage.BowerStorageFinder', ) - -# Absolute path to the files not served through the staticfiles app -STATIC_LOCAL = os.path.abspath(BASE_DIR + "/../static/") - - WSGI_APPLICATION = "ietf.wsgi.application" AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', ) @@ -222,14 +218,14 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'ietf.context_processors.server_mode', 'ietf.context_processors.revision_info', 'ietf.secr.context_processors.secr_revision_info', - 'ietf.secr.context_processors.static', 'ietf.context_processors.rfcdiff_base_url', ) -# Additional locations of static files +# Additional locations of static files (in addition to each app's static/ dir) STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), - os.path.join(BASE_DIR, '../bootstrap/static'), + os.path.join(BASE_DIR, 'secr/static'), + os.path.join(BASE_DIR, 'externals/static'), ) INSTALLED_APPS = ( @@ -359,9 +355,9 @@ if SERVER_MODE != 'production': if len(TEST_CODE_COVERAGE_CHECKER.collector._collectors) == 0: TEST_CODE_COVERAGE_CHECKER.start() -TEST_CODE_COVERAGE_REPORT_PATH = "static/coverage/" +TEST_CODE_COVERAGE_REPORT_PATH = "coverage/" TEST_CODE_COVERAGE_REPORT_URL = os.path.join(STATIC_URL, TEST_CODE_COVERAGE_REPORT_PATH, "index.html") -TEST_CODE_COVERAGE_REPORT_DIR = os.path.join(STATIC_ROOT, TEST_CODE_COVERAGE_REPORT_PATH) +TEST_CODE_COVERAGE_REPORT_DIR = os.path.join(BASE_DIR, "static", TEST_CODE_COVERAGE_REPORT_PATH) TEST_CODE_COVERAGE_REPORT_FILE = os.path.join(TEST_CODE_COVERAGE_REPORT_DIR, "index.html") # WG Chair configuration @@ -527,7 +523,6 @@ SECR_BLUE_SHEET_URL = '//datatracker.ietf.org/documents/blue_sheet.rtf' SECR_INTERIM_LISTING_DIR = '/a/www/www6/meeting/interim' SECR_MAX_UPLOAD_SIZE = 40960000 SECR_PROCEEDINGS_DIR = '/a/www/www6s/proceedings/' -SECR_STATIC_URL = '/secretariat/' SECR_PPT2PDF_COMMAND = ['/usr/bin/soffice','--headless','--convert-to','pdf','--outdir'] USE_ETAGS=True From 4dc4c6dc9a026345f3701d337c6ba9d0f35ab003 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 15:00:14 +0000 Subject: [PATCH 37/46] Removed dead code - Legacy-Id: 9950 --- ietf/settings_sqlitetest.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ietf/settings_sqlitetest.py b/ietf/settings_sqlitetest.py index 9803efbcb..9fdeb95ce 100644 --- a/ietf/settings_sqlitetest.py +++ b/ietf/settings_sqlitetest.py @@ -36,11 +36,3 @@ DATABASES = { }, } -class DisableMigrations(object): - def __contains__(self, item): - return True - - def __getitem__(self, item): - return "notmigrations" - -MIGRATION_MODULES = DisableMigrations() From ec84efedcdbf23e9f1d7ddb742b7917689769b86 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 15:02:54 +0000 Subject: [PATCH 38/46] Simplified the development-mode static files serving, since we're now using the django staticfiles infrastructure. - Legacy-Id: 9951 --- ietf/urls.py | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/ietf/urls.py b/ietf/urls.py index ad41e9939..aaea34236 100644 --- a/ietf/urls.py +++ b/ietf/urls.py @@ -1,15 +1,15 @@ # Copyright The IETF Trust 2007, 2009, All Rights Reserved +from django.conf import settings from django.conf.urls import patterns, include from django.contrib import admin from django.views.generic import TemplateView +from django.contrib.staticfiles.urls import staticfiles_urlpatterns from ietf.liaisons.sitemaps import LiaisonMap from ietf.ipr.sitemaps import IPRMap from ietf import api -from django.conf import settings - admin.autodiscover() api.autodiscover() @@ -72,13 +72,24 @@ for n,a in api._api_list: (r'^api/v1/', include(a.urls)), ) -# This is needed to serve files which are not handled by collectstatic: +# This is needed to serve files during testing if settings.SERVER_MODE in ('development', 'test'): - urlpatterns += patterns('', - (r'^(?P(?:images|css|js|test|static)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL}), - (r'^(?Padmin/(?:img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL}), - (r'^(?Psecretariat/(img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL}), - (r'^(?Probots\.txt)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL+"dev/"}), - (r'^_test500/$', lambda x: None), - (r'^environment/$', 'ietf.help.views.environment'), - ) + urlpatterns += ( staticfiles_urlpatterns() + + patterns('', + (r'^_test500/$', lambda x: None), + (r'^environment/$', 'ietf.help.views.environment'), + ## maybe preserve some static legacy URLs ? + (r'^(?P(?:images|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT+'ietf/'}), + ) + ) + +# This is needed to serve files which are not handled by collectstatic : +# if settings.SERVER_MODE in ('development', 'test'): +# urlpatterns += patterns('', +# (r'^(?P(?:images|css|js|test|static)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL}), +# (r'^(?Padmin/(?:img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL}), +# (r'^(?Psecretariat/(img|css|js)/.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL}), +# (r'^(?Probots\.txt)$', 'django.views.static.serve', {'document_root': settings.STATIC_LOCAL+"dev/"}), +# (r'^_test500/$', lambda x: None), +# (r'^environment/$', 'ietf.help.views.environment'), +# ) From 7a059c908a59a114d5de98ebc76c0052bd33c664 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 15:03:40 +0000 Subject: [PATCH 39/46] Cleaned up bower_storage a bit. - Legacy-Id: 9952 --- ietf/utils/bower_storage.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ietf/utils/bower_storage.py b/ietf/utils/bower_storage.py index 3a06ae03e..72025d3c4 100644 --- a/ietf/utils/bower_storage.py +++ b/ietf/utils/bower_storage.py @@ -2,8 +2,11 @@ from django.core.files.storage import FileSystemStorage from django.contrib.staticfiles.finders import BaseStorageFinder from django.conf import settings -if settings.SERVER_MODE != 'production': - # We need this during test and development in order to find the external - # static files which are managed with bower (using manage.py bower_install) - class BowerStorageFinder(BaseStorageFinder): - storage = FileSystemStorage(location=settings.STATIC_ROOT, base_url=settings.STATIC_URL) +import debug # pyflakes:ignore + +class BowerStorageFinder(BaseStorageFinder): + storage = FileSystemStorage(location=settings.COMPONENT_ROOT, base_url=settings.COMPONENT_URL) + + def find(self, path, all=False): + files = super(BowerStorageFinder, self).find(path, all) + return files From a23846c8be843d8b828624472987cd0fa63c78cf Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 15:07:21 +0000 Subject: [PATCH 40/46] Changed the storage format for code coverage in *coverage.json, in order to be able to calculate code coverage percentages for a subset of tested files. - Legacy-Id: 9953 --- .../management/commands/coverage_changes.py | 33 +++++++++++++++---- ietf/utils/test_runner.py | 13 ++++---- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/ietf/utils/management/commands/coverage_changes.py b/ietf/utils/management/commands/coverage_changes.py index 2da9e350b..5c8b3a4c4 100644 --- a/ietf/utils/management/commands/coverage_changes.py +++ b/ietf/utils/management/commands/coverage_changes.py @@ -7,6 +7,8 @@ from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.utils.six import string_types +import debug # pyflakes:ignore + class Command(BaseCommand): help = "Compare coverage between the latest release and the latest test run." option_list = BaseCommand.option_list + ( @@ -49,7 +51,9 @@ class Command(BaseCommand): self.stdout.write("\nShowing coverage differeces between %s and %s:\n" % (mversion, lversion)) for section in sections: mcoverage = master_coverage[section]["covered"] + mformat = master_coverage[section].get("format", 1) lcoverage = latest_coverage[section]["covered"] + lformat = latest_coverage[section].get("format", 1) # mkeys = mcoverage.keys() lkeys = lcoverage.keys() @@ -57,16 +61,31 @@ class Command(BaseCommand): keys = list(lkeys) keys.sort() header_written = False + for key in keys: if not key in mcoverage: - mcoverage[key] = None - if type(mcoverage[key]) is float or type(lcoverage[key]) is float: - mval = ("%5.1f" % (100*mcoverage[key])) if mcoverage[key] else "-" - lval = ("%5.1f %%" % (100*lcoverage[key])) if lcoverage[key] else "- " + mlines, mcov = None, None else: - mval = mcoverage[key] - lval = lcoverage[key] - if mcoverage[key] != lcoverage[key]: + if mformat == 1: + mlines, mcov = None, mcoverage[key] + elif mformat == 2: + mlines, mcov = mcoverage[key] + else: + raise CommandError("The release coverage data has an unknown format ('%s'), quitting." % mformat) + if lformat == 1: + llines, lcov = None, lcoverage[key] + elif lformat == 2: + llines, lcov = lcoverage[key] + else: + raise CommandError("The latest coverage data has an unknown format ('%s'), quitting." % lformat) + + if type(mcov) is float or type(lcov) is float: + mval = ("%5.1f" % (100*mcov)) if mcov else "-" + lval = ("%5.1f %%" % (100*lcov)) if lcov else "- " + else: + mval = mcov + lval = lcov + if mcov != lcov: if not header_written: self.stdout.write(self.diff_line_format % ("\n%s"%section.capitalize(), mversion[:7], lversion[:7])) diff --git a/ietf/utils/test_runner.py b/ietf/utils/test_runner.py index 667c8123e..5ff91138c 100644 --- a/ietf/utils/test_runner.py +++ b/ietf/utils/test_runner.py @@ -178,12 +178,12 @@ class CoverageReporter(Reporter): self.find_code_units(None) total = Numbers() - result = {"coverage": 0.0, "covered": {}} + result = {"coverage": 0.0, "covered": {}, "format": 2, } for cu in self.code_units: try: analysis = self.coverage._analyze(cu) nums = analysis.numbers - result["covered"][cu.name] = nums.pc_covered/100.0 + result["covered"][cu.name] = (nums.n_statements, nums.pc_covered/100.0) total += nums except KeyboardInterrupt: # pragma: not covered raise @@ -221,7 +221,7 @@ class CoverageTest(TestCase): if self.runner.run_full_test_suite: # Permit 0.02% variation in results -- otherwise small code changes become a pain fudge_factor = 0.0002 # 0.02% -- a small change in the last digit we show - self.assertGreaterEqual(test_coverage, master_coverage-fudge_factor, + self.assertGreaterEqual(test_coverage, master_coverage - fudge_factor, msg = "The %s coverage percentage is now lower (%.2f%%) than for version %s (%.2f%%)" % ( test, test_coverage*100, latest_coverage_version, master_coverage*100, )) self.assertLessEqual(len(test_missing), len(master_missing), @@ -331,14 +331,17 @@ class IetfTestRunner(DiscoverRunner): "template": { "coverage": 0.0, "covered": {}, + "format": 1, # default format, coverage data in 'covered' are just fractions }, "url": { "coverage": 0.0, "covered": {}, + "format": 1, }, "code": { "coverage": 0.0, "covered": {}, + "format": 1, }, } @@ -355,10 +358,6 @@ class IetfTestRunner(DiscoverRunner): print " Changing TEMPLATE_STRING_IF_INVALID to '' during testing." settings.TEMPLATE_STRING_IF_INVALID = '' - if settings.SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE != True: - print " Changing SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE to 'True' during testing." - settings.SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE = True - assert not settings.IDTRACKER_BASE_URL.endswith('/') # Try to set up an SMTP test server. In case other test runs are From 6de3974be74beb5c350e87239e1b561d33326226 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 15:07:49 +0000 Subject: [PATCH 41/46] Misc stuff. - Legacy-Id: 9954 --- .gitignore | 1 + ietf/utils/tests.py | 32 ++++++++++++++++++++++++++++++++ release-coverage.json | 3 ++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d0545c281..578e198ce 100644 --- a/.gitignore +++ b/.gitignore @@ -30,4 +30,5 @@ /lib /share /include +/static /latest-coverage.json diff --git a/ietf/utils/tests.py b/ietf/utils/tests.py index 08a82c969..b5412a432 100644 --- a/ietf/utils/tests.py +++ b/ietf/utils/tests.py @@ -1,5 +1,7 @@ # -*- coding: utf-8 -*- import os.path +#import json +#from pathlib import Path from textwrap import dedent from email.mime.text import MIMEText @@ -9,6 +11,8 @@ from email.mime.multipart import MIMEMultipart from django.conf import settings from django.test import TestCase +import debug # pyflakes:ignore + from ietf.utils.management.commands import pyflakes from ietf.utils.mail import send_mail_text, send_mail_mime, outbox @@ -59,3 +63,31 @@ class TestSMTPServer(TestCase): len_before = len(outbox) send_complex_mail('good@example.com,poison@example.com') self.assertEqual(len(outbox),len_before+2) + + + + +## One might think that the code below would work, but it doesn't ... + +# def list_static_files(path): +# r = Path(settings.STATIC_ROOT) +# p = r / path +# files = list(p.glob('**/*')) +# relfn = [ str(file.relative_to(r)) for file in files ] +# return relfn +# +# class TestBowerStaticFiles(TestCase): +# +# def test_bower_static_file_finder(self): +# from django.templatetags.static import static +# bower_json = os.path.join(settings.BASE_DIR, 'bower.json') +# with open(bower_json) as file: +# bower_info = json.load(file) +# for asset in bower_info["dependencies"]: +# files = list_static_files(asset) +# self.assertGreater(len(files), 0) +# for file in files: +# url = static(file) +# debug.show('url') +# r = self.client.get(url) +# self.assertEqual(r.status_code, 200) diff --git a/release-coverage.json b/release-coverage.json index 5590fe551..4674970af 100644 --- a/release-coverage.json +++ b/release-coverage.json @@ -17549,6 +17549,7 @@ "ietf/utils/management/commands/import_htpasswd": 0.0, "ietf/utils/management/commands/makefixture": 0.0, "ietf/utils/management/commands/pyflakes": 0.6027397260273972, + "ietf/utils/bower_storage": 0.0, "ietf/utils/markup_txt": 1.0, "ietf/utils/ordereddict": 1.0, "ietf/utils/pipe": 0.875, @@ -18579,4 +18580,4 @@ } }, "version": "6.2.0" -} \ No newline at end of file +} From 984524b507141004fd3ea81672d4213e8b78d4a4 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 18:14:50 +0000 Subject: [PATCH 42/46] Changed additional direct static references to use the static template tag. - Legacy-Id: 9955 --- ietf/secr/templates/drafts/edit.html | 4 ++-- ietf/secr/templates/sreq/edit.html | 4 ++-- ietf/secr/templates/sreq/new.html | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ietf/secr/templates/drafts/edit.html b/ietf/secr/templates/drafts/edit.html index bd1990fb4..4cac51503 100644 --- a/ietf/secr/templates/drafts/edit.html +++ b/ietf/secr/templates/drafts/edit.html @@ -8,8 +8,8 @@ - - + + {% endblock %} diff --git a/ietf/secr/templates/sreq/edit.html b/ietf/secr/templates/sreq/edit.html index ff2ea6afe..655165ec2 100755 --- a/ietf/secr/templates/sreq/edit.html +++ b/ietf/secr/templates/sreq/edit.html @@ -6,8 +6,8 @@ - - + + {% endblock %} diff --git a/ietf/secr/templates/sreq/new.html b/ietf/secr/templates/sreq/new.html index 1bf64efdf..2ad8b16fe 100755 --- a/ietf/secr/templates/sreq/new.html +++ b/ietf/secr/templates/sreq/new.html @@ -7,8 +7,8 @@ - - + + {% endblock %} From 86dd334355ecd4838fbe9943451ba2f7bd4d2918 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 21:14:02 +0000 Subject: [PATCH 43/46] Fixed an error in settings.py - Legacy-Id: 9956 --- ietf/settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ietf/settings.py b/ietf/settings.py index 7f5f0770b..ceb43e597 100644 --- a/ietf/settings.py +++ b/ietf/settings.py @@ -101,7 +101,7 @@ MEDIA_URL = 'https://www.ietf.org/' # Absolute path to the directory static files should be collected to. # Example: "/var/www/example.com/static/" -CDN_ROOT = "/a/www/www6s/lib/dt" + SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE = True @@ -111,7 +111,7 @@ if SERVER_MODE != 'production' and SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE: STATIC_ROOT = os.path.abspath(BASE_DIR + "/../static/") else: STATIC_URL = "https://www.ietf.org/lib/dt/%s/"%__version__ - STATIC_ROOT = CDN_ROOT + "%s/"%__version__ + STATIC_ROOT = "/a/www/www6s/lib/dt/%s/"%__version__ # Destination for components handled by djangobower COMPONENT_ROOT = BASE_DIR + "/externals/static/" From 0cdf7599a439bf0d46f355f9493dbcfbb6b1785c Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 21:14:49 +0000 Subject: [PATCH 44/46] It's only an error not to have STATIC_ROOT available in production mode. - Legacy-Id: 9957 --- ietf/checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/checks.py b/ietf/checks.py index 9e651cbb2..d7c9a8c4a 100644 --- a/ietf/checks.py +++ b/ietf/checks.py @@ -12,7 +12,7 @@ def check_cdn_directory_exists(app_configs, **kwargs): path will contain the datatracker release version. """ errors = [] - if not os.path.exists(settings.STATIC_ROOT): + if settings.SERVER_MODE == 'production' and not os.path.exists(settings.STATIC_ROOT): errors.append(checks.Error( "The static files directory has not been set up.", hint="Please run 'ietf/manage.py collectstatic'.", From 5fe1d43db20dd912954c3b5fb01f0cff852d0685 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Sat, 1 Aug 2015 22:02:14 +0000 Subject: [PATCH 45/46] Fixed some additional static file references. - Legacy-Id: 9958 --- ietf/secr/templates/base_secr.html | 2 +- ietf/secr/templates/drafts/edit.html | 4 ++-- ietf/secr/templates/sreq/edit.html | 4 ++-- ietf/secr/templates/sreq/new.html | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ietf/secr/templates/base_secr.html b/ietf/secr/templates/base_secr.html index 2bfc545ee..611b63c5d 100644 --- a/ietf/secr/templates/base_secr.html +++ b/ietf/secr/templates/base_secr.html @@ -12,7 +12,7 @@ {% block extrastyle %}{% endblock %} {% block extrahead %} - + {% endblock %} {% block blockbots %}{% endblock %} diff --git a/ietf/secr/templates/drafts/edit.html b/ietf/secr/templates/drafts/edit.html index 4cac51503..08e271f45 100644 --- a/ietf/secr/templates/drafts/edit.html +++ b/ietf/secr/templates/drafts/edit.html @@ -10,8 +10,8 @@ - - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/sreq/edit.html b/ietf/secr/templates/sreq/edit.html index 655165ec2..d4a92faf7 100755 --- a/ietf/secr/templates/sreq/edit.html +++ b/ietf/secr/templates/sreq/edit.html @@ -8,8 +8,8 @@ - - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} diff --git a/ietf/secr/templates/sreq/new.html b/ietf/secr/templates/sreq/new.html index 2ad8b16fe..4dad3a717 100755 --- a/ietf/secr/templates/sreq/new.html +++ b/ietf/secr/templates/sreq/new.html @@ -9,8 +9,8 @@ - - + + {% endblock %} {% block breadcrumbs %}{{ block.super }} From 82380e556c382ffc717a728a56317351a05ae06d Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Tue, 4 Aug 2015 12:49:32 +0000 Subject: [PATCH 46/46] Updated the README-CDN file. - Legacy-Id: 9972 --- README-CDN.rst | 89 ++++++++++++++------------------------------------ 1 file changed, 25 insertions(+), 64 deletions(-) diff --git a/README-CDN.rst b/README-CDN.rst index 33ecdb118..f4f194289 100644 --- a/README-CDN.rst +++ b/README-CDN.rst @@ -20,6 +20,9 @@ externals, and how deployment is done. Serving Static Files via CDN ============================ +Production Mode +--------------- + If resources served over a CDN and/or with a high max-age don't have different URLs for different versions, then any component upgrade which is accompanied by a change in template functionality will have a long transition time @@ -45,10 +48,28 @@ The result is that all static files collected via the ``collectstatic`` command will be placed in a location served via CDN, with the release version being part of the URL. +Development Mode +---------------- + In development mode, ``STATIC_URL`` is set to ``/static/``, and Django's ``staticfiles`` infrastructure makes the static files available under that -local URL root. +local URL root (unless you set +``settings.SERVE_CDN_FILES_LOCALLY_IN_DEV_MODE`` to ``False``). It is not +necessary to actually populate the ``static/`` directory by running +``collectstatic`` in order for static files to be served when running +``ietf/manage.py runserver`` -- the ``runserver`` command has extra support +for finding and serving static files without running collectstatic. +In order to work backwards from a file served in development mode to the +location from which it is served, the mapping is as follows:: + + ============================== ============================== + Development URL Working copy location + ============================== ============================== + localhost:8000/static/ietf/* ietf/static/ietf/* + localhost:8000/static/secr/* ietf/secr/static/secr/* + localhost:8000/static/* ietf/externals/static/* + ============================== ============================== Handling of External Javascript and CSS Components ================================================== @@ -156,67 +177,7 @@ During deployment, it is now necessary to run the management command:: $ ietf/manage.py collectstatic -before activating a new release. The deployment README file has been updated -accordingly, and now reads as follows:: - - In order to fetch a new release of the django datatracker code, simply - check out the appropriate tag from svn: - - svn co http://svn.tools.ietf.org/svn/tools/ietfdb/tags/$releasenumber - - Don't forget to copy $releasenumber/ietf/settings_local.py from the - old release to the new one; otherwise it won't work! - - cp $oldreleasenumber/ietf/settings_local.py $releasenumber/ietf/ - - Change into the new directory: - - cd $releasenumber - - Next, upgrade pip and install requirements: - - pip install --upgrade pip - pip install -r requirements.txt - - Run migrations: - - ietf/manage.py migrate - - * NEW * - Move static files to the appropriate directory for serving via CDN: - - ietf/manage.py collectstatic - - * NEW * - Run some basic datatracker system checks: - - ietf/manage.py check - - Change back out to the parent directory: - - cd .. - - and then re-point the 'web' symlink: - - rm ./web; ln -s $releasenumber web - - and finally restart apache: - - sudo /etc/init.d/apache2 restart - - It's now also a good idea to go to the datatracker front page: - - http://datatracker.ietf.org/ - - to check that it's alive and kicking, and displaying the new release - number at the bottom of the left-side menubar :-) -- if not, revert the - symlink step, re-pointing the symlink to the release that was running - before the new release, and restart apache again to roll back to that. - - Finally, make sure the datatracker rsyncs over to IETFB, and then run the - PIP commands on ietfb as well: - - ssh ietfb - pip install --upgrade pip - pip install -r requirements.txt +before activating a new release. +The deployment ``README`` file at ``/a/www/ietf-datatracker/README`` has been +updated accordingly.