Skip to content

Commit

Permalink
refactor app names
Browse files Browse the repository at this point in the history
  • Loading branch information
d2avids committed Aug 9, 2024
1 parent ebf1e59 commit af5de19
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions backend/api/serializers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from rest_framework import serializers

from news.models import News
from tasks.models import Task
from users.models import Region

Expand All @@ -14,3 +15,15 @@ class RegionSerializer(serializers.ModelSerializer):
class Meta:
model = Region
fields = ('id', 'name',)


class ShortNewsSerializer(serializers.ModelSerializer):
class Meta:
model = News
fields = ('id', 'title', 'description', 'image', 'created_at')


class NewsSerializer(serializers.ModelSerializer):
class Meta:
model = News
fields = ('id', 'title', ' description', 'image', 'text', 'created_at')
1 change: 1 addition & 0 deletions backend/tasks/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
class TasksConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'tasks'
verbose_name = 'Задания'
1 change: 1 addition & 0 deletions backend/users/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
class UsersConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'users'
verbose_name = 'Пользователи'

0 comments on commit af5de19

Please sign in to comment.