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

Proposed by kaputtnik
Status: Merged
Merged at revision: 493
Proposed branch: lp:~widelands-dev/widelands-website/fix_django1_11_warnings
Merge into: lp:widelands-website
Diff against target: 112 lines (+19/-16)
4 files modified
online_users_middleware.py (+1/-1)
templates/sphinxdoc/py-modindex.html (+3/-14)
wiki/models.py (+1/-0)
wlhelp/models.py (+14/-1)
To merge this branch: bzr merge lp:~widelands-dev/widelands-website/fix_django1_11_warnings
Reviewer Review Type Date Requested Status
GunChleoc Approve
Review via email: mp+344973@code.launchpad.net

Description of the change

Fix for UnorderedObjectListWarning.

Fixes a server error when accessing modul index in the documentation

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

Looks good :)

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

Thanks :-)

Merged and deployed.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'online_users_middleware.py'
--- online_users_middleware.py 2018-04-11 18:09:25 +0000
+++ online_users_middleware.py 2018-05-02 18:05:52 +0000
@@ -37,7 +37,7 @@
37 online_now_ids = [int(k.replace('online-', '')) for k in fresh]37 online_now_ids = [int(k.replace('online-', '')) for k in fresh]
3838
39 # If the user is authenticated, add their id to the list39 # If the user is authenticated, add their id to the list
40 if request.user.is_authenticated():40 if request.user.is_authenticated:
41 uid = request.user.id41 uid = request.user.id
42 # If their uid is already in the list, we want to bump it42 # If their uid is already in the list, we want to bump it
43 # to the top, so we remove the earlier entry.43 # to the top, so we remove the earlier entry.
4444
=== modified file 'templates/sphinxdoc/py-modindex.html'
--- templates/sphinxdoc/py-modindex.html 2016-08-07 18:35:30 +0000
+++ templates/sphinxdoc/py-modindex.html 2018-05-02 18:05:52 +0000
@@ -2,12 +2,9 @@
22
3{% block doc_body %}3{% block doc_body %}
4 <h1>Module Index</h1>4 <h1>Module Index</h1>
5 {% for index in doc.content.0.items %}5 <dl>
6 <p>index: {{index}}</p>6 {% for c in doc.content %}
7{% endfor %}7 {% for modul, level, fname, mainmod, unknown1, unknown2, descr in c.1 %}
8 <dl>
9 {% for c in doc.content.0 %}
10 {% for modul, level, fname, mainmod, unknown1, unknown2, descr in c %}
11 {% if level < 2 %}8 {% if level < 2 %}
12 <dt><a href="../{{ fname }}">{{ modul }}</a></dt>9 <dt><a href="../{{ fname }}">{{ modul }}</a></dt>
13 <dd>{{ descr }}10 <dd>{{ descr }}
@@ -16,18 +13,10 @@
16 <dt><a href="../{{ fname }}">{{ modul }}</a></dt>13 <dt><a href="../{{ fname }}">{{ modul }}</a></dt>
17 <dd>{{ descr }}</dd>14 <dd>{{ descr }}</dd>
18 </dl>15 </dl>
19
20 {% endif %}16 {% endif %}
21 {% endfor %}17 {% endfor %}
22 </dd>18 </dd>
23 {% endfor %}19 {% endfor %}
24
25 {% comment %}
26 {% for modname, collapse, cgroup, indent, fname, synops, pform, dep in doc.content.0 %}
27 <dt><a href="{{ fname }}"><tt class="literal xref">{{ modname }}</tt></a></dt>
28 <dd>{{ synops }}</dd>
29 {% endfor %}
30 {% endcomment %}
31 </dl>20 </dl>
32 <br />21 <br />
33{% endblock doc_body %}22{% endblock doc_body %}
3423
=== modified file 'wiki/models.py'
--- wiki/models.py 2018-04-08 14:40:17 +0000
+++ wiki/models.py 2018-05-02 18:05:52 +0000
@@ -71,6 +71,7 @@
71 verbose_name_plural = _(u'Articles')71 verbose_name_plural = _(u'Articles')
72 app_label = 'wiki'72 app_label = 'wiki'
73 default_permissions = ('change', 'add',)73 default_permissions = ('change', 'add',)
74 ordering = ['title']
7475
75 def get_absolute_url(self):76 def get_absolute_url(self):
76 if self.group is None:77 if self.group is None:
7778
=== modified file 'wlhelp/models.py'
--- wlhelp/models.py 2018-03-06 17:11:15 +0000
+++ wlhelp/models.py 2018-05-02 18:05:52 +0000
@@ -8,6 +8,10 @@
8 icon_url = models.CharField(max_length=256)8 icon_url = models.CharField(max_length=256)
9 network_pdf_url = models.CharField(max_length=256)9 network_pdf_url = models.CharField(max_length=256)
10 network_gif_url = models.CharField(max_length=256)10 network_gif_url = models.CharField(max_length=256)
11
12 class Meta:
13 ordering = ['name']
14
1115
12 def __unicode__(self):16 def __unicode__(self):
13 return u'%s' % self.name17 return u'%s' % self.name
@@ -30,6 +34,10 @@
30 becomes = models.OneToOneField(34 becomes = models.OneToOneField(
31 'self', related_name='trained_by_experience', blank=True, null=True)35 'self', related_name='trained_by_experience', blank=True, null=True)
3236
37 class Meta:
38 ordering = ['name']
39
40
33 def __unicode__(self):41 def __unicode__(self):
34 return u'%s' % self.name42 return u'%s' % self.name
3543
@@ -46,10 +54,11 @@
46 # This limit shall probably cover the longest help (found 209, nothing54 # This limit shall probably cover the longest help (found 209, nothing
47 # more)55 # more)
48 help = models.TextField(max_length=256)56 help = models.TextField(max_length=256)
49 57
50 class Meta:58 class Meta:
51 ordering = ['name']59 ordering = ['name']
5260
61
53 def __unicode__(self):62 def __unicode__(self):
54 return u'%s' % self.name63 return u'%s' % self.name
5564
@@ -138,6 +147,10 @@
138 Ware, related_name='produced_by_buildings', blank=True)147 Ware, related_name='produced_by_buildings', blank=True)
139 output_workers = models.ManyToManyField(148 output_workers = models.ManyToManyField(
140 Worker, related_name='trained_by_buildings', blank=True)149 Worker, related_name='trained_by_buildings', blank=True)
150
151 class Meta:
152 ordering = ['name']
153
141154
142 def save(self, *args, **kwargs):155 def save(self, *args, **kwargs):
143156

Subscribers

People subscribed via source and target branches