добавил поле заголовок в рубрики

This commit is contained in:
Mike0001-droid 2024-05-31 23:04:59 +05:00
parent 168c3df32f
commit dd24f3cde1
4 changed files with 20 additions and 4 deletions

19
.gitignore vendored
View File

@ -1 +1,18 @@
ITRadio/ITRadioBackend/db.sqlite3
ITRadio/ITRadioBackend/db.sqlite3
*.py[cod]
node_modules/
dist/
/conf
var
server/proj/media
server/proj/static/admin
server/proj/static/rest_framework
server/proj/conf/settings/__init__.py
**/migrations/**
!**/migrations
!**/migrations/__init__.py
*.pyc
*.pyo
__pycache__
media/
env/

View File

@ -1,5 +1,3 @@
# Create your views here.
from rest_framework import viewsets
from .models import News

View File

@ -3,5 +3,5 @@ from .models import Rubric
@admin.register(Rubric)
class RubricAdmin(admin.ModelAdmin):
list_display = ('name', 'description')
list_display = ('name', 'title', 'description')

View File

@ -3,6 +3,7 @@ from django.db import models
class Rubric(models.Model):
name = models.CharField(max_length=255)
title = models.CharField(max_length=255)
description = models.TextField()
def __str__(self):