Merge lp:~widelands-dev/widelands-website/django_staticfiles into lp:widelands-website

Proposed by kaputtnik
Status: Merged
Merged at revision: 511
Proposed branch: lp:~widelands-dev/widelands-website/django_staticfiles
Merge into: lp:widelands-website
Diff against target: 1563 lines (+226/-241)
48 files modified
.bzrignore (+1/-9)
README.txt (+11/-0)
documentation/conf.py (+1/-1)
local_settings.py.sample (+4/-6)
local_urls.py.sample (+11/-6)
mainpage/templatetags/wl_markdown.py (+8/-3)
media/js/jquery.sexy-vote.js (+0/-76)
pybb/models.py (+7/-4)
settings.py (+11/-7)
templates/base.html (+9/-8)
templates/django_messages/base.html (+4/-2)
templates/django_messages/inbox.html (+3/-2)
templates/django_messages/outbox.html (+2/-1)
templates/django_messages/trash.html (+4/-3)
templates/header.html (+6/-5)
templates/mainpage.html (+4/-3)
templates/mainpage/developers.html (+2/-2)
templates/news/base_news.html (+2/-1)
templates/news/post_detail.html (+3/-2)
templates/notification/base.html (+2/-1)
templates/privacy_policy.html (+2/-2)
templates/pybb/base.html (+2/-1)
templates/pybb/category.html (+3/-2)
templates/pybb/forum.html (+8/-7)
templates/pybb/index.html (+7/-6)
templates/pybb/inlines/display_category.html (+9/-8)
templates/pybb/inlines/forum_row.html (+4/-2)
templates/pybb/inlines/post.html (+8/-7)
templates/pybb/inlines/topic_row.html (+7/-5)
templates/pybb/post_form.html (+5/-4)
templates/pybb/topic.html (+28/-27)
templates/registration/base.html (+0/-1)
templates/search/search.html (+2/-1)
templates/threadedcomments/preview_comment.html (+2/-1)
templates/wiki/base.html (+2/-1)
templates/wiki/edit.html (+2/-1)
templates/wlhelp/base.html (+3/-2)
templates/wlmaps/base.html (+2/-2)
templates/wlmaps/edit_comment.html (+3/-2)
templates/wlmaps/index.html (+2/-1)
templates/wlmaps/map_detail.html (+4/-3)
templates/wlmaps/upload.html (+3/-1)
templates/wlpoll/base.html (+4/-2)
templates/wlpoll/poll_list.html (+3/-1)
templates/wlprofile/base.html (+3/-1)
templates/wlscheduling/base.html (+6/-4)
templates/wlscreens/base.html (+3/-1)
templates/wlscreens/index.html (+4/-3)
To merge this branch: bzr merge lp:~widelands-dev/widelands-website/django_staticfiles
Reviewer Review Type Date Requested Status
GunChleoc Approve
kaputtnik (community) Needs Resubmitting
Review via email: mp+359345@code.launchpad.net

Commit message

Implement django's default behavior for static files (css, js, images)

Description of the change

The problem i had when introducing django-star-ratings (https://wl.widelands.org/forum/topic/4389/) was a result of not implementing django's default behavior for static files (css, js, images), which was introduced many versions ago. Modern third party django-apps rely on this default behavior, and this is what had bitten me this time. On the server i have fixed this by configuring local_settings.py. This branch reflects the changes i did on the server, and some other related stuff. As a sideeffect, this solves also this bug :-)

Main concepts of new static files handling:
1. Setting STATIC_ROOT to an absolute path where static files will be collected using the management command 'collectstatic'. This command needs executed if settings.DEBUG=False. 'collectstatic' searches all apps which are in INSTALLED_APPS for a folder called 'static' and copies, or symlink, all of it's content into STATIC_ROOT. https://docs.djangoproject.com/en/1.11/ref/contrib/staticfiles/#collectstatic

2. Different urls for static files and user uploaded files.

3. Use of the 'static' template tag in the templates to refer to static content (this is the main reason why this diff is that big)

Differences to the current state on the server:
1. Using the collectstatic command from this branch collects static files in 'media/static_collected/' (on the server i used 'media/static_foreign', which was a bad name).

Unchanged:
Files uploaded by a user where still uploaded to 'media/[wlmaps|wlprofile|wlimages|wlscreens|..]'. The name of the link stays unchanged, so '/wlmedia/'.

Other things:
1. Moved own static files from 'media/' to 'mainpage/static/' or to the app (folder) where it belongs to. I am planning to do the same with the subfolders in 'templates/*' to have all things related to one app in one folder. So working e.g. on some things in pybb, pybb related css is found in 'pybb/static/css/' and templates will be in 'pybb/templates/pybb/*.html'
2. I found also 2 issues if one wants to setup the website from scratch. Those are fixed in https://bazaar.launchpad.net/~widelands-dev/widelands-website/django_staticfiles/revision/514

To get this in:

1. Set website maintenance
2. Remove the contents of 'media/static_foreign' to avoid merge conflicts
3. merge the branch
4. Remove setting of STATIC_ROOT or set it to the destination where you want to collect static files. Remove the lines containing 'bd' and set MEDIA_ROOT to the destination where uploaded media should be stored. Remove STATIC_MEDIA_PATH (this was useless at all, because prior only used in local_urls.py)
5. run 'python manage.py collectstatic -l' (the switch '-l' creates symlinks instead of copying the files)
6. Change the url which refers to static content to point to the folder of STATIC_ROOT
7. pybb posts containing a smiley needs resaving to exchange the url pointing to the new smiley directory for field 'body_html'. This can be done best in the management shell:
from pybb.models import Post
for post in Post.objects.filter(body_html__contains='/wlmedia/img/smileys/'):
    post.save()
This takes some time...
8. Unset website maintenance

I will setup the alpha site for testing.

To post a comment you must log in.
Revision history for this message
kaputtnik (franku) wrote :

Alpha is up and running :-)

Revision history for this message
kaputtnik (franku) wrote :

I found some strange inconsistencies in the alpha database, which i want to fix. So alpha is down again.

Revision history for this message
kaputtnik (franku) wrote :

Alpha is up again...

Revision history for this message
GunChleoc (gunchleoc) wrote :

When clicking on a screenshot, it won't bring up the lightbox with the bigger version. I don't have admin rights on the Alpha site, so I can't add a new one to test if it's just an issue with old data.

I have added some diff comments.

We should also grep for "MEDIA_URL" and "foreign" to make sure it's clean - I can't do that right now, because bzr keeps crapping out on this machine.

Revision history for this message
kaputtnik (franku) wrote :

Found what's was wrong with the screens :-) This is fixed.

> I have added some diff comments.

> We should also grep for "MEDIA_URL" and "foreign"

Oh you're so right... i grep'ed only for "{{ MEDIA_URL" to search for it in the templates but MEDIA_URL is also used in some python scripts. Searching for 'foreign' isn't needed.

Will push a fixed branch next week.

Many thanks for testing and your input :-). Currently i am feeling getting stupider with every day :-S

Revision history for this message
kaputtnik (franku) wrote :

python scripts are fine, but pybb posts needs resaving to apply the new static directory for smileys.

Revision history for this message
kaputtnik (franku) :
review: Needs Fixing
519. By kaputtnik

addressed code review; fixed an error for links with no texts; fixed loading lightbox_v2 css

520. By kaputtnik

removed superfluos variable

521. By kaputtnik

don't collect static files for the documentation

Revision history for this message
kaputtnik (franku) wrote :

The latest changes are applied to alpha now.

review: Needs Resubmitting
Revision history for this message
GunChleoc (gunchleoc) wrote :

Tested again. Looks good to me :)

review: Approve
Revision history for this message
kaputtnik (franku) wrote :

Thanks :-)

522. By kaputtnik

fixed showing last posts

Revision history for this message
kaputtnik (franku) wrote :

Merged and deployed.

I had some errors when re-saving the posts, so i added an additional try clause.

A question: The additional try clause is not included in this branch, because i merged this branch, changed the code, and then commited into trunk. Should i push into this branch also?

Revision history for this message
GunChleoc (gunchleoc) wrote :

For small fix-ups like that, I think it's OK to recycle the branch and merge it again.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2018-11-21 17:36:00 +0000
3+++ .bzrignore 2018-11-28 19:45:23 +0000
4@@ -13,12 +13,4 @@
5 whoosh_index
6 media/map_object_info
7 media/wlhelp
8-media/static_foreign/admin
9-media/static_foreign/basic.css
10-media/static_foreign/black20.png
11-media/static_foreign/but1.png
12-media/static_foreign/parchment.png
13-media/static_foreign/pygments.css
14-media/static_foreign/star-ratings
15-media/static_foreign/widelands.css
16-media/static_foreign/wood.png
17+media/static_collected/*
18
19=== modified file 'README.txt'
20--- README.txt 2018-05-09 06:02:44 +0000
21+++ README.txt 2018-11-28 19:45:23 +0000
22@@ -99,6 +99,17 @@
23
24 Now everything should work.
25
26+Runnning with DBUG=False
27+------------------------
28+In case you want to test the site with the setting DEBUG=False, you might
29+notice that at least the admin site is missing all css. To fix this run:
30+
31+ $ ./manage.py collectstatic -l
32+
33+This will create symbolic links (-l) to static contents of third party apps in
34+the folder defined by STATIC_ROOT. See:
35+https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#collectstatic
36+
37 Accessing the website from other machines
38 -----------------------------------------
39
40
41=== modified file 'documentation/conf.py'
42--- documentation/conf.py 2018-05-09 16:31:18 +0000
43+++ documentation/conf.py 2018-11-28 19:45:23 +0000
44@@ -123,7 +123,7 @@
45 # Add any paths that contain custom static files (such as style sheets) here,
46 # relative to this directory. They are copied after the builtin static files,
47 # so a file named "default.css" will overwrite the builtin "default.css".
48-html_static_path = ['static/']
49+html_static_path = ['styles/']
50
51 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
52 # using the given strftime format.
53
54=== renamed directory 'documentation/static' => 'documentation/styles'
55=== modified file 'local_settings.py.sample'
56--- local_settings.py.sample 2018-10-01 16:01:40 +0000
57+++ local_settings.py.sample 2018-11-28 19:45:23 +0000
58@@ -8,11 +8,9 @@
59 import os
60 import re
61
62-bd = os.getcwd() # Better make this a static path
63-
64-STATIC_MEDIA_PATH = os.path.join(bd, 'media')
65-MEDIA_ROOT = os.path.join(bd, 'media/')
66-
67+# Absolute path for uploaded files, e.g.:
68+# images for avatars, wiki, wlscreens, news cathegories and also mapfiles
69+MEDIA_ROOT = os.path.join(os.getcwd(), 'media/')
70
71 # If you are using the developer version of widelands from Launchpad
72 # set WIDELANDS_SVN_DIR to the correct path. See also:
73@@ -89,7 +87,7 @@
74 # 'logfile': {
75 # 'level':'DEBUG',
76 # 'class':'logging.FileHandler',
77-# 'filename': bd + "/log.txt",
78+# 'filename': os.getcwd() + "/log.txt",
79 # },
80 # },
81 # 'root': {
82
83=== modified file 'local_urls.py.sample'
84--- local_urls.py.sample 2018-05-24 07:23:08 +0000
85+++ local_urls.py.sample 2018-11-28 19:45:23 +0000
86@@ -6,16 +6,21 @@
87 # Don't use this file on the server!
88
89 local_urlpatterns = [
90+ # Files uploaded by users
91 url(r'^wlmedia/(?P<path>.*)$',
92 serve,
93- {'document_root': settings.STATIC_MEDIA_PATH},
94+ {'document_root': settings.MEDIA_ROOT},
95 name='static_media'),
96- url(r'^media/(?P<path>.*)$',
97+ # Static files if DEBUG=False. Use the 'collectstatic' command to fetch them
98+ url(r'^static/(?P<path>.*)$',
99 serve,
100- {'document_root': settings.STATIC_MEDIA_PATH},
101- name='static_media_pybb'),
102+ {'document_root': settings.STATIC_ROOT},
103+ name='static_media_collected'),
104+ # HTML documentation created by ./manage.py create_docs
105 url(r'^documentation/(?P<path>.*)$',
106 serve,
107- {'document_root': path.join(settings.STATIC_MEDIA_PATH, 'documentation/html')},
108- name='documentation'),
109+ {'document_root': path.join(
110+ settings.MEDIA_ROOT, 'documentation/html')},
111+ name='documentation')
112 ]
113+
114
115=== added directory 'mainpage/static'
116=== renamed directory 'media/css' => 'mainpage/static/css'
117=== renamed file 'media/favicon.ico' => 'mainpage/static/favicon.ico'
118=== renamed directory 'media/img' => 'mainpage/static/img'
119=== renamed directory 'media/js' => 'mainpage/static/js'
120=== modified file 'mainpage/templatetags/wl_markdown.py'
121--- mainpage/templatetags/wl_markdown.py 2018-11-16 07:20:46 +0000
122+++ mainpage/templatetags/wl_markdown.py 2018-11-28 19:45:23 +0000
123@@ -102,15 +102,20 @@
124 tag: classify for this tag
125
126 """
127- # No class change for image links
128- if tag.next_element.name == 'img':
129- return
130
131 try:
132 href = tag['href'].lower()
133+ if not tag.string:
134+ # Apply href to empty linkname, e.g.: [](/some/link)
135+ # Just to be sure tag.next_element is never None
136+ tag.string = href
137 except KeyError:
138 return
139
140+ # No class change for image links
141+ if tag.next_element.name == 'img':
142+ return
143+
144 # Check for external link
145 if href.startswith('http'):
146 for domain in LOCAL_DOMAINS:
147
148=== removed file 'media/css/register.css'
149=== removed file 'media/img/active_star.gif'
150Binary files media/img/active_star.gif 2011-07-03 14:00:24 +0000 and media/img/active_star.gif 1970-01-01 00:00:00 +0000 differ
151=== removed file 'media/img/passive_star.gif'
152Binary files media/img/passive_star.gif 2011-07-03 14:00:24 +0000 and media/img/passive_star.gif 1970-01-01 00:00:00 +0000 differ
153=== removed file 'media/js/jquery.sexy-vote.js'
154--- media/js/jquery.sexy-vote.js 2017-09-23 08:52:36 +0000
155+++ media/js/jquery.sexy-vote.js 1970-01-01 00:00:00 +0000
156@@ -1,76 +0,0 @@
157-jQuery.fn.sexyVote = function(config) {
158- config = config || {};
159- var defaults = {
160- activeImageSrc: "active_star.gif",
161- passiveImageSrc: "passive_star.gif",
162- maxScore: 5,
163- fn: new Function(),
164- messages: [
165- "Your vote have been saved.",
166- "Very bad",
167- "Bad",
168- "Good, but could be better",
169- "Good enough",
170- "Very good"
171- ]
172- };
173-
174- config = jQuery.extend(defaults, config);
175-
176-
177-
178- return this.each(function() {
179- var $container = jQuery(this);
180-
181- for (var i = 0, num = config.maxScore * 2; i < num; ++i) {
182- jQuery("<img />").appendTo($container);
183- }
184-
185- jQuery("<span />").appendTo($container);
186-
187- $container.find("img:even").
188- attr("src", config.passiveImageSrc).
189- css({display: "inline"}).
190- on("mouseover", function(e) {
191- var len = $container.find("img:even").index(e.target) + 1;
192-
193- $container.find("img:even").slice(0, len).css({display: "none"});
194-
195- $container.find("img:odd").slice(0, len).css({display: "inline"});
196-
197- $container.find("span").text(config.messages[len]);
198-
199-
200- }).
201- end().
202- find("img:odd").
203- attr("src", config.activeImageSrc).
204- css({display: "none"}).
205- on("mouseout", function(e) {
206-
207- var len = $container.find("img:odd").
208- index(e.target) + 1;
209-
210- $container.find("img:odd")
211- .slice(0, len).
212- css({display: "none"});
213- $container.find("img:even").
214- slice(0, len).
215- css({display: "inline"});
216-
217- $container.find("span").
218- text("");
219-
220-
221- }).
222- on("click", function(e) {
223- $container.find("img").
224- off("mouseover").
225- off("mouseout").
226- off("click");
227- $container.find("span").
228- text(config.messages[0]);
229- config.fn.call(this, e, $container.find("img:odd").index(e.target) + 1);
230- });
231- });
232-};
233
234=== added directory 'media/static_collected'
235=== removed directory 'media/static_foreign'
236=== added directory 'news/static'
237=== added directory 'news/static/css'
238=== renamed file 'media/css/news.css' => 'news/static/css/news.css'
239=== added directory 'notification/static'
240=== added directory 'notification/static/css'
241=== renamed file 'media/css/notice.css' => 'notification/static/css/notice.css'
242=== modified file 'pybb/models.py'
243--- pybb/models.py 2018-11-18 10:28:03 +0000
244+++ pybb/models.py 2018-11-28 19:45:23 +0000
245@@ -220,10 +220,13 @@
246 self).get_queryset().filter(hidden=True)
247
248 hidden_topics = []
249- for post in qs:
250- if post.topic.is_hidden:
251- hidden_topics.append(post.topic)
252- return hidden_topics
253+ try:
254+ for post in qs:
255+ if post.topic.is_hidden:
256+ hidden_topics.append(post.topic)
257+ return hidden_topics
258+ except:
259+ return []
260
261
262 class Post(RenderableItem):
263
264=== added directory 'pybb/static'
265=== added directory 'pybb/static/css'
266=== renamed file 'media/css/forum.css' => 'pybb/static/css/forum.css'
267=== renamed directory 'media/forum' => 'pybb/static/forum'
268=== modified file 'settings.py'
269--- settings.py 2018-11-19 17:34:37 +0000
270+++ settings.py 2018-11-28 19:45:23 +0000
271@@ -48,6 +48,7 @@
272
273 # Absolute path to the directory that holds media.
274 # Example: "/home/media/media.lawrence.com/"
275+# Overwritten in local_settings.py
276 MEDIA_ROOT = ''
277
278 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
279@@ -55,6 +56,15 @@
280 # Examples: "http://media.lawrence.com", "http://example.com/media/"
281 MEDIA_URL = '/wlmedia/'
282
283+# Absolute path where static files from thirdparty apps will be collected using
284+# the command: ./manage.py collectstatic
285+STATIC_ROOT = os.path.join(BASE_DIR, 'media/static_collected/')
286+
287+# URL to use when referring to static files located in STATIC_ROOT.
288+# Must be different than MEDIA_URL!
289+# https://docs.djangoproject.com/en/1.8/howto/static-files/
290+STATIC_URL = '/static/'
291+
292 # Make this unique, and don't share it with anybody.
293 SECRET_KEY = '#*bc7*q0-br42fc&6l^x@zzk&(=-#gr!)fn@t30n54n05jkqcu'
294
295@@ -63,7 +73,6 @@
296 # List of finder classes that know how to find static files in
297 # various locations.
298 STATICFILES_FINDERS = [
299- 'django.contrib.staticfiles.finders.FileSystemFinder',
300 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
301 ]
302
303@@ -101,7 +110,6 @@
304 # Modified 3rd party apps
305 'wiki.apps.WikiConfig', # This is based on wikiapp, but has some local modifications
306 'news', # This is based on simple-blog, but has some local modifications
307- 'news.managers',
308 'pybb.apps.PybbConfig', # Feature enriched version of pybb
309
310 # Thirdparty apps
311@@ -149,10 +157,6 @@
312 },
313 ]
314
315-# Static files (CSS, JavaScript, Images)
316-# https://docs.djangoproject.com/en/1.8/howto/static-files/
317-STATIC_URL = '/media/'
318-
319 ############################
320 # Activation configuration #
321 ############################
322@@ -198,7 +202,7 @@
323 'xoops.widelands.org'
324 ]
325
326-SMILEY_DIR = MEDIA_URL + 'img/smileys/'
327+SMILEY_DIR = STATIC_URL + 'img/smileys/'
328 # Keep this list ordered by length of smileys
329 SMILEYS = [
330 ('O:-)', 'face-angel.png'),
331
332=== modified file 'templates/base.html'
333--- templates/base.html 2018-10-15 16:11:43 +0000
334+++ templates/base.html 2018-11-28 19:45:23 +0000
335@@ -5,6 +5,7 @@
336 This file is extended by all other files which are not
337 included here
338 {% endcomment %}
339+{% load static %}
340 <html lang="en">
341
342 <head>
343@@ -14,20 +15,20 @@
344 <meta name="google-site-verification" content="1A5uFV_zNuXazJ46-572-_lLzcCTEQ77iHaSPFZd53Y" />
345
346 <title>{% block title %}Widelands.org{% endblock %}</title>
347- <link href="{{ MEDIA_URL }}favicon.ico" rel="icon" />
348+ <link href="{% static 'favicon.ico' %}" rel="icon" />
349
350 <!-- CSS -->
351- <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/base.css?v1" />
352- <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/navigation.css" />
353+ <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/base.css' %}?v1" />
354+ <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/navigation.css' %}" />
355 <!--[if lt IE 9]>
356- <link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/base_ielt9.css" />
357+ <link rel="stylesheet" type="text/css" href="{% static 'css/base_ielt9.css' %}" />
358 <![endif]-->
359
360 <!-- Javascript Bread & Butter Scripts -->
361- <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-3.2.1.js"></script>
362- <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery-ui.min.js"></script>
363- <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery_csrf_ajax.js"></script>
364- <script type="text/javascript" src="{{ MEDIA_URL }}js/search.js"></script>
365+ <script type="text/javascript" src="{% static 'js/jquery-3.2.1.js' %}"></script>
366+ <script type="text/javascript" src="{% static 'js/jquery-ui.min.js' %}"></script>
367+ <script type="text/javascript" src="{% static 'js/jquery_csrf_ajax.js' %}"></script>
368+ <script type="text/javascript" src="{% static 'js/search.js' %}"></script>
369 {% block extra_head %}{% endblock %}
370 </head>
371
372
373=== modified file 'templates/django_messages/base.html'
374--- templates/django_messages/base.html 2018-11-09 07:00:30 +0000
375+++ templates/django_messages/base.html 2018-11-28 19:45:23 +0000
376@@ -1,9 +1,11 @@
377 {% extends "wlprofile/base.html" %}
378-{% load i18n %}
379+{% load i18n %}
380+{% load static %}
381+
382 {% block bodyclass %}about{% endblock %}
383
384 {% block extra_head %}
385- <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/messages.css" />
386+ <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/messages.css' %}" />
387 {{ block.super}}{% endblock %}
388
389 {% block messages %}class="active"{% endblock %}
390
391=== modified file 'templates/django_messages/inbox.html'
392--- templates/django_messages/inbox.html 2018-09-08 09:44:03 +0000
393+++ templates/django_messages/inbox.html 2018-11-28 19:45:23 +0000
394@@ -2,6 +2,7 @@
395 {% load i18n %}
396 {% load custom_date %}
397 {% load wlprofile_extras %}
398+{% load static %}
399
400 {% block title %}
401 Inbox - {{ block.super }}
402@@ -25,14 +26,14 @@
403 <td>{{ message.sender|user_link }}</td>
404 <td>
405 {% if message.replied %}
406- <img src="{{ MEDIA_URL }}img/replied.png" alt="replied" title="replied" />
407+ <img src="{% static 'img/replied.png' %}" alt="replied" title="replied" />
408 {% endif %}
409 <a href="{{message.get_absolute_url }}">{{ message.subject }}</a>
410 </td>
411 <td>{{ message.sent_at|custom_date:user }}</td>
412 <td>
413 <a href="{% url 'messages_delete' message.id %}?next={{ request.path|iriencode }}">
414- <img src="{{ MEDIA_URL }}img/delete.png" alt="delete" title="delete" />
415+ <img src="{% static 'img/delete.png' %}" alt="delete" title="delete" />
416 </a>
417 </td>
418 </tr>
419
420=== modified file 'templates/django_messages/outbox.html'
421--- templates/django_messages/outbox.html 2018-04-11 07:43:01 +0000
422+++ templates/django_messages/outbox.html 2018-11-28 19:45:23 +0000
423@@ -2,6 +2,7 @@
424 {% load i18n %}
425 {% load custom_date %}
426 {% load wlprofile_extras %}
427+{% load static %}
428
429 {% block title %}
430 Outbox - {{ block.super }}
431@@ -28,7 +29,7 @@
432 <td>{{ message.sent_at|custom_date:user }}</td>
433 <td>
434 <a href="{% url 'messages_delete' message.id %}?next={{ request.path|iriencode }}">
435- <img src="{{ MEDIA_URL }}img/delete.png" alt="delete" title="delete" />
436+ <img src="{% static 'img/delete.png' %}" alt="delete" title="delete" />
437 </a>
438 </td>
439 </tr>
440
441=== modified file 'templates/django_messages/trash.html'
442--- templates/django_messages/trash.html 2018-04-13 07:31:42 +0000
443+++ templates/django_messages/trash.html 2018-11-28 19:45:23 +0000
444@@ -2,6 +2,7 @@
445 {% load i18n %}
446 {% load custom_date %}
447 {% load wlprofile_extras %}
448+{% load static %}
449
450 {% block title %}
451 Trash - {{ block.super }}
452@@ -27,7 +28,7 @@
453 <td>{{ message.recipient|user_link }}</td>
454 <td>
455 {% if message.replied %}
456- <img src="{{ MEDIA_URL }}img/replied.png" alt="replied" title="replied" />
457+ <img src="{% static 'img/replied.png' %}" alt="replied" title="replied" />
458 {% endif %}
459 <a href="{{message.get_absolute_url }}">{{ message.subject }}</a>
460 </td>
461@@ -35,11 +36,11 @@
462 <td>
463 {% if message.sender == request.user %}
464 <a href="{% url 'messages_undelete' message.id %}?next=/messages/outbox/">
465- <img src="{{ MEDIA_URL }}img/undelete.png" alt="undelete" title="undelete" />
466+ <img src="{% static 'img/undelete.png' %}" alt="undelete" title="undelete" />
467 </a>
468 {% else %}
469 <a href="{% url 'messages_undelete' message.id %}?next=/messages/inbox/">
470- <img src="{{ MEDIA_URL }}img/undelete.png" alt="undelete" title="undelete" />
471+ <img src="{% static 'img/undelete.png' %}" alt="undelete" title="undelete" />
472 </a>
473 {% endif %}
474 </td>
475
476=== modified file 'templates/header.html'
477--- templates/header.html 2018-11-28 08:08:18 +0000
478+++ templates/header.html 2018-11-28 19:45:23 +0000
479@@ -1,31 +1,32 @@
480 {% load wlprofile_extras %}
481 {% load wl_extras %}
482+{% load static %}
483
484 <div id="logo">
485 <a href="{% url 'mainpage' %}"><img src=
486- "{{ MEDIA_URL }}img/{% wl_logo %}" alt=
487+ "{% static 'img/'%}{% wl_logo %}" alt=
488 "Widelands Logo"></a>
489 </div>
490 <ul class="header_boxes">
491 <li class="small">
492 <a href="{% url 'wlscreens_index' %}" title="Screenshots">Screenshots<br />
493- <img src="{{ MEDIA_URL }}/img/camera.png" alt="Screenshots" />
494+ <img src="{% static '/img/camera.png' %}" alt="Screenshots" />
495 </a>
496 </li>
497 <li class="small">
498 <a href="{% url 'wiki_article' "Download" %}" title="Download">Download<br />
499- <img src="{{ MEDIA_URL }}/img/download.png" alt="Get Widelands" />
500+ <img src="{% static '/img/download.png' %}" alt="Get Widelands" />
501 </a>
502 </li>
503 <li class="small">
504 <a href="{% url 'wlmaps_index' %}" title="Get new maps">Maps<br />
505- <img src="{{ MEDIA_URL }}img/maps.png" alt="Get Free Maps" />
506+ <img src="{% static 'img/maps.png' %}" alt="Get Free Maps" />
507 </a>
508 </li>
509 <li class="small">
510 <p>Social Media</p>
511 <a href="https://www.facebook.com/WidelandsOfficial" target="_blank">
512- <img src="{{ MEDIA_URL }}img/socialmedia/facebook.png" alt="Facebook" />
513+ <img src="{% static 'img/socialmedia/facebook.png' %}" alt="Facebook" />
514 </a>
515 </li>
516 <li class="loginBox small">
517
518=== modified file 'templates/mainpage.html'
519--- templates/mainpage.html 2018-10-14 14:20:48 +0000
520+++ templates/mainpage.html 2018-11-28 19:45:23 +0000
521@@ -7,11 +7,12 @@
522 they reach our homepage
523
524 {% endcomment %}
525-
526+{% load static %}
527 {% load news_extras %}
528+
529 {% block extra_head %}
530 <meta name="google-site-verification" content="1A5uFV_zNuXazJ46-572-_lLzcCTEQ77iHaSPFZd53Y" />
531-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/news.css" />
532+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/news.css' %}" />
533 <link rel="alternate" type="application/rss+xml" title="Widelands News" href="news/feed/" />
534
535 {{ block.super}}{% endblock %}
536@@ -20,7 +21,7 @@
537 {% endblock %}
538 {% block content_main %}
539 <div class="blogEntry" style="min-height: 380px;">
540- <img class="landing posRight" src="{{ MEDIA_URL }}img/welcome.jpg" alt="Welcome!" />
541+ <img class="landing posRight" src="{% static 'img/welcome.jpg' %}" alt="Welcome!" />
542 <p>
543 <a href="{% url 'wiki_article' "Description" %}">Widelands</a> is a
544 <a href="{% url 'wiki_article' "The Widelands Project" %}">free, open source</a>
545
546=== modified file 'templates/mainpage/developers.html'
547--- templates/mainpage/developers.html 2018-10-14 14:20:48 +0000
548+++ templates/mainpage/developers.html 2018-11-28 19:45:23 +0000
549@@ -1,9 +1,9 @@
550 {% extends "base.html" %}
551-
552+{% load static %}
553 {% block title %}Widelands Development Team - {{ block.super }}{% endblock %}
554
555 {% block extra_head %}
556-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/wiki.css" />
557+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/wiki.css' %}" />
558 {{ block.super}}
559 {% endblock %}
560
561
562=== modified file 'templates/news/base_news.html'
563--- templates/news/base_news.html 2016-11-18 23:50:23 +0000
564+++ templates/news/base_news.html 2018-11-28 19:45:23 +0000
565@@ -1,8 +1,9 @@
566 {% extends "base.html" %}
567+{% load static %}
568
569 {% block title %}News Archive {% endblock %}
570
571 {% block extra_head %}
572 <link rel="alternate" type="application/rss+xml" title="Widelands News" href="/feeds/news/" />
573-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/news.css" />
574+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/news.css' %}" />
575 {{ block.super}}{% endblock %}
576
577=== modified file 'templates/news/post_detail.html'
578--- templates/news/post_detail.html 2018-10-14 14:20:48 +0000
579+++ templates/news/post_detail.html 2018-11-28 19:45:23 +0000
580@@ -6,13 +6,14 @@
581
582
583 {% load threadedcommentstags %}
584+{% load static %}
585
586 {% block title %}{{ object.title }} - {{ block.super }}{% endblock %}
587
588 {% block extra_head %}
589 {{ block.super }}
590- <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/news.css" />
591- <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/comments.css" />
592+ <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/news.css' %}" />
593+ <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/comments.css' %}" />
594 {% endblock %}
595
596 {% block content_header %}
597
598=== modified file 'templates/notification/base.html'
599--- templates/notification/base.html 2018-10-15 16:11:43 +0000
600+++ templates/notification/base.html 2018-11-28 19:45:23 +0000
601@@ -1,5 +1,6 @@
602 {% extends "wlprofile/base.html" %}
603+{% load static %}
604
605 {% block extra_head %}
606- <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/notice.css" />{{ block.super}}
607+ <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/notice.css' %}" />{{ block.super}}
608 {% endblock %}
609\ No newline at end of file
610
611=== modified file 'templates/privacy_policy.html'
612--- templates/privacy_policy.html 2018-10-14 13:24:15 +0000
613+++ templates/privacy_policy.html 2018-11-28 19:45:23 +0000
614@@ -1,11 +1,11 @@
615 {% extends "base.html" %}
616 {% load wl_markdown %}
617-
618+{% load static %}
619 {% block title %}Privacy policy {{ cur_lang }} {{ block.super }}{% endblock %}
620
621 {% block extra_head %}
622 {{ block.super}}
623-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/wiki.css" />
624+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/wiki.css' %}" />
625 {% endblock %}
626
627 {% block content_header %}
628
629=== modified file 'templates/pybb/base.html'
630--- templates/pybb/base.html 2016-04-28 18:33:44 +0000
631+++ templates/pybb/base.html 2018-11-28 19:45:23 +0000
632@@ -1,12 +1,13 @@
633 {% extends "base.html" %}
634 {% load i18n %}
635+{% load static %}
636
637 {% block title %}
638 Forum - {{ block.super }}
639 {% endblock %}
640
641 {% block extra_head %}
642-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/forum.css" />
643+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/forum.css' %}" />
644
645 <link rel="alternate" type="application/atom+xml" title="Latest Posts on all forums" href="{% url 'pybb_feed_posts' %}" />
646 <link rel="alternate" type="application/atom+xml" title="Latest Topics on all forums" href="{% url 'pybb_feed_topics' %}" />
647
648=== modified file 'templates/pybb/category.html'
649--- templates/pybb/category.html 2018-10-14 13:24:15 +0000
650+++ templates/pybb/category.html 2018-11-28 19:45:23 +0000
651@@ -1,5 +1,6 @@
652 {% extends 'pybb/base.html' %}
653 {% load pybb_extras %}
654+{% load static %}
655
656 {% block content_header %}
657 <h1>Category: {{category.name}}</h1>
658@@ -13,9 +14,9 @@
659 </div>
660
661 <div class="center green">
662- <img src="{{ MEDIA_URL }}forum/img/folder_big_work_star.png" style="width: 48px; height:48px; margin: 0px;" alt="" class="middle" />
663+ <img src="{% static 'forum/img/folder_big_work_star.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" class="middle" />
664 = Unread posts
665- <img src="{{ MEDIA_URL }}forum/img/folder_big_work.png" style="width: 48px; height:48px; margin: 0px;" alt="" class="middle" />
666+ <img src="{% static 'forum/img/folder_big_work.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" class="middle" />
667 = No unread posts
668 </div>
669 {% endblock %}
670
671=== modified file 'templates/pybb/forum.html'
672--- templates/pybb/forum.html 2018-11-16 08:27:29 +0000
673+++ templates/pybb/forum.html 2018-11-28 19:45:23 +0000
674@@ -5,6 +5,7 @@
675 {% load wlprofile_extras %}
676 {% load custom_date %}
677 {% load pagination_tags %}
678+{% load static %}
679
680 {% block extra_head %}
681 <link rel="alternate" type="application/atom+xml" title="Latest Posts on forum '{{ forum.name }}'" href="{% url 'pybb_feed_posts' %}{{forum.id}}/" />
682@@ -54,14 +55,14 @@
683 {% if not topic.is_hidden %}
684 <td class="forumIcon center">
685 {% if topic|pybb_has_unreads:user %}
686- <img src="{{ MEDIA_URL }}forum/img/doc_big_work_star.png" style="margin: 0px;" alt="" class="middle" />
687+ <img src="{% static 'forum/img/doc_big_work_star.png' %}" style="margin: 0px;" alt="" class="middle" />
688 {% else %}
689- <img src="{{ MEDIA_URL }}forum/img/doc_big_work.png" style="margin: 0px;" alt="" class="middle" />
690+ <img src="{% static 'forum/img/doc_big_work.png' %}" style="margin: 0px;" alt="" class="middle" />
691 {% endif %}
692 </td>
693 <td class="forumTitle">
694- {% if topic.sticky %}<img src="{{ MEDIA_URL }}forum/img/sticky.png" alt="Sticky" title="Sticky" />{% endif %}
695- {% if topic.closed %}<img src="{{ MEDIA_URL }}forum/img/closed.png" alt="Closed" title="Closed" />{% endif %}
696+ {% if topic.sticky %}<img src="{% static 'forum/img/sticky.png' %}" alt="Sticky" title="Sticky" />{% endif %}
697+ {% if topic.closed %}<img src="{% static 'forum/img/closed.png' %}" alt="Closed" title="Closed" />{% endif %}
698 <a href="{{ topic.get_absolute_url }}">{{ topic.name }}</a><br />
699 <span class="small">Created by {{ topic.user|user_link }} on {{ topic.created|custom_date:user }}</span>
700 </td>
701@@ -83,16 +84,16 @@
702 </tbody>
703 </table>
704 <a class="button posRight" href="{% url 'pybb_add_topic' forum.id %}">
705- <img src="{{ MEDIA_URL }}forum/img/new_topic.png" alt ="{% trans "New Topic" %}" class="middle" />
706+ <img src="{% static 'forum/img/new_topic.png' %}" alt ="{% trans "New Topic" %}" class="middle" />
707 <span class="middle">{% trans "New Topic" %}</span>
708 </a>
709 {% paginate %}
710 </div>
711
712 <div class="center green">
713- <img src="{{ MEDIA_URL }}forum/img/doc_big_work_star.png" alt="" class="middle" />
714+ <img src="{% static 'forum/img/doc_big_work_star.png' %}" alt="" class="middle" />
715 = Unread posts
716- <img src="{{ MEDIA_URL }}forum/img/doc_big_work.png" alt="" class="middle" />
717+ <img src="{% static 'forum/img/doc_big_work.png' %}" alt="" class="middle" />
718 = No unread posts
719 </div>
720 {% endblock %}
721
722=== modified file 'templates/pybb/index.html'
723--- templates/pybb/index.html 2018-10-14 13:24:15 +0000
724+++ templates/pybb/index.html 2018-11-28 19:45:23 +0000
725@@ -1,5 +1,6 @@
726 {% extends 'pybb/base.html' %}
727 {% load pybb_extras %}
728+{% load static %}
729
730 {% block content_header %}
731 <h1>Forums</h1>
732@@ -14,9 +15,9 @@
733 {% endfor %}
734
735 <div class="center green">
736- <img src="{{ MEDIA_URL }}forum/img/folder_big_work_star.png" style="width: 48px; height:48px; margin: 0px;" alt="" class="middle" />
737+ <img src="{% static 'forum/img/folder_big_work_star.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" class="middle" />
738 = Unread posts
739- <img src="{{ MEDIA_URL }}forum/img/folder_big_work.png" style="width: 48px; height:48px; margin: 0px;" alt="" class="middle" />
740+ <img src="{% static 'forum/img/folder_big_work.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" class="middle" />
741 = No unread posts
742 </div>
743
744@@ -24,20 +25,20 @@
745 <table class="legend">
746 <tr>
747 <td>
748- <img src="{{ MEDIA_URL }}forum/img/folder_new_big.png" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
749+ <img src="{% static 'forum/img/folder_new_big.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
750 </td>
751 <td>= Unread posts</td>
752 <td>
753- <img src="{{ MEDIA_URL }}forum/img/folder_big.png" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
754+ <img src="{% static 'forum/img/folder_big.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
755 </td><td>= No unread posts</td>
756 </tr>
757
758 <tr>
759 <td>
760- <img src="{{ MEDIA_URL }}forum/img/folder_locked_big.png" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
761+ <img src="{% static 'forum/img/folder_locked_big.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
762 </td><td>= Locked topic</td>
763 <td>
764- <img src="{{ MEDIA_URL }}forum/img/folder_new_locked_big.png" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
765+ <img src="{% static 'forum/img/folder_new_locked_big.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
766 </td><td>= Unread posts in locked topic</td>
767 </tr>
768 </table>
769
770=== modified file 'templates/pybb/inlines/display_category.html'
771--- templates/pybb/inlines/display_category.html 2018-11-17 10:51:02 +0000
772+++ templates/pybb/inlines/display_category.html 2018-11-28 19:45:23 +0000
773@@ -8,6 +8,7 @@
774 {% load pybb_extras %}
775 {% load wlprofile_extras %}
776 {% load custom_date %}
777+{% load static %}
778
779 <table class="forum">
780 {# List all forums #}
781@@ -15,9 +16,9 @@
782 <tr class="{% cycle 'odd' 'even' %}">
783 <td class="forumIcon center">
784 {% if forum|pybb_has_unreads:user %}
785- <img src="{{ MEDIA_URL }}forum/img/folder_big_work_star.png" style="width: 48px; height:48px; margin: 0px;" alt="" />
786+ <img src="{% static 'forum/img/folder_big_work_star.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" />
787 {% else %}
788- <img src="{{ MEDIA_URL }}forum/img/folder_big_work.png" style="width: 48px; height:48px; margin: 0px;" alt="" />
789+ <img src="{% static 'forum/img/folder_big_work.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" />
790 {% endif %}
791 </td>
792 <td class="forumTitle">
793@@ -30,15 +31,15 @@
794 Posts: {{ forum.posts.count }}
795 </td>
796 <td class="lastPost">
797- {% with last_post=forum.last_post %}
798- {% if last_post %}
799- <a href="{{last_post.get_absolute_url}}">{{ last_post.topic.name }}</a><br />
800- <span class="small">by {{ last_post.user|user_link }}<br />
801- on {{ last_post.created|custom_date:user}}</span>
802+ {% if forum.last_post %}
803+ {% with last_post=forum.last_post %}
804+ <a href="{{last_post.get_absolute_url}}">{{ last_post.topic.name }}</a><br />
805+ <span class="small">by {{ last_post.user|user_link }}<br />
806+ on {{ last_post.created|custom_date:user}}</span>
807+ {% endwith %}
808 {% else %}
809 &nbsp;
810 {% endif %}
811- {% endwith %}
812 </td>
813 </tr>
814 {% endfor %}
815
816=== modified file 'templates/pybb/inlines/forum_row.html'
817--- templates/pybb/inlines/forum_row.html 2017-01-21 19:06:19 +0000
818+++ templates/pybb/inlines/forum_row.html 2018-11-28 19:45:23 +0000
819@@ -5,12 +5,14 @@
820 {% load pybb_extras %}
821 {% load wlprofile_extras %}
822 {% load custom_date %}
823+{% load static %}
824+
825 <tr>
826 <td class="even" align="center" valign="middle">
827 {% if forum|pybb_has_unreads:user %}
828- <img src="{{ MEDIA_URL }}forum/img/folder_new_big.png" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
829+ <img src="{% static 'forum/img/folder_new_big.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
830 {% else %}
831- <img src="{{ MEDIA_URL }}forum/img/folder_big.png" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
832+ <img src="{% static 'forum/img/folder_big.png' %}" style="width: 48px; height:48px; margin: 0px;" alt="" align="middle" />
833 {% endif %}
834 </td>
835 <td class="odd">
836
837=== modified file 'templates/pybb/inlines/post.html'
838--- templates/pybb/inlines/post.html 2017-11-01 15:51:57 +0000
839+++ templates/pybb/inlines/post.html 2018-11-28 19:45:23 +0000
840@@ -8,6 +8,7 @@
841 {% load wiki_extras %}
842 {% load wlprofile_extras %}
843 {% load custom_date %}
844+{% load static %}
845 <a name="post-{{ post.id }}"></a>
846 <table class="{% cycle "odd" "even" %}" width="100%">
847 <tr>
848@@ -17,7 +18,7 @@
849 <tr>
850 <td style="text-align: left; border: 0px;">
851 <a href="{{post.get_absolute_url}}">
852- <img src="{{ MEDIA_URL }}forum/img/en/permalink.png" height="25" alt ="{% trans "Permalink" %}" />
853+ <img src="{% static 'forum/img/en/permalink.png' %}" height="25" alt ="{% trans "Permalink" %}" />
854 </a>
855 </td>
856 <td style="text-align: right; border: 0px;">
857@@ -39,7 +40,7 @@
858 {% endif %}
859 <strong>Joined:</strong> {{ post.user.date_joined|custom_date:user|title }}<br />
860 <strong>Posts:</strong> {{ post.user.wlprofile.post_count }}<br />
861- <img src="{{ MEDIA_URL }}img/{{ post.user.wlprofile.user_status.image }}" alt="Ranking" />
862+ <img src="{% static 'img/{{ post.user.wlprofile.user_status.image }}" alt="Ranking" />
863 <br />
864 <strong>{{ post.user.wlprofile.user_status.text }}</strong><br />
865 {% if post.user.wlprofile.location %}
866@@ -80,7 +81,7 @@
867 <tr>
868 <td class="toplink">
869 <a href="#top">
870- <img src="{{ MEDIA_URL }}forum/img/en/top.png" height="25" alt ="{% trans "Top" %}" />
871+ <img src="{% static 'forum/img/en/top.png' %}" height="25" alt ="{% trans "Top" %}" />
872 </a>
873 </td>
874
875@@ -89,25 +90,25 @@
876 {% if user.is_authenticated %}
877 {% ifnotequal user post.user %}
878 <a href="{% url 'messages_compose_to' post.user %}">
879- <img src="{{ MEDIA_URL }}forum/img/en/send_pm.png" height="25" alt ="{% trans "Send PM" %}" />
880+ <img src="{% static 'forum/img/en/send_pm.png' %}" height="25" alt ="{% trans "Send PM" %}" />
881 </a>
882 {% endifnotequal %}
883 {% endif %}
884 {% if moderator or post|pybb_posted_by:user %}
885 <a href="{% url 'pybb_edit_post' post.id %}">
886- <img src="{{ MEDIA_URL }}forum/img/en/edit.png" height="25" alt ="{% trans "Edit" %}" />
887+ <img src="{% static 'forum/img/en/edit.png' %}" height="25" alt ="{% trans "Edit" %}" />
888 </a>
889 {% endif %}
890 {% if moderator or post|pybb_equal_to:last_post %}
891 {% if moderator or post.user|pybb_equal_to:user %}
892 <a href="{% url 'pybb_delete_post' post.id %}">
893- <img src="{{ MEDIA_URL }}forum/img/en/delete.png" height="25" alt ="{% trans "Delete" %}" />
894+ <img src="{% static 'forum/img/en/delete.png' %}" height="25" alt ="{% trans "Delete" %}" />
895 </a>
896 {% endif %}
897 </div>
898 <div class="tools" style="float: right;">
899 <a href="{% url 'pybb_add_post' topic.id %}?quote_id={{ post.id }}">
900- <img src="{{ MEDIA_URL }}forum/img/en/quote.png" height="25" alt ="{% trans "Quote" %}" />
901+ <img src="{% static 'forum/img/en/quote.png' %}" height="25" alt ="{% trans "Quote" %}" />
902 </a>
903 {% endif %}
904 </div>
905
906=== modified file 'templates/pybb/inlines/topic_row.html'
907--- templates/pybb/inlines/topic_row.html 2016-03-02 21:02:38 +0000
908+++ templates/pybb/inlines/topic_row.html 2018-11-28 19:45:23 +0000
909@@ -5,12 +5,14 @@
910 {% load pybb_extras %}
911 {% load wlprofile_extras %}
912 {% load custom_date %}
913+{% load static %}
914+
915 <tr class="topic_description {% cycle "odd" "even" %}">
916 <td align="center" valign="middle">
917 {% if topic|pybb_has_unreads:user %}
918- <img src="{{ MEDIA_URL }}forum/img/folder_new.png" style="margin: 0px;" alt="" align="middle" />
919+ <img src="{% static 'forum/img/folder_new.png' %}" style="margin: 0px;" alt="" align="middle" />
920 {% else %}
921- <img src="{{ MEDIA_URL }}forum/img/folder.png" style="margin: 0px;" alt="" align="middle" />
922+ <img src="{% static 'forum/img/folder.png' %}" style="margin: 0px;" alt="" align="middle" />
923 {% endif %}
924 </td>
925 <td id="name">
926@@ -19,9 +21,9 @@
927 {% comment %}
928 oehm ja, geht nicht weil ka muss ich guggn, die frage ist. soll es fuer alle gelten oder nur fuer eine topic
929 {% endcomment %}
930- {% if subscribed %}<img src="{{ MEDIA_URL }}forum/img/en/subscribe_small.png" height="20" alt="subscribe" style="float:left" />{% endif %}
931- {% if topic.sticky %}<img src="{{ MEDIA_URL }}forum/img/en/stick_topic_small.png" height="20" alt ="Sticky" style="float:left;" /> {% endif %}
932- {% if topic.closed %}<img src="{{ MEDIA_URL }}forum/img/en/close_small.png" height="20" alt ="Closed" style="float:left; " /> {% endif %}
933+ {% if subscribed %}<img src="{% static 'forum/img/en/subscribe_small.png' %}" height="20" alt="subscribe" style="float:left" />{% endif %}
934+ {% if topic.sticky %}<img src="{% static 'forum/img/en/stick_topic_small.png' %}" height="20" alt ="Sticky" style="float:left;" /> {% endif %}
935+ {% if topic.closed %}<img src="{% static 'forum/img/en/close_small.png' %}" height="20" alt ="Closed" style="float:left; " /> {% endif %}
936 &nbsp;{{ topic.name }}
937 </a>
938 </span>
939
940=== modified file 'templates/pybb/post_form.html'
941--- templates/pybb/post_form.html 2016-04-24 19:30:03 +0000
942+++ templates/pybb/post_form.html 2018-11-28 19:45:23 +0000
943@@ -1,4 +1,5 @@
944 {% load i18n %}
945+{% load static %}
946
947 {% comment %}
948 This template is used to prevent using same code
949@@ -6,7 +7,7 @@
950 {% endcomment %}
951
952 {% block extra_head %}
953-<script type="text/javascript" src="{{ MEDIA_URL }}js/disableOnSubmit.js"></script>
954+<script type="text/javascript" src="{% static 'js/disableOnSubmit.js' %}"></script>
955 <script type="text/javascript">
956 $(function() {
957 $('form').disableOnSubmit();
958@@ -45,7 +46,7 @@
959
960 <div class="posRight">
961 <a href="/wiki/WikiSyntax" title="Opens new Tab/Window" target="_blank">
962- <img src="{{ MEDIA_URL }}img/menu_help.png" alt="Help on Syntax" class="middle">
963+ <img src="{% static 'img/menu_help.png' %}" alt="Help on Syntax" class="middle">
964 Help on Syntax
965 </a>
966 </div>
967@@ -54,11 +55,11 @@
968 {{ form.as_p }}
969 {% csrf_token %}
970 <button type="submit">
971- <img src="{{ MEDIA_URL }}forum/img/send.png" alt ="" class="middle" />
972+ <img src="{% static 'forum/img/send.png' %}" alt ="" class="middle" />
973 <span class="middle">{% trans "Send" %}</span>
974 </button>
975 <button type="button" class="preview-button">
976- <img src="{{ MEDIA_URL }}forum/img/preview.png" alt ="" class="middle" />
977+ <img src="{% static 'forum/img/preview.png' %}" alt ="" class="middle" />
978 <span class="middle">{% trans "Preview" %}</span>
979 </button>
980 </form>
981
982=== modified file 'templates/pybb/topic.html'
983--- templates/pybb/topic.html 2018-11-18 10:28:03 +0000
984+++ templates/pybb/topic.html 2018-11-28 19:45:23 +0000
985@@ -6,6 +6,7 @@
986 {% load wlprofile_extras %}
987 {% load custom_date %}
988 {% load pagination_tags %}
989+{% load static %}
990
991 {% block title %}
992 {{ topic.name }} - {{ topic.forum.name }} - {{ block.super }}
993@@ -38,7 +39,7 @@
994 <div class="posRight">
995 {% if moderator %}
996 <a class="button" href="{% url 'pybb_toggle_hid_topic' topic.id %}">
997- <img src="{{ MEDIA_URL }}forum/img/topic_show.png" alt ="" class="middle" />
998+ <img src="{% static 'forum/img/topic_show.png' %}" alt ="" class="middle" />
999 <span class="middle">{% trans "Toggle Visibility" %}</span>
1000 </a>
1001 {% endif %}
1002@@ -46,28 +47,28 @@
1003 <div class="posRight">
1004 {% if moderator %}
1005 <a class="button" href="{% url 'pybb_toggle_hid_topic' topic.id %}">
1006- <img src="{{ MEDIA_URL }}forum/img/topic_hide.png" alt ="" class="middle" />
1007+ <img src="{% static 'forum/img/topic_hide.png' %}" alt ="" class="middle" />
1008 <span class="middle">{% trans "Toggle Visibility" %}</span>
1009 </a>
1010 {% if topic.sticky %}
1011 <a class="button" href="{% url 'pybb_unstick_topic' topic.id %}">
1012- <img src="{{ MEDIA_URL }}forum/img/unstick.png" alt ="" class="middle" />
1013+ <img src="{% static 'forum/img/unstick.png' %}" alt ="" class="middle" />
1014 <span class="middle">{% trans "Unstick Topic" %}</span>
1015 </a>
1016 {% else %}
1017 <a class="button" href="{% url 'pybb_stick_topic' topic.id %}">
1018- <img src="{{ MEDIA_URL }}forum/img/sticky.png" alt ="" class="middle" />
1019+ <img src="{% static 'forum/img/sticky.png' %}" alt ="" class="middle" />
1020 <span class="middle">{% trans "Stick Topic" %}</span>
1021 </a>
1022 {% endif %}
1023 {% if topic.closed %}
1024 <a class="button" href="{% url 'pybb_open_topic' topic.id %}">
1025- <img src="{{ MEDIA_URL }}forum/img/open.png" alt ="" class="middle" />
1026+ <img src="{% static 'forum/img/open.png' %}" alt ="" class="middle" />
1027 <span class="middle">{% trans "Open Topic" %}</span>
1028 </a>
1029 {% else %}
1030 <a class="button" href="{% url 'pybb_close_topic' topic.id %}">
1031- <img src="{{ MEDIA_URL }}forum/img/closed.png" alt ="" class="middle" />
1032+ <img src="{% static 'forum/img/closed.png' %}" alt ="" class="middle" />
1033 <span class="middle">{% trans "Close Topic" %}</span>
1034 </a>
1035 {% endif %}
1036@@ -75,17 +76,17 @@
1037 {% if user.is_authenticated %}
1038 {% if subscribed %}
1039 <a class="button" href="{% url 'pybb_delete_subscription' topic.id %}?from_topic">
1040- <img src="{{ MEDIA_URL }}forum/img/unsubscribe.png" alt ="" class="middle" />
1041+ <img src="{% static 'forum/img/unsubscribe.png' %}" alt ="" class="middle" />
1042 <span class="middle">{% trans "Unsubscribe" %}</span>
1043 </a>
1044 {% else %}
1045 <a class="button" href="{% url 'pybb_add_subscription' topic.id %}">
1046- <img src="{{ MEDIA_URL }}forum/img/subscribe.png" alt ="" class="middle" />
1047+ <img src="{% static 'forum/img/subscribe.png' %}" alt ="" class="middle" />
1048 <span class="middle">{% trans "Subscribe" %}</span>
1049 </a>
1050 {% endif %}
1051 <a class="button" href="{% url 'pybb_add_post' topic.id %}">
1052- <img src="{{ MEDIA_URL }}forum/img/send.png" alt ="" class="middle" />
1053+ <img src="{% static 'forum/img/send.png' %}" alt ="" class="middle" />
1054 <span class="middle">{% trans "New Reply" %}</span>
1055 </a>
1056 {% endif %}
1057@@ -110,7 +111,7 @@
1058 <div class="authorStats">
1059 <strong>Joined:</strong> {{ post.user.date_joined|custom_date:user|title }}<br />
1060 <strong>Posts:</strong> {{ post.user.wlprofile.post_count }}<br />
1061- <img src="{{ MEDIA_URL }}img/{{ post.user.wlprofile.user_status.image }}" alt="Ranking" /><br />
1062+ <img src="{% static 'img/' %}{{ post.user.wlprofile.user_status.image }}" alt="Ranking" /><br />
1063 <strong>{{ post.user.wlprofile.user_status.text }}</strong><br />
1064 {% if post.user.wlprofile.location %}
1065 <strong>Location:</strong> {{ post.user.wlprofile.location }}<br />
1066@@ -148,22 +149,22 @@
1067 {% endif %}
1068
1069 <button onclick="window.location.href='#top';" class="posRight">
1070- <img src="{{ MEDIA_URL }}forum/img/top.png" alt ="" class="middle" />
1071+ <img src="{% static 'forum/img/top.png' %}" alt ="" class="middle" />
1072 <span class="middle">{% trans "Top" %}</span>
1073 </button>
1074
1075 <button onclick="window.location.href='{% url 'pybb_add_post' topic.id %}?quote_id={{ post.id }}';">
1076- <img src="{{ MEDIA_URL }}forum/img/quote.png" alt ="" class="middle" />
1077+ <img src="{% static 'forum/img/quote.png' %}" alt ="" class="middle" />
1078 <span class="middle">{% trans "Quote" %}</span>
1079 </button>
1080 {% if moderator or post|pybb_posted_by:user %}
1081 <button onclick="window.location.href='{% url 'pybb_edit_post' post.id %}';">
1082- <img src="{{ MEDIA_URL }}forum/img/edit.png" alt ="" class="middle" />
1083+ <img src="{% static 'forum/img/edit.png' %}" alt ="" class="middle" />
1084 <span class="middle">{% trans "Edit" %}</span>
1085 </button>
1086 {% if moderator or post|pybb_equal_to:last_post %}
1087 <button onclick="window.location.href='{% url 'pybb_delete_post' post.id %}';">
1088- <img src="{{ MEDIA_URL }}forum/img/delete.png" alt ="" class="middle" />
1089+ <img src="{% static 'forum/img/delete.png' %}" alt ="" class="middle" />
1090 <span class="middle">{% trans "Delete" %}</span>
1091 </button>
1092 {% endif %}
1093@@ -195,7 +196,7 @@
1094 <div class="authorStats">
1095 <strong>Joined:</strong> {{ post.user.date_joined|custom_date:user|title }}<br />
1096 <strong>Posts:</strong> {{ post.user.wlprofile.post_count }}<br />
1097- <img src="{{ MEDIA_URL }}img/{{ post.user.wlprofile.user_status.image }}" alt="Ranking" /><br />
1098+ <img src="{% static 'img/'%}{{ post.user.wlprofile.user_status.image }}" alt="Ranking" /><br />
1099 <strong>{{ post.user.wlprofile.user_status.text }}</strong><br />
1100 {% if post.user.wlprofile.location %}
1101 <strong>Location:</strong> {{ post.user.wlprofile.location }}<br />
1102@@ -233,22 +234,22 @@
1103 {% endif %}
1104
1105 <a class="button posRight" href="#top">
1106- <img src="{{ MEDIA_URL }}forum/img/top.png" alt ="" class="middle" />
1107+ <img src="{% static 'forum/img/top.png' %}" alt ="" class="middle" />
1108 <span class="middle">{% trans "Top" %}</span>
1109 </a>
1110
1111 <a class="button" href="{% url 'pybb_add_post' topic.id %}?quote_id={{ post.id }}">
1112- <img src="{{ MEDIA_URL }}forum/img/quote.png" alt ="" class="middle" />
1113+ <img src="{% static 'forum/img/quote.png' %}" alt ="" class="middle" />
1114 <span class="middle">{% trans "Quote" %}</span>
1115 </a>
1116 {% if moderator or post|pybb_posted_by:user %}
1117 <a class="button" href="{% url 'pybb_edit_post' post.id %}">
1118- <img src="{{ MEDIA_URL }}forum/img/edit.png" alt ="" class="middle" />
1119+ <img src="{% static 'forum/img/edit.png' %}" alt ="" class="middle" />
1120 <span class="middle">{% trans "Edit" %}</span>
1121 </a>
1122 {% if moderator or post|pybb_equal_to:last_post %}
1123 <a class="button" href="{% url 'pybb_delete_post' post.id %}">
1124- <img src="{{ MEDIA_URL }}forum/img/delete.png" alt ="" class="middle" />
1125+ <img src="{% static 'forum/img/delete.png' %}" alt ="" class="middle" />
1126 <span class="middle">{% trans "Delete" %}</span>
1127 </a>
1128 {% endif %}
1129@@ -269,28 +270,28 @@
1130 <div class="posRight">
1131 {% if moderator %}
1132 <a class="button" href="{% url 'pybb_toggle_hid_topic' topic.id %}">
1133- <img src="{{ MEDIA_URL }}forum/img/topic_hide.png" alt ="" class="middle" />
1134+ <img src="{% static 'forum/img/topic_hide.png' %}" alt ="" class="middle" />
1135 <span class="middle">{% trans "Toggle Visibility" %}</span>
1136 </a>
1137 {% if topic.sticky %}
1138 <a class="button" href="{% url 'pybb_unstick_topic' topic.id %}">
1139- <img src="{{ MEDIA_URL }}forum/img/unstick.png" alt ="" class="middle" />
1140+ <img src="{% static 'forum/img/unstick.png' %}" alt ="" class="middle" />
1141 <span class="middle">{% trans "Unstick Topic" %}</span>
1142 </a>
1143 {% else %}
1144 <a class="button" href="{% url 'pybb_stick_topic' topic.id %}">
1145- <img src="{{ MEDIA_URL }}forum/img/sticky.png" alt ="" class="middle" />
1146+ <img src="{% static 'forum/img/sticky.png' %}" alt ="" class="middle" />
1147 <span class="middle">{% trans "Stick Topic" %}</span>
1148 </a>
1149 {% endif %}
1150 {% if topic.closed %}
1151 <a class="button" href="{% url 'pybb_open_topic' topic.id %}">
1152- <img src="{{ MEDIA_URL }}forum/img/open.png" alt ="" class="middle" />
1153+ <img src="{% static 'forum/img/open.png' %}" alt ="" class="middle" />
1154 <span class="middle">{% trans "Open Topic" %}</span>
1155 </a>
1156 {% else %}
1157 <a class="button" href="{% url 'pybb_close_topic' topic.id %}">
1158- <img src="{{ MEDIA_URL }}forum/img/closed.png" alt ="" class="middle" />
1159+ <img src="{% static 'forum/img/closed.png' %}" alt ="" class="middle" />
1160 <span class="middle">{% trans "Close Topic" %}</span>
1161 </a>
1162 {% endif %}
1163@@ -298,17 +299,17 @@
1164 {% if user.is_authenticated %}
1165 {% if subscribed %}
1166 <a class="button" href="{% url 'pybb_delete_subscription' topic.id %}?from_topic">
1167- <img src="{{ MEDIA_URL }}forum/img/unsubscribe.png" alt ="" class="middle" />
1168+ <img src="{% static 'forum/img/unsubscribe.png' %}" alt ="" class="middle" />
1169 <span class="middle">{% trans "Unsubscribe" %}</span>
1170 </a>
1171 {% else %}
1172 <a class="button" href="{% url 'pybb_add_subscription' topic.id %}">
1173- <img src="{{ MEDIA_URL }}forum/img/subscribe.png" alt ="" class="middle" />
1174+ <img src="{% static 'forum/img/subscribe.png' %}" alt ="" class="middle" />
1175 <span class="middle">{% trans "Subscribe" %}</span>
1176 </a>
1177 {% endif %}
1178 <a class="button" href="{% url 'pybb_add_post' topic.id %}">
1179- <img src="{{ MEDIA_URL }}forum/img/send.png" alt ="" class="middle" />
1180+ <img src="{% static 'forum/img/send.png' %}" alt ="" class="middle" />
1181 <span class="middle">{% trans "New Reply" %}</span>
1182 </a>
1183 {% endif %}
1184
1185=== modified file 'templates/registration/base.html'
1186--- templates/registration/base.html 2016-06-03 14:22:24 +0000
1187+++ templates/registration/base.html 2018-11-28 19:45:23 +0000
1188@@ -4,6 +4,5 @@
1189 {% endcomment %}
1190
1191 {% block extra_head %}
1192-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/register.css" />{{ block.super}}
1193 <script src="https://www.google.com/recaptcha/api.js" async defer></script>
1194 {% endblock %}
1195
1196=== modified file 'templates/search/search.html'
1197--- templates/search/search.html 2018-10-14 13:24:15 +0000
1198+++ templates/search/search.html 2018-11-28 19:45:23 +0000
1199@@ -1,8 +1,9 @@
1200 {% extends 'base.html' %}
1201 {% load custom_date %}
1202+{% load static %}
1203
1204 {% block extra_head %}
1205-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/search.css" />
1206+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/search.css' %}" />
1207 {{block.super}}
1208 {% endblock %}
1209
1210
1211=== modified file 'templates/threadedcomments/preview_comment.html'
1212--- templates/threadedcomments/preview_comment.html 2018-10-14 14:20:48 +0000
1213+++ templates/threadedcomments/preview_comment.html 2018-11-28 19:45:23 +0000
1214@@ -1,10 +1,11 @@
1215 {% extends "base.html" %}
1216
1217 {% load threadedcommentstags %}
1218+{% load static %}
1219
1220 {% block extra_head %}
1221 {{ block.super }}
1222-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/comments.css" />
1223+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/comments.css' %}" />
1224 {% endblock %}
1225
1226 {% block content_header %}
1227
1228=== modified file 'templates/wiki/base.html'
1229--- templates/wiki/base.html 2018-06-03 15:33:37 +0000
1230+++ templates/wiki/base.html 2018-11-28 19:45:23 +0000
1231@@ -1,5 +1,6 @@
1232 {% extends "base.html" %}
1233 {% load i18n %}
1234+{% load static %}
1235
1236 {% block title %}
1237 Wiki - {{ block.super }}
1238@@ -9,7 +10,7 @@
1239 {{ block.super}}
1240 <link rel="alternate" type="application/rss+xml" title="Wiki History (RSS)" href="{% url 'wiki_history_feed_rss' %}" />
1241 <link rel="alternate" type="application/atom+xml" title="Wiki History (Atom)" href="{% url 'wiki_history_feed_atom' %}" />
1242-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/wiki.css" />
1243+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/wiki.css' %}" />
1244 {% endblock %}
1245
1246 {# Define all(!) tabs for the wiki here (all in one place).
1247
1248=== modified file 'templates/wiki/edit.html'
1249--- templates/wiki/edit.html 2018-10-09 18:23:07 +0000
1250+++ templates/wiki/edit.html 2018-11-28 19:45:23 +0000
1251@@ -1,13 +1,14 @@
1252 {% extends 'wiki/base.html' %}
1253 {% load i18n %}
1254 {% load wlimages_extras %}
1255+{% load static %}
1256
1257 {% block title %}
1258 {% trans "Editing" %} {{ article.title }} - {{ block.super }}
1259 {% endblock %}
1260
1261 {% block extra_head %}
1262-<script type="text/javascript" src="{{ MEDIA_URL }}js/disableOnSubmit.js"></script>
1263+<script type="text/javascript" src="{% static 'js/disableOnSubmit.js' %}"></script>
1264 <script type="text/javascript">
1265 $(function() {
1266 $('form').disableOnSubmit();
1267
1268=== modified file 'templates/wlhelp/base.html'
1269--- templates/wlhelp/base.html 2018-03-09 12:12:02 +0000
1270+++ templates/wlhelp/base.html 2018-11-28 19:45:23 +0000
1271@@ -1,11 +1,12 @@
1272 {% extends "base.html" %}
1273+{% load static %}
1274
1275 {% block title %}
1276 Encyclopedia - {{ block.super }}
1277 {% endblock %}
1278
1279 {% block extra_head %}
1280- <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/encyclopedia.css" />
1281- <script src="{{ MEDIA_URL }}js/encyclopedia.js"></script>
1282+ <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/encyclopedia.css' %}" />
1283+ <script src="{% static 'js/encyclopedia.js' %}"></script>
1284 {{ block.super}}
1285 {% endblock %}
1286\ No newline at end of file
1287
1288=== modified file 'templates/wlmaps/base.html'
1289--- templates/wlmaps/base.html 2018-11-21 06:21:45 +0000
1290+++ templates/wlmaps/base.html 2018-11-28 19:45:23 +0000
1291@@ -5,8 +5,8 @@
1292 {% endcomment %}
1293
1294 {% block extra_head %}
1295-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/forum.css" />
1296-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/maps.css" />
1297+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/forum.css' %}" />
1298+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/maps.css' %}" />
1299 <link rel="stylesheet" href="{% static 'star-ratings/css/star-ratings.css' %}" />
1300 <script type="text/javascript" src="{% static 'star-ratings/js/dist/star-ratings.min.js' %}"></script>
1301 {{block.super}}
1302
1303=== modified file 'templates/wlmaps/edit_comment.html'
1304--- templates/wlmaps/edit_comment.html 2018-10-14 13:24:15 +0000
1305+++ templates/wlmaps/edit_comment.html 2018-11-28 19:45:23 +0000
1306@@ -1,4 +1,5 @@
1307 {% extends "wlmaps/base.html" %}
1308+{% load static %}
1309
1310 {% block content_header %}
1311 <h1>Edit comment: {{ map.name }}</h1>
1312@@ -10,7 +11,7 @@
1313 {{ form.uploader_comment.label_tag }}
1314 <span class="posRight">
1315 <a href="/wiki/WikiSyntax" title="Opens new Tab/Window" target="_blank">
1316- <img src="{{ MEDIA_URL }}img/menu_help.png" alt="Help on Syntax" class="middle">
1317+ <img src="{% static 'img/menu_help.png' %}" alt="Help on Syntax" class="middle">
1318 Help on Syntax
1319 </a>
1320 </span>
1321@@ -21,7 +22,7 @@
1322 {% endif %}
1323 {% csrf_token %}
1324 <button type="submit">
1325- <img src="{{ MEDIA_URL }}forum/img/send.png" alt ="Submit" class="middle" />
1326+ <img src="{% static 'forum/img/send.png' %}" alt ="Submit" class="middle" />
1327 <span class="middle">Submit</span>
1328 </button>
1329 </form>
1330
1331=== modified file 'templates/wlmaps/index.html'
1332--- templates/wlmaps/index.html 2018-11-18 17:03:56 +0000
1333+++ templates/wlmaps/index.html 2018-11-28 19:45:23 +0000
1334@@ -8,6 +8,7 @@
1335 {% load threadedcommentstags %}
1336 {% load pagination_tags %}
1337 {% load ratings %}
1338+{% load static %}
1339
1340 {% block content_header %}
1341 <h1>Maps</h1>
1342@@ -82,7 +83,7 @@
1343 <td class="spacer"></td>
1344 <td colspan="2">
1345 <a class="button" href="{% url 'wlmaps_download' map.slug %}">
1346- <img src="{{ MEDIA_URL }}img/arrow_down_short.png" alt ="" class="middle" />
1347+ <img src="{% static 'img/arrow_down_short.png' %}" alt ="" class="middle" />
1348 <span class="middle">Direct Download</span>
1349 </a>
1350 </td>
1351
1352=== modified file 'templates/wlmaps/map_detail.html'
1353--- templates/wlmaps/map_detail.html 2018-11-18 17:22:39 +0000
1354+++ templates/wlmaps/map_detail.html 2018-11-28 19:45:23 +0000
1355@@ -8,12 +8,13 @@
1356 {% load threadedcommentstags %}
1357 {% load wl_markdown %}
1358 {% load ratings %}
1359+{% load static %}
1360
1361 {% block title %}{{ map.name }} - {{ block.super }}{% endblock %}
1362
1363 {% block extra_head %}
1364 {{ block.super }}
1365- <link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/comments.css" />
1366+ <link rel="stylesheet" type="text/css" media="all" href="{% static 'css/comments.css' %}" />
1367 {% endblock %}
1368
1369 {% block content_header %}
1370@@ -41,7 +42,7 @@
1371 <div>{{ map.uploader_comment|wl_markdown:"bleachit" }}</div>
1372 {% if user == map.uploader %}
1373 <a class="button posLeft" href="{% url 'wlmaps_edit_comment' map.slug %}">
1374- <img alt="Edit" title="Edit your comment" class="middle" src="{{ MEDIA_URL }}forum/img/edit.png">
1375+ <img alt="Edit" title="Edit your comment" class="middle" src="{% static 'forum/img/edit.png' %}">
1376 <span class="middle">Edit</span>
1377 </a>
1378 {% endif %}
1379@@ -102,7 +103,7 @@
1380
1381 <div style="margin: 1em 0px 1em 0px">
1382 <a class="button posLeft" href="{% url 'wlmaps_download' map.slug %}">
1383- <img src="{{ MEDIA_URL }}img/arrow_down_short.png" alt ="" class="middle" />
1384+ <img src="{% static 'img/arrow_down_short.png' %}" alt ="" class="middle" />
1385 <span class="middle">Download this map</span>
1386 </a>
1387 </div>
1388
1389=== modified file 'templates/wlmaps/upload.html'
1390--- templates/wlmaps/upload.html 2018-10-14 13:24:15 +0000
1391+++ templates/wlmaps/upload.html 2018-11-28 19:45:23 +0000
1392@@ -3,6 +3,8 @@
1393 vim:ft=htmldjango
1394 {% endcomment %}
1395
1396+{% load static %}
1397+
1398 {% block title %}Upload - {{ block.super }}{% endblock %}
1399
1400 {% block content_header %}
1401@@ -22,7 +24,7 @@
1402 {{ form.uploader_comment.label_tag }}
1403 <span class="posRight">
1404 <a href="/wiki/WikiSyntax" title="Opens new Tab/Window" target="_blank">
1405- <img src="{{ MEDIA_URL }}img/menu_help.png" alt="Help on Syntax" class="middle">
1406+ <img src="{% static 'img/menu_help.png' %}" alt="Help on Syntax" class="middle">
1407 Help on Syntax
1408 </a>
1409 </span>
1410
1411=== modified file 'templates/wlpoll/base.html'
1412--- templates/wlpoll/base.html 2017-09-23 08:52:36 +0000
1413+++ templates/wlpoll/base.html 2018-11-28 19:45:23 +0000
1414@@ -3,10 +3,12 @@
1415 vim:ft=htmldjango
1416 {% endcomment %}
1417
1418+{% load static %}
1419+
1420 {% block extra_head %}
1421 {{block.super}}
1422-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/comments.css" />
1423-<script src="{{ MEDIA_URL }}js/highcharts_v5/highcharts.js" type="text/javascript"></script>
1424+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/comments.css' %}" />
1425+<script src="{% static 'js/highcharts_v5/highcharts.js' %}" type="text/javascript"></script>
1426 {% endblock %}
1427
1428 {% block title %}Polls - {{ block.super }}{% endblock %}
1429
1430=== modified file 'templates/wlpoll/poll_list.html'
1431--- templates/wlpoll/poll_list.html 2018-03-11 11:06:46 +0000
1432+++ templates/wlpoll/poll_list.html 2018-11-28 19:45:23 +0000
1433@@ -3,9 +3,11 @@
1434 vim:ft=htmldjango
1435 {% endcomment %}
1436
1437+{% load static %}
1438+
1439 {% block extra_head %}
1440 {{ block.super}}
1441-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/wiki.css" />
1442+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/wiki.css' %}" />
1443 {% endblock %}
1444
1445 {% load threadedcommentstags custom_date %}
1446
1447=== modified file 'templates/wlprofile/base.html'
1448--- templates/wlprofile/base.html 2018-10-14 13:24:15 +0000
1449+++ templates/wlprofile/base.html 2018-11-28 19:45:23 +0000
1450@@ -4,12 +4,14 @@
1451 vim:ft=htmldjango
1452 {% endcomment %}
1453
1454+{% load static %}
1455+
1456 {% block title %}
1457 {{ block.super }}
1458 {% endblock %}
1459
1460 {% block extra_head %}
1461-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/profile.css" />{{ block.super}}
1462+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/profile.css' %}" />{{ block.super}}
1463 {% endblock %}
1464
1465 {% block content_tabbing %}
1466
1467=== modified file 'templates/wlscheduling/base.html'
1468--- templates/wlscheduling/base.html 2018-10-15 16:11:43 +0000
1469+++ templates/wlscheduling/base.html 2018-11-28 19:45:23 +0000
1470@@ -1,10 +1,12 @@
1471 {% extends "wlprofile/base.html" %}
1472+{% load static %}
1473+
1474 {% block extra_head %}
1475-<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/jquery-ui.multidatespicker.css" >
1476-<link rel="stylesheet" type="text/css" href="{{ MEDIA_URL }}css/scheduling.css" >
1477+<link rel="stylesheet" type="text/css" href="{% static 'css/jquery-ui.multidatespicker.css' %}" >
1478+<link rel="stylesheet" type="text/css" href="{% static 'css/scheduling.css' %}" >
1479
1480-<script src="{{ MEDIA_URL }}js/jquery-ui.multidatespicker.js" type="text/javascript"></script>
1481-<script src="{{ MEDIA_URL }}js/scheduling.js" type="text/javascript"></script>
1482+<script src="{% static 'js/jquery-ui.multidatespicker.js' %}" type="text/javascript"></script>
1483+<script src="{% static 'js/scheduling.js' %}" type="text/javascript"></script>
1484 {% endblock %}
1485
1486 {% block title %}
1487
1488=== modified file 'templates/wlscreens/base.html'
1489--- templates/wlscreens/base.html 2012-04-02 09:41:12 +0000
1490+++ templates/wlscreens/base.html 2018-11-28 19:45:23 +0000
1491@@ -3,9 +3,11 @@
1492 vim:ft=htmldjango
1493 {% endcomment %}
1494
1495+{% load static %}
1496+
1497 {% block extra_head %}
1498 {{ block.super }}
1499-<link rel="stylesheet" type="text/css" media="all" href="{{ MEDIA_URL }}css/screens.css" />
1500+<link rel="stylesheet" type="text/css" media="all" href="{% static 'css/screens.css' %}" />
1501 {% endblock %}
1502
1503 {% block title %}Screenshots - {{ block.super }}{% endblock %}
1504
1505=== modified file 'templates/wlscreens/index.html'
1506--- templates/wlscreens/index.html 2018-10-14 13:24:15 +0000
1507+++ templates/wlscreens/index.html 2018-11-28 19:45:23 +0000
1508@@ -4,13 +4,14 @@
1509 {% endcomment %}
1510
1511 {% load wl_markdown %}
1512+{% load static %}
1513
1514 {% block extra_head %}
1515 {{ block.super }}
1516-<link rel="stylesheet" href="{{ MEDIA_URL }}lightbox_v2/css/lightbox.css" type="text/css" media="screen" />
1517-<link rel="stylesheet" href="{{ MEDIA_URL }}lightbox_v2/css/custom.css" type="text/css" media="screen" />
1518+<link rel="stylesheet" href="{% static 'lightbox_v2/css/lightbox.css' %}" type="text/css" media="screen" />
1519+<link rel="stylesheet" href="{% static 'lightbox_v2/css/custom.css' %}" type="text/css" media="screen" />
1520 <!-- lightbox-plus-jquery.min.js supports also IE9+ -->
1521-<script type="text/javascript" src="{{ MEDIA_URL }}lightbox_v2/lightbox-plus-jquery.min.js"></script>
1522+<script type="text/javascript" src="{% static 'lightbox_v2/lightbox-plus-jquery.min.js' %}"></script>
1523 <script type="text/javascript">
1524 lightbox.option({
1525 'resizeDuration': 400,
1526
1527=== added directory 'threadedcomments/static'
1528=== added directory 'threadedcomments/static/css'
1529=== renamed file 'media/css/comments.css' => 'threadedcomments/static/css/comments.css'
1530=== added directory 'wiki/css'
1531=== added directory 'wiki/static'
1532=== added directory 'wiki/static/css'
1533=== renamed file 'media/css/wiki.css' => 'wiki/static/css/wiki.css'
1534=== added directory 'wlhelp/static'
1535=== added directory 'wlhelp/static/css'
1536=== renamed file 'media/css/encyclopedia.css' => 'wlhelp/static/css/encyclopedia.css'
1537=== added directory 'wlhelp/static/js'
1538=== renamed file 'media/js/encyclopedia.js' => 'wlhelp/static/js/encyclopedia.js'
1539=== added directory 'wlmaps/static'
1540=== added directory 'wlmaps/static/css'
1541=== renamed file 'media/css/maps.css' => 'wlmaps/static/css/maps.css'
1542=== added directory 'wlpoll/static'
1543=== added directory 'wlpoll/static/js'
1544=== renamed directory 'media/js/highcharts_v5' => 'wlpoll/static/js/highcharts_v5'
1545=== added directory 'wlprofile/static'
1546=== added directory 'wlprofile/static/css'
1547=== renamed file 'media/css/profile.css' => 'wlprofile/static/css/profile.css'
1548=== added directory 'wlscheduling/static'
1549=== added directory 'wlscheduling/static/css'
1550=== renamed file 'media/css/jquery-ui.multidatespicker.css' => 'wlscheduling/static/css/jquery-ui.multidatespicker.css'
1551=== renamed file 'media/css/scheduling.css' => 'wlscheduling/static/css/scheduling.css'
1552=== added directory 'wlscheduling/static/js'
1553=== renamed file 'media/js/jquery-ui.multidatespicker.js' => 'wlscheduling/static/js/jquery-ui.multidatespicker.js'
1554=== renamed file 'media/js/scheduling.js' => 'wlscheduling/static/js/scheduling.js'
1555=== added directory 'wlscreens/static'
1556=== added directory 'wlscreens/static/css'
1557=== renamed file 'media/css/screens.css' => 'wlscreens/static/css/screens.css'
1558=== renamed directory 'media/lightbox_v2' => 'wlscreens/static/lightbox_v2'
1559=== added directory 'wlsearch/static'
1560=== added directory 'wlsearch/static/css'
1561=== renamed file 'media/css/search.css' => 'wlsearch/static/css/search.css'
1562=== added directory 'wlsearch/static/js'
1563=== renamed file 'media/js/search.js' => 'wlsearch/static/js/search.js'

Subscribers

People subscribed via source and target branches