fix archive style
This commit is contained in:
parent
c2988c0b2f
commit
acf4764ca0
3 changed files with 8 additions and 3 deletions
|
@ -43,7 +43,7 @@ def index(request):
|
|||
return render(request, 'index.html', context)
|
||||
|
||||
|
||||
def archive(request):
|
||||
def archive(request, week=None):
|
||||
context = default_context(request)
|
||||
qs = models.Item.public()
|
||||
week, archive = models.Item.public()
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
{% block content %}
|
||||
<div class="index">
|
||||
{% for item in items %}
|
||||
{% ifchanged item.week %}
|
||||
<h2>{{ item.year }} week {{ item.week }}</h2>
|
||||
{% endifchanged %}
|
||||
{% include "listitem.html" with item=item %}
|
||||
{% endfor %}
|
||||
{% if archive %}
|
||||
<div class="archive">
|
||||
<a href="{{ archive }}">previous weeks</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
<title>{{ settings.SITENAME }}</title>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<style>
|
||||
</style>
|
||||
<div class="index">
|
||||
{% for item in items %}
|
||||
{% include "listitem.html" with item=item %}
|
||||
|
|
Loading…
Reference in a new issue