diff --git a/minecraftcodex/database/templates/home.html b/minecraftcodex/database/templates/home.html index ffcb355..58c8e3c 100644 --- a/minecraftcodex/database/templates/home.html +++ b/minecraftcodex/database/templates/home.html @@ -8,7 +8,7 @@ It's public in this state so the people can see its progress over time, and send feedback/suggestions to the staff.
-For more details about the project, go to the about section.
+For more details about the project, go to the about section.
Happy minning!
{% endblock %} diff --git a/minecraftcodex/database/templates/layout.html b/minecraftcodex/database/templates/layout.html index 2cf91a7..32f4486 100644 --- a/minecraftcodex/database/templates/layout.html +++ b/minecraftcodex/database/templates/layout.html @@ -13,7 +13,8 @@{{ item.changelog|nl2br }}
+ {% for version in items %} +{{ version.changelog|nl2br }}
+ {% endfor %} {% endblock %} diff --git a/minecraftcodex/database/templates/versions.html b/minecraftcodex/database/templates/versions.html index babd3ce..c938e9d 100644 --- a/minecraftcodex/database/templates/versions.html +++ b/minecraftcodex/database/templates/versions.html @@ -53,7 +53,7 @@ diff --git a/minecraftcodex/database/views.py b/minecraftcodex/database/views.py index c1336f1..e5b2dfa 100644 --- a/minecraftcodex/database/views.py +++ b/minecraftcodex/database/views.py @@ -11,7 +11,8 @@ def home(request): def versions(request): section = 'versions' - versions = Version.objects.filter(snapshot=False).order_by('-date', '-version_number') + versions = Version.objects.filter(snapshot=False).\ + order_by('-date', '-version_number') paginator = Paginator(versions, 50) page_number = 1 @@ -30,12 +31,17 @@ def versions(request): return render_to_response('versions.html', context_instance=context) + def version(request, version, status='release'): section = 'versions' - item = Version.objects.get(status=status, version_number=version) + items = Version.objects.filter(status=status, version_number=version).\ + order_by('-date') data = { + 'version_number': version, + 'status': status, 'section': section, - 'item': item, + 'items': items, + 'results': len(items) } context = RequestContext(request, data) return render_to_response('version.html', context_instance=context) diff --git a/minecraftcodex/herobrine/urls.py b/minecraftcodex/herobrine/urls.py index 8a2f92c..4738cf3 100644 --- a/minecraftcodex/herobrine/urls.py +++ b/minecraftcodex/herobrine/urls.py @@ -16,15 +16,24 @@ urlpatterns = patterns('', # Uncomment the next line to enable the admin: (r'^grappelli/', include('grappelli.urls')), url(r'^management/', include(admin.site.urls)), - url(r'^$', 'database.views.home'), + # Home + url(r'^$', 'database.views.home', name='homepage'), # Static - url(r'^about/', 'database.views.about'), - # Database - url(r'^versions/(?P