parent
a5f8b9e870
commit
c46c5a96d0
18
src/agenda_culturel/migrations/0006_alter_event_status.py
Normal file
18
src/agenda_culturel/migrations/0006_alter_event_status.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.7 on 2023-12-12 19:10
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('agenda_culturel', '0005_delete_eventsubmissionform'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='event',
|
||||
name='status',
|
||||
field=models.CharField(choices=[('published', 'Published'), ('draft', 'Draft'), ('trash', 'Trash')], default='published', max_length=20, verbose_name='Status'),
|
||||
),
|
||||
]
|
@ -92,8 +92,8 @@ class Event(models.Model):
|
||||
|
||||
class STATUS(models.TextChoices):
|
||||
PUBLISHED = "published", _("Published")
|
||||
TRASH = "trash", _("Trash")
|
||||
DRAFT = "draft", _("Draft")
|
||||
TRASH = "trash", _("Trash")
|
||||
|
||||
created_date = models.DateTimeField(auto_now_add=True)
|
||||
modified_date = models.DateTimeField(auto_now=True)
|
||||
|
@ -316,6 +316,7 @@ def import_from_url(request):
|
||||
|
||||
return render(request, 'agenda_culturel/import.html', context={'form': form })
|
||||
|
||||
|
||||
class EventFilterAdmin(django_filters.FilterSet):
|
||||
status = django_filters.MultipleChoiceFilter(choices=Event.STATUS.choices, widget=forms.CheckboxSelectMultiple)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user