Challenge preview on front page

This commit is contained in:
teras
2017-10-08 12:04:01 +03:00
parent 140878df57
commit f08449d71a
3 changed files with 20 additions and 50 deletions

View File

@@ -8,7 +8,10 @@ from .models import *
def index(request):
if request.method == 'GET':
return render(request, 'index.html')
data = {
'challenges': Challenge.objects.all()
}
return render(request, 'index.html', data)
@csrf_protect