добавил приложения с настройками сайта
This commit is contained in:
parent
3b500adc17
commit
024f1b3939
Binary file not shown.
|
|
@ -43,7 +43,9 @@ INSTALLED_APPS = [
|
||||||
'loginApi',
|
'loginApi',
|
||||||
'userProfile',
|
'userProfile',
|
||||||
'audio',
|
'audio',
|
||||||
'api'
|
'api',
|
||||||
|
'account',
|
||||||
|
'config_site'
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -110,7 +112,7 @@ AUTH_USER_MODEL = 'account.MyUser'
|
||||||
ROTATE_LOG_SIZE = 15 * 1024 * 1024
|
ROTATE_LOG_SIZE = 15 * 1024 * 1024
|
||||||
ROTATE_LOG_COUNT = 10
|
ROTATE_LOG_COUNT = 10
|
||||||
|
|
||||||
LOGGING = {
|
""" LOGGING = {
|
||||||
'version': 1,
|
'version': 1,
|
||||||
'disable_existing_loggers': False,
|
'disable_existing_loggers': False,
|
||||||
'formatters': {
|
'formatters': {
|
||||||
|
|
@ -159,7 +161,7 @@ LOGGING = {
|
||||||
'propagate': False,
|
'propagate': False,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
} """
|
||||||
|
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'DEFAULT_PERMISSION_CLASSES': [
|
'DEFAULT_PERMISSION_CLASSES': [
|
||||||
|
|
|
||||||
|
|
@ -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')
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class ConfigSiteConfig(AppConfig):
|
||||||
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
|
name = 'config_site'
|
||||||
|
|
@ -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 = 'Настройки сайта'
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue