Add Premium feature with UI, model changes, and admin configuration
This commit is contained in:
parent
95111240bc
commit
abe4a1a965
7 changed files with 156 additions and 6 deletions
|
|
@ -1,6 +1,11 @@
|
|||
from django.shortcuts import render
|
||||
from django.shortcuts import render, get_object_or_404
|
||||
from courses.models import Course
|
||||
|
||||
def home(request):
|
||||
courses = Course.objects.order_by('-created_at')[:6]
|
||||
return render(request, 'home.html', {'courses': courses})
|
||||
|
||||
def premium(request, course_id):
|
||||
"""Landing page présentant les avantages du Premium."""
|
||||
course = get_object_or_404(Course, pk=course_id)
|
||||
return render(request, 'premium.html', {'course': course})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue