Links are reworked to DB

This commit is contained in:
2022-07-12 16:56:01 +03:00
parent 02b1eb6003
commit ad87a47768
4 changed files with 19 additions and 8 deletions
+4 -1
View File
@@ -1,5 +1,8 @@
from django.shortcuts import render
from .models import Link
def index(request):
return render(request, 'links/index.html')
links = Link.objects.order_by('order')
return render(request, 'links/index.html', {'links': links})