wip
This commit is contained in:
parent
037f28a978
commit
a070b7e97d
@ -25,7 +25,7 @@ from django.template import loader
|
||||
from django.template.defaultfilters import register
|
||||
from django.views import generic
|
||||
|
||||
from .models import Country, Stamp
|
||||
from .models import Country, Stamp, Coin
|
||||
|
||||
|
||||
|
||||
@ -50,16 +50,6 @@ def show_navigation(countrys):
|
||||
return {'countrys': countrys}
|
||||
|
||||
|
||||
@register.filter(name='coins')
|
||||
def coins(country, year):
|
||||
return country['years'][year]
|
||||
|
||||
|
||||
@register.inclusion_tag('coinc/year.html')
|
||||
def show_year(country, year):
|
||||
return { 'year': country['years'][year],
|
||||
'year_int': year }
|
||||
|
||||
|
||||
@register.inclusion_tag('coinc/country.html')
|
||||
def show_country(country):
|
||||
@ -71,7 +61,12 @@ def show_country(country):
|
||||
}
|
||||
|
||||
irregular_stamps = {}
|
||||
stamps = Stamp.objects.filter(country=country.name_iso).values('name_short', 'years')
|
||||
stamps = Stamp.objects.filter(country=country.name_iso).values(
|
||||
'name_short', 'years')
|
||||
coins = Coin.objects.filter(country=country.name_iso).values(
|
||||
'value', 'year', 'stamp', 'name', 'found_by',
|
||||
'found_on', 'buy_only', 'circulation', 'comment',
|
||||
'in_collector', 'checked', 'exists')
|
||||
|
||||
if stamps:
|
||||
temp_stamps = {}
|
||||
@ -110,5 +105,13 @@ def show_country(country):
|
||||
return {'country': c}
|
||||
|
||||
|
||||
|
||||
@register.inclusion_tag('coinc/year.html')
|
||||
def show_year(country, year):
|
||||
return { 'year': country['years'][year],
|
||||
'year_int': year }
|
||||
|
||||
|
||||
# TODO
|
||||
def statistic(request):
|
||||
return HttpResponse('Statistik')
|
||||
|
Loading…
x
Reference in New Issue
Block a user