Example #1
0
def entities_by_year_of_birth(request, year):
    _year = int(year)
    ctx = {"year": _year, "users": sorted(Es.by_year_of_birth(_year), key=lambda x: x.humanName)}
    years = Es.get_years_of_birth()
    if _year + 1 in years:
        ctx["next_year"] = _year + 1
    if _year - 1 in years:
        ctx["previous_year"] = _year - 1
    return render_to_response("leden/entities_by_year_of_birth.html", ctx, context_instance=RequestContext(request))
Example #2
0
def entities_by_year_of_birth(request, year):
    _year = int(year)
    ctx = {'year': _year,
           'users': sorted(Es.by_year_of_birth(_year),
                           key=lambda x: x.humanName)}
    years = Es.get_years_of_birth()
    if _year + 1 in years:
        ctx['next_year'] = _year + 1
    if _year - 1 in years:
        ctx['previous_year'] = _year - 1
    return render(request, 'leden/entities_by_year_of_birth.html', ctx)
Example #3
0
def entities_by_year_of_birth(request, year):
    _year = int(year)
    ctx = {
        'year': _year,
        'users': sorted(Es.by_year_of_birth(_year), key=lambda x: x.humanName)
    }
    years = Es.get_years_of_birth()
    if _year + 1 in years:
        ctx['next_year'] = _year + 1
    if _year - 1 in years:
        ctx['previous_year'] = _year - 1
    return render(request, 'leden/entities_by_year_of_birth.html', ctx)
Example #4
0
def years_of_birth(request):
    return render(request, 'leden/years_of_birth.html',
                  {'years': reversed(Es.get_years_of_birth())})
Example #5
0
def years_of_birth(request):
    return render_to_response('leden/years_of_birth.html', {
                    'years': reversed(Es.get_years_of_birth())},
            context_instance=RequestContext(request))
Example #6
0
def years_of_birth(request):
    return render_to_response('leden/years_of_birth.html', {
                    'years': reversed(Es.get_years_of_birth())},
            context_instance=RequestContext(request))
Example #7
0
def years_of_birth(request):
    return render_to_response(
        "leden/years_of_birth.html",
        {"years": reversed(Es.get_years_of_birth())},
        context_instance=RequestContext(request),
    )
Example #8
0
def years_of_birth(request):
    return render(request, 'leden/years_of_birth.html', {
        'years': reversed(Es.get_years_of_birth())})