mirror of
https://github.com/narrrl/holy-flavor-rater.git
synced 2026-11-03 16:41:27 +01:00
fixed some warnings in backend
This commit is contained in:
1 parent
a6e946444a
commit
7848ee91f2
4 files changed
+40
-5
No files matched your search
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-18 03:39
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0017_profilecomment'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='category',
|
||||
options={'ordering': ['name'], 'verbose_name_plural': 'Categories'},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,17 @@
|
||||
# Generated by Django 6.0.2 on 2026-02-18 03:42
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('api', '0018_alter_category_options'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='flavor',
|
||||
options={'ordering': ['name']},
|
||||
),
|
||||
]
|
||||
@@ -56,6 +56,7 @@ class Category(models.Model):
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = "Categories"
|
||||
ordering = ['name']
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
@@ -77,6 +78,7 @@ class Flavor(models.Model):
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['name', 'category'], name='unique_flavor_name_per_category')
|
||||
]
|
||||
ordering = ['name']
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.name} ({self.category.name})"
|
||||
|
||||
@@ -97,14 +97,13 @@ DATABASES = {
|
||||
# Cache configuration for Ratelimiting
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
|
||||
'LOCATION': os.path.join(BASE_DIR, 'django_cache'),
|
||||
'BACKEND': 'django.core.cache.backends.db.DatabaseCache',
|
||||
'LOCATION': 'django_ratelimit_cache',
|
||||
}
|
||||
}
|
||||
|
||||
# Silence the ratelimit error for locmem if it appears,
|
||||
# though we just switched to file-based which is supported.
|
||||
SILENCED_SYSTEM_CHECKS = ['django_ratelimit.E003']
|
||||
# Silence ratelimit warnings for non-Redis/Memcached backends
|
||||
SILENCED_SYSTEM_CHECKS = ['django_ratelimit.W001', 'django_ratelimit.E003']
|
||||
|
||||
|
||||
# Password validation
|
||||
|
||||
Reference in new issue
Block a user