demo-HTML-over-WebSockets-i.../apps/front/views.py
2021-03-21 12:53:47 +01:00

13 lines
347 B
Python

from django.conf import settings
from django.shortcuts import render
from apps.back.models import Post
import uuid
def all_articles(request):
return render(request, 'layouts/main.html', {
"CHANNEL": uuid.uuid4().hex[:20].upper(),
"posts": Post.objects.all()[:3],
"pag": 1,
"DOMAIN": settings.DOMAIN
})