parent
33983afeca
commit
571a6775c4
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 4.2.9 on 2025-03-01 13:04
|
||||||
|
|
||||||
|
from django.db import migrations
|
||||||
|
import django_resized.forms
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('agenda_culturel', '0149_alter_recurrentimport_processor'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='event',
|
||||||
|
name='local_image',
|
||||||
|
field=django_resized.forms.ResizedImageField(blank=True, crop=None, force_format='JPEG', keep_meta=True, max_length=1024, null=True, quality=75, scale=0.5, size=[900, None], upload_to='', verbose_name='Illustration'),
|
||||||
|
),
|
||||||
|
]
|
@ -18,6 +18,7 @@ from django.contrib.sites.models import Site
|
|||||||
from django.core.mail import send_mail
|
from django.core.mail import send_mail
|
||||||
from django.template.loader import render_to_string
|
from django.template.loader import render_to_string
|
||||||
from autoslug import AutoSlugField
|
from autoslug import AutoSlugField
|
||||||
|
from django_resized import ResizedImageField
|
||||||
|
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
@ -718,7 +719,8 @@ class Event(models.Model):
|
|||||||
blank=True
|
blank=True
|
||||||
)
|
)
|
||||||
|
|
||||||
local_image = models.ImageField(
|
local_image = ResizedImageField(
|
||||||
|
size=[900, None],
|
||||||
verbose_name=_("Illustration"),
|
verbose_name=_("Illustration"),
|
||||||
max_length=1024,
|
max_length=1024,
|
||||||
blank=True,
|
blank=True,
|
||||||
|
@ -313,3 +313,12 @@ DEBUG_TOOLBAR_PANELS = [
|
|||||||
'debug_toolbar.panels.profiling.ProfilingPanel',
|
'debug_toolbar.panels.profiling.ProfilingPanel',
|
||||||
"template_profiler_panel.panels.template.TemplateProfilerPanel",
|
"template_profiler_panel.panels.template.TemplateProfilerPanel",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
DJANGORESIZED_DEFAULT_SIZE = [1200, 1200]
|
||||||
|
DJANGORESIZED_DEFAULT_SCALE = 0.5
|
||||||
|
DJANGORESIZED_DEFAULT_QUALITY = 75
|
||||||
|
DJANGORESIZED_DEFAULT_KEEP_META = True
|
||||||
|
DJANGORESIZED_DEFAULT_FORCE_FORMAT = 'JPEG'
|
||||||
|
DJANGORESIZED_DEFAULT_FORMAT_EXTENSIONS = {'JPEG': ".jpg"}
|
||||||
|
DJANGORESIZED_DEFAULT_NORMALIZE_ROTATION = True
|
@ -48,4 +48,5 @@ django-autoslug==1.9.9
|
|||||||
django-debug-toolbar-template-profiler==2.1.0
|
django-debug-toolbar-template-profiler==2.1.0
|
||||||
requests==2.32.3
|
requests==2.32.3
|
||||||
django-cleanup==9.0.0
|
django-cleanup==9.0.0
|
||||||
django-unused-media==0.2.2
|
django-unused-media==0.2.2
|
||||||
|
django-resized==1.0.3
|
Loading…
x
Reference in New Issue
Block a user