Commit ab911770 authored by Luuk Scholten's avatar Luuk Scholten
Browse files

Make courses visible again

They were not visible, now they are
parent 8ce861b9
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-09 19:24
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('education', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='course',
name='until',
field=models.IntegerField(blank=True, null=True),
),
]
...@@ -59,7 +59,7 @@ class Course(models.Model, metaclass=ModelTranslateMeta): ...@@ -59,7 +59,7 @@ class Course(models.Model, metaclass=ModelTranslateMeta):
since = models.IntegerField() since = models.IntegerField()
until = models.IntegerField( until = models.IntegerField(
blank=True blank=True, null=True
) )
period = models.CharField( period = models.CharField(
......
...@@ -14,7 +14,7 @@ from .models import Category, Course, Exam, Summary ...@@ -14,7 +14,7 @@ from .models import Category, Course, Exam, Summary
def courses(request): def courses(request):
categories = Category.objects.all() categories = Category.objects.all()
objects = Course.objects.order_by('name_' + request.LANGUAGE_CODE).filter( objects = Course.objects.order_by('name_' + request.LANGUAGE_CODE).filter(
until=0) until=None)
return render(request, 'education/courses.html', return render(request, 'education/courses.html',
{'courses': objects, 'categories': categories}) {'courses': objects, 'categories': categories})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment