добавил приложения с настройками сайта

This commit is contained in:
Mike0001-droid 2024-06-05 13:49:46 +05:00
parent 3b500adc17
commit 024f1b3939
11 changed files with 35 additions and 3 deletions

View File

@ -43,7 +43,9 @@ INSTALLED_APPS = [
'loginApi',
'userProfile',
'audio',
'api'
'api',
'account',
'config_site'
]
@ -110,7 +112,7 @@ AUTH_USER_MODEL = 'account.MyUser'
ROTATE_LOG_SIZE = 15 * 1024 * 1024
ROTATE_LOG_COUNT = 10
LOGGING = {
""" LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
@ -159,7 +161,7 @@ LOGGING = {
'propagate': False,
},
},
}
} """
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [

View File

View File

@ -0,0 +1,6 @@
from django.contrib import admin
from .models import ConfigSite
@admin.register(ConfigSite)
class ConfigSiteAdmin(admin.ModelAdmin):
list_display = ('id', 'social_name', 'social_url')

View File

@ -0,0 +1,6 @@
from django.apps import AppConfig
class ConfigSiteConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'config_site'

View File

@ -0,0 +1,12 @@
from django.db import models
class ConfigSite(models.Model):
social_name = models.CharField('Название социальной сети', max_length=100)
social_url = models.CharField('Социальная сеть', max_length=100)
def __str__(self):
return self.social_name
class Meta:
verbose_name = 'Настройки сайта'
verbose_name_plural = 'Настройки сайта'

View File

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

View File

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.