Photomat -> Fotomat
This commit is contained in:
@@ -105,8 +105,8 @@ def run_recurrent_import(self, pk):
|
||||
extractor = LaCoopeExtractor()
|
||||
elif rimport.processor == RecurrentImport.PROCESSOR.LACOMEDIE:
|
||||
extractor = LaComedieExtractor()
|
||||
elif rimport.processor == RecurrentImport.PROCESSOR.LEPHOTOMAT:
|
||||
extractor = LePhotomatExtractor()
|
||||
elif rimport.processor == RecurrentImport.PROCESSOR.LEFOTOMAT:
|
||||
extractor = LeFotomatExtractor()
|
||||
else:
|
||||
extractor = None
|
||||
|
||||
|
@@ -130,13 +130,13 @@ class LaComedieExtractor(TwoStepsExtractor):
|
||||
|
||||
|
||||
|
||||
# A class dedicated to get events from Le Photomat'
|
||||
# A class dedicated to get events from Le Fotomat'
|
||||
# URL: https://www.lefotomat.com/
|
||||
class LePhotomatExtractor(TwoStepsExtractor):
|
||||
class LeFotomatExtractor(TwoStepsExtractor):
|
||||
|
||||
nom_lieu = "Le Photomat'"
|
||||
nom_lieu = "Le Fotomat'"
|
||||
|
||||
def category_photomat2agenda(self, category):
|
||||
def category_fotomat2agenda(self, category):
|
||||
if not category:
|
||||
return None
|
||||
mapping = { "Concerts": "Concert"}
|
||||
@@ -157,7 +157,7 @@ class LePhotomatExtractor(TwoStepsExtractor):
|
||||
title = e.find("title").contents[0]
|
||||
self.add_event_title(e_url, title)
|
||||
|
||||
category = self.category_photomat2agenda(e.find("category").contents[0])
|
||||
category = self.category_fotomat2agenda(e.find("category").contents[0])
|
||||
if category:
|
||||
self.add_event_category(e_url, category)
|
||||
|
||||
|
13
src/agenda_culturel/migrations/0052_auto_20240420_1353.py
Normal file
13
src/agenda_culturel/migrations/0052_auto_20240420_1353.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# Generated by Django 4.2.7 on 2024-04-20 11:53
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('agenda_culturel', '0051_alter_recurrentimport_processor'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
]
|
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.7 on 2024-04-20 11:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('agenda_culturel', '0052_auto_20240420_1353'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='recurrentimport',
|
||||
name='processor',
|
||||
field=models.CharField(choices=[('ical', 'ical'), ('icalnobusy', 'ical no busy'), ('icalnovc', 'ical no VC'), ('lacoope', 'lacoope.org'), ('lacomedie', 'la comédie'), ('lefotomat', 'le fotomat')], default='ical', max_length=20, verbose_name='Processor'),
|
||||
),
|
||||
]
|
@@ -759,7 +759,7 @@ class RecurrentImport(models.Model):
|
||||
ICALNOVC = "icalnovc", _("ical no VC")
|
||||
LACOOPE = "lacoope", _('lacoope.org')
|
||||
LACOMEDIE = "lacomedie", _('la comédie')
|
||||
LEPHOTOMAT = "lephotomat", _('le photomat')
|
||||
LEFOTOMAT = "lefotomat", _('le fotomat')
|
||||
|
||||
class DOWNLOADER(models.TextChoices):
|
||||
SIMPLE = "simple", _("simple")
|
||||
|
Reference in New Issue
Block a user