widelands-dev team mailing list archive
-
widelands-dev team
-
Mailing list archive
-
Message #08047
[Merge] lp:~widelands-dev/widelands-website/fix_sphinx_index_links into lp:widelands-website
kaputtnik has proposed merging lp:~widelands-dev/widelands-website/fix_sphinx_index_links into lp:widelands-website.
Requested reviews:
Widelands Developers (widelands-dev)
For more details, see:
https://code.launchpad.net/~widelands-dev/widelands-website/fix_sphinx_index_links/+merge/302225
- Fixes the links in https://wl.widelands.org/docs/wl/genindex/
- List some things in https://wl.widelands.org/docs/wl/py-modindex/ This is not really working, but at least the single entry and subentrys are shown as in the html output (make html)
--
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands-website/fix_sphinx_index_links into lp:widelands-website.
=== modified file 'mainpage/views.py'
--- mainpage/views.py 2016-07-28 18:32:17 +0000
+++ mainpage/views.py 2016-08-07 18:45:58 +0000
@@ -72,9 +72,9 @@
new_user.save()
reg_user = User.objects.get(username=new_user)
# Creating a wlprofile
- ext_profile = Profile(user=reg_user)
+ ext_profile = Profile(user=reg_user)
ext_profile.save()
- # Creating a ggzprofile
+ # Creating a ggzprofile
ggz_profile = GGZAuth(user=reg_user)
ggz_profile.save()
=== modified file 'templates/sphinxdoc/genindex.html'
--- templates/sphinxdoc/genindex.html 2010-01-22 15:21:32 +0000
+++ templates/sphinxdoc/genindex.html 2016-08-07 18:45:58 +0000
@@ -16,7 +16,7 @@
<dt>
{# contents.0 is a list of links for the item #}
{% if contents.0 %}
- <a href="{{ contents.0.0 }}">{{ name }}</a>
+ <a href="{{ contents.0.0.1 }}">{{ name }}</a>
{% else %}
{{ name }}
{% endif %}
@@ -25,7 +25,7 @@
{% if contents.1 %}
{% for subname, sublinks in contents.1 %}
<dd>
- <a href="{{ sublinks.0 }}">{{ subname }}</a>
+ <a href="{{ sublinks.0.1 }}">{{ subname }}</a>
{% for link in sublinks|slice:"1:" %}, <a href="{{ link }}">[Link]</a>{% endfor %}
</dd>
{% endfor %}
=== renamed file 'templates/sphinxdoc/modindex.html' => 'templates/sphinxdoc/py-modindex.html'
--- templates/sphinxdoc/modindex.html 2010-01-22 15:21:32 +0000
+++ templates/sphinxdoc/py-modindex.html 2016-08-07 18:45:58 +0000
@@ -2,11 +2,32 @@
{% block doc_body %}
<h1>Module Index</h1>
+ {% for index in doc.content.0.items %}
+ <p>index: {{index}}</p>
+{% endfor %}
<dl>
- {% for modname, collapse, cgroup, indent, fname, synops, pform, dep in doc.modindexentries %}
+ {% for c in doc.content.0 %}
+ {% for modul, level, fname, mainmod, unknown1, unknown2, descr in c %}
+ {% if level < 2 %}
+ <dt><a href="../{{ fname }}">{{ modul }}</a></dt>
+ <dd>{{ descr }}
+ {% else %}
+ <dl>
+ <dt><a href="../{{ fname }}">{{ modul }}</a></dt>
+ <dd>{{ descr }}</dd>
+ </dl>
+
+ {% endif %}
+ {% endfor %}
+ </dd>
+ {% endfor %}
+
+ {% comment %}
+ {% for modname, collapse, cgroup, indent, fname, synops, pform, dep in doc.content.0 %}
<dt><a href="{{ fname }}"><tt class="literal xref">{{ modname }}</tt></a></dt>
<dd>{{ synops }}</dd>
{% endfor %}
+ {% endcomment %}
</dl>
<br />
{% endblock doc_body %}
Follow ups