2021-03-07 18:15:29 +01:00
|
|
|
from django.shortcuts import render
|
2021-03-12 00:09:19 +01:00
|
|
|
from apps.back.models import Post
|
2021-03-10 23:36:26 +01:00
|
|
|
import uuid
|
2021-03-07 18:15:29 +01:00
|
|
|
|
2021-03-10 23:36:26 +01:00
|
|
|
def all_articles(request):
|
|
|
|
return render(request, 'layouts/main.html', {
|
2021-03-12 00:09:19 +01:00
|
|
|
"CHANNEL": uuid.uuid4().hex[:20].upper(),
|
|
|
|
"posts": Post.objects.all()[:5]
|
2021-03-10 23:36:26 +01:00
|
|
|
})
|