перенос на прод

This commit is contained in:
root 2024-06-19 15:12:56 +03:00
parent 6680fd8792
commit ab0376671e
50 changed files with 38 additions and 220 deletions

View File

@ -1,26 +0,0 @@
# Generated by Django 5.0.4 on 2024-04-21 17:43
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='NowPlayingSong',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=255)),
('artist', models.CharField(max_length=255)),
('album', models.CharField(blank=True, max_length=255, null=True)),
('genre', models.CharField(blank=True, max_length=100, null=True)),
('art_url', models.URLField(blank=True, null=True)),
('duration', models.IntegerField()),
],
),
]

View File

@ -1,17 +0,0 @@
# Generated by Django 5.0.4 on 2024-04-21 18:13
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.RemoveField(
model_name='nowplayingsong',
name='duration',
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 5.0.4 on 2024-04-21 18:51
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0002_remove_nowplayingsong_duration'),
]
operations = [
migrations.RenameField(
model_name='nowplayingsong',
old_name='art_url',
new_name='art',
),
]

View File

@ -1,16 +0,0 @@
# Generated by Django 5.0.4 on 2024-04-24 14:17
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0003_rename_art_url_nowplayingsong_art'),
]
operations = [
migrations.DeleteModel(
name='NowPlayingSong',
),
]

View File

@ -1,5 +1,5 @@
from .development import *
from .production import *

View File

@ -33,12 +33,12 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'corsheaders',
'rest_framework_simplejwt',
'rest_framework.authtoken',
'news',
'rubricks',
'loginApi',
@ -47,7 +47,7 @@ INSTALLED_APPS = [
'api',
'account',
'config_site'
]
MIDDLEWARE = [
@ -132,38 +132,7 @@ LOGGING = {
'style': '{',
},
},
'handlers': {
'update_history': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': LOG_ROOT / 'update_history.log',
'formatter': 'extended',
'maxBytes': ROTATE_LOG_SIZE,
'backupCount': ROTATE_LOG_COUNT,
},
'upload_media': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': LOG_ROOT / 'upload_media.log',
'formatter': 'extended',
'maxBytes': ROTATE_LOG_SIZE,
'backupCount': ROTATE_LOG_COUNT,
},
},
'loggers': {
'update_history': {
'handlers': ['update_history', ],
'level': 'INFO',
'propagate': False,
},
'upload_media': {
'handlers': ['upload_media', ],
'level': 'INFO',
'propagate': False,
},
},
}
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'

View File

@ -6,7 +6,7 @@ ALLOWED_HOSTS = ['*']
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
""" DATABASES = {
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'it_radio',
@ -15,12 +15,6 @@ ALLOWED_HOSTS = ['*']
'HOST': 'localhost',
'PORT': '5433',
},
} """
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': BASE_DIR / 'db.sqlite3',
}
}
REST_FRAMEWORK['DEFAULT_PERMISSION_CLASSES'] = ('rest_framework.permissions.AllowAny',)

View File

@ -2,19 +2,20 @@ import sys
from .base import *
DEBUG = False
ALLOWED_HOSTS = ['*']
ALLOWED_HOSTS = ['82.97.242.49']
# Database
# https://docs.djangoproject.com/en/3.2/ref/settings/#databases
""" DATABASES = {
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'ldirect',
'USER': 'flexites',
'PASSWORD': 'flexites',
'NAME': 'itradio',
'USER': 'postgres',
'PASSWORD': '55667788Vxod',
'HOST': 'localhost',
'PORT': '5432',
},
} """
}
if len(sys.argv) >= 2 and sys.argv[1] != 'runserver':
from conf.sentry import sentry_start, SENTRY_CONFIG

View File

@ -1,5 +1,6 @@
# Generated by Django 5.0.4 on 2024-04-16 15:16
# Generated by Django 5.0.6 on 2024-06-19 12:09
import django.utils.timezone
from django.db import migrations, models
@ -12,13 +13,11 @@ class Migration(migrations.Migration):
operations = [
migrations.CreateModel(
name='News',
name='HistoryRadio',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=255)),
('description', models.TextField()),
('date', models.DateTimeField()),
('author', models.CharField(max_length=255)),
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('description', models.CharField(max_length=50, verbose_name='Описание события кратко')),
('date', models.DateField(default=django.utils.timezone.now, null=True, verbose_name='Дата события')),
],
),
]

View File

@ -1,23 +0,0 @@
# Generated by Django 5.0.4 on 2024-04-16 15:47
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('news', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='news',
name='author',
field=models.CharField(blank=True, max_length=255),
),
migrations.AlterField(
model_name='news',
name='date',
field=models.DateTimeField(blank=True),
),
]

View File

@ -1,4 +1,4 @@
# Generated by Django 5.0.4 on 2024-04-16 15:16
# Generated by Django 5.0.6 on 2024-06-19 12:09
from django.db import migrations, models
@ -14,10 +14,15 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Rubric',
fields=[
('id', models.BigAutoField(primary_key=True, serialize=False)),
('name', models.CharField(max_length=255)),
('description', models.TextField()),
('time', models.DateTimeField()),
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255, verbose_name='Название рубрики')),
('title', models.TextField(default='Null', max_length=1000, null=True, verbose_name='Заголовок рубрики')),
('description', models.TextField(max_length=1000, verbose_name='Описание рубрики')),
('img', models.ImageField(blank=True, null=True, upload_to='images/', verbose_name='Изображение рубрики')),
],
options={
'verbose_name': 'Рубрики',
'verbose_name_plural': 'Рубрики',
},
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 5.0.4 on 2024-04-16 16:10
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('rubricks', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='rubric',
name='time',
field=models.DateTimeField(blank=True),
),
]

View File

@ -1,17 +0,0 @@
# Generated by Django 5.0.4 on 2024-05-06 19:19
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('rubricks', '0002_alter_rubric_time'),
]
operations = [
migrations.RemoveField(
model_name='rubric',
name='time',
),
]

View File

@ -1,7 +1,5 @@
# Generated by Django 5.0.4 on 2024-04-25 14:58
# Generated by Django 5.0.6 on 2024-06-19 12:09
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
@ -10,16 +8,21 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Profile',
name='Team',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('likedSongs', models.JSONField(default=list)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('name', models.CharField(max_length=50, verbose_name='Имя участника')),
('last_name', models.CharField(max_length=50, verbose_name='Фамилия участника')),
('position', models.CharField(max_length=50, verbose_name='Должность участинка')),
('img_person', models.ImageField(blank=True, null=True, upload_to='team_images/', verbose_name='Изображение участника')),
],
options={
'verbose_name': 'Команда',
'verbose_name_plural': 'Команда',
},
),
]

View File

@ -1,18 +0,0 @@
# Generated by Django 5.0.4 on 2024-05-06 19:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('userProfile', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='profile',
name='likedSongs',
field=models.JSONField(blank=True, null=True),
),
]