Edit models and create list view
This commit is contained in:
+15
-1
@@ -8,7 +8,7 @@ from django.http import HttpResponse, HttpResponseRedirect
|
||||
from django.contrib.auth.decorators import permission_required, login_required
|
||||
from django.conf import settings
|
||||
import logging
|
||||
from webapp.models import OhlhafvChallenge
|
||||
from webapp.models import OhlhafvChallenge, KaehmyForm
|
||||
from webapp.forms import OhlhafvForm
|
||||
from webapp.tables import OhlhafvTable
|
||||
|
||||
@@ -146,3 +146,17 @@ def ohlhafv_list(request, *args, **kwargs):
|
||||
'challenge_count': len(challenges),
|
||||
}
|
||||
return render(request, 'ohlhafv_list.html', context)
|
||||
|
||||
|
||||
@ensure_csrf_cookie
|
||||
@require_http_methods(["GET"])
|
||||
def kaehmy_list_view(request, *args, **kwargs):
|
||||
"""Kaehmy application list"""
|
||||
|
||||
applications = KaehmyForm.objects.all()
|
||||
|
||||
context = {
|
||||
'applications': applications,
|
||||
'application_count': len(applications)
|
||||
}
|
||||
return render(request, 'kaehmy_list.html', context)
|
||||
|
||||
Reference in New Issue
Block a user