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

Proposed by kaputtnik
Status: Merged
Merged at revision: 546
Proposed branch: lp:~widelands-dev/widelands-website/sitemap_https
Merge into: lp:widelands-website
Diff against target: 127 lines (+26/-22)
6 files modified
mainpage/sitemap_urls.py (+1/-1)
mainpage/sitemaps.py (+5/-1)
news/sitemap.py (+5/-5)
pybb/sitemap.py (+4/-4)
wiki/sitemap.py (+4/-4)
wlhelp/sitemap.py (+7/-7)
To merge this branch: bzr merge lp:~widelands-dev/widelands-website/sitemap_https
Reviewer Review Type Date Requested Status
GunChleoc Approve
janus Pending
Review via email: mp+370398@code.launchpad.net

Commit message

sitemap.xml: explicitly set protocol to https

Description of the change

See commit message

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

LGTM

review: Approve
546. By kaputtnik

merged trunk

547. By kaputtnik

use an own class for sitemaps https

548. By kaputtnik

codestyle

Revision history for this message
kaputtnik (franku) wrote :

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mainpage/sitemap_urls.py'
2--- mainpage/sitemap_urls.py 2019-04-11 15:06:09 +0000
3+++ mainpage/sitemap_urls.py 2019-07-28 12:21:26 +0000
4@@ -1,7 +1,7 @@
5 from django.conf.urls import url
6
7 from django.contrib.sitemaps.views import sitemap
8-from .static_sitemap import StaticViewSitemap
9+from .sitemaps import StaticViewSitemap
10 from wiki.sitemap import *
11 from news.sitemap import *
12 from pybb.sitemap import *
13
14=== renamed file 'mainpage/static_sitemap.py' => 'mainpage/sitemaps.py'
15--- mainpage/static_sitemap.py 2019-03-31 11:08:21 +0000
16+++ mainpage/sitemaps.py 2019-07-28 12:21:26 +0000
17@@ -2,7 +2,11 @@
18 from django.urls import reverse
19
20
21-class StaticViewSitemap(Sitemap):
22+class SitemapHTTPS(Sitemap):
23+ protocol = 'https'
24+
25+
26+class StaticViewSitemap(SitemapHTTPS):
27 priority = 0.5
28 changefreq = 'yearly'
29
30
31=== modified file 'news/sitemap.py'
32--- news/sitemap.py 2016-12-13 18:28:51 +0000
33+++ news/sitemap.py 2019-07-28 12:21:26 +0000
34@@ -1,11 +1,11 @@
35-from django.contrib.sitemaps import Sitemap
36 from .models import Post
37 from datetime import datetime
38 from datetime import timedelta
39-
40-
41-class NewsSitemap(Sitemap):
42- changefreq = 'never'
43+from mainpage.sitemaps import SitemapHTTPS
44+
45+
46+class NewsSitemap(SitemapHTTPS):
47+ changefreq = 'yearly'
48 priority = 0.5
49
50 def items(self):
51
52=== modified file 'pybb/sitemap.py'
53--- pybb/sitemap.py 2016-11-04 08:07:18 +0000
54+++ pybb/sitemap.py 2019-07-28 12:21:26 +0000
55@@ -1,8 +1,8 @@
56-from django.contrib.sitemaps import Sitemap
57 from pybb.models import Forum
58-
59-
60-class ForumSitemap(Sitemap):
61+from mainpage.sitemaps import SitemapHTTPS
62+
63+
64+class ForumSitemap(SitemapHTTPS):
65 changefreq = 'monthly'
66 priority = 0.5
67
68
69=== modified file 'wiki/sitemap.py'
70--- wiki/sitemap.py 2016-11-04 08:07:18 +0000
71+++ wiki/sitemap.py 2019-07-28 12:21:26 +0000
72@@ -1,8 +1,8 @@
73-from django.contrib.sitemaps import Sitemap
74 from wiki.models import Article
75-
76-
77-class WikiSitemap(Sitemap):
78+from mainpage.sitemaps import SitemapHTTPS
79+
80+
81+class WikiSitemap(SitemapHTTPS):
82 changefreq = 'yearly'
83 priority = 0.5
84
85
86=== modified file 'wlhelp/sitemap.py'
87--- wlhelp/sitemap.py 2016-11-05 15:46:26 +0000
88+++ wlhelp/sitemap.py 2019-07-28 12:21:26 +0000
89@@ -1,8 +1,8 @@
90-from django.contrib.sitemaps import Sitemap
91 from wlhelp.models import Tribe, Building, Ware, Worker
92-
93-
94-class WlHelpTribeSitemap(Sitemap):
95+from mainpage.sitemaps import SitemapHTTPS
96+
97+
98+class WlHelpTribeSitemap(SitemapHTTPS):
99 changefreq = 'yearly'
100 priority = 0.5
101
102@@ -13,7 +13,7 @@
103 return '/encyclopedia/%s' % obj.name
104
105
106-class WlHelpBuildingSitemap(Sitemap):
107+class WlHelpBuildingSitemap(SitemapHTTPS):
108 changefreq = 'yearly'
109 priority = 0.5
110
111@@ -24,7 +24,7 @@
112 return '/encyclopedia/%s/buildings/%s' % (obj.tribe.name, obj.name)
113
114
115-class WlHelpWareSitemap(Sitemap):
116+class WlHelpWareSitemap(SitemapHTTPS):
117 changefreq = 'yearly'
118 priority = 0.5
119
120@@ -35,7 +35,7 @@
121 return '/encyclopedia/%s/wares/%s' % (obj.tribe.name, obj.name)
122
123
124-class WlHelpWorkerSitemap(Sitemap):
125+class WlHelpWorkerSitemap(SitemapHTTPS):
126 changefreq = 'yearly'
127 priority = 0.5
128

Subscribers

People subscribed via source and target branches