backend
apps
requirements
django_app_name
settings.py
urls.py
wsgi.py
manage.py
frontend
node_modules
public
src
package-lock.json
package.json
form = ContainerForm(user=request.user)
def sait(request):
return render(request, 'templates/sait.sait.html', locals())
def sait(request):
return render(request, 'sait/sait.html')
# models.py
from django.db import models
from django.contrib.auth.models import User
# Модель новости
class News(models.Model)
title = models.CharField(max_length=250, verbose_name='Заголовок')
text = models.TextField(verbose_name='Текст новости')
user = models.ForeignKey(User, verbose_name='Автор')