On trie les lieux de manière plus pratique
This commit is contained in:
parent
6efd6f18c8
commit
9cab07cb6f
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: agenda_culturel\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-11-16 20:14+0100\n"
|
||||
"POT-Creation-Date: 2024-11-17 14:11+0100\n"
|
||||
"PO-Revision-Date: 2023-10-29 14:16+0000\n"
|
||||
"Last-Translator: Jean-Marie Favreau <jeanmarie.favreau@free.fr>\n"
|
||||
"Language-Team: Jean-Marie Favreau <jeanmarie.favreau@free.fr>\n"
|
||||
@ -174,70 +174,70 @@ msgstr "Nouvelles étiquettes"
|
||||
msgid "Create new labels (sparingly)."
|
||||
msgstr "Créer (avec parcimonie) de nouvelles étiquettes."
|
||||
|
||||
#: agenda_culturel/forms.py:241
|
||||
#: agenda_culturel/forms.py:240
|
||||
msgid "JSON in the format expected for the import."
|
||||
msgstr "JSON dans le format attendu pour l'import"
|
||||
|
||||
#: agenda_culturel/forms.py:261
|
||||
#: agenda_culturel/forms.py:260
|
||||
msgid " (locally modified version)"
|
||||
msgstr " (version modifiée localement)"
|
||||
|
||||
#: agenda_culturel/forms.py:265
|
||||
#: agenda_culturel/forms.py:264
|
||||
msgid " (synchronized on import version)"
|
||||
msgstr " (version synchronisée sur l'import)"
|
||||
|
||||
#: agenda_culturel/forms.py:269
|
||||
#: agenda_culturel/forms.py:268
|
||||
msgid "Select {} as representative version."
|
||||
msgstr "Sélectionner {} comme version représentative"
|
||||
|
||||
#: agenda_culturel/forms.py:278
|
||||
#: agenda_culturel/forms.py:277
|
||||
msgid "Update {} using some fields from other versions (interactive mode)."
|
||||
msgstr ""
|
||||
"Mettre à jour {} en utilisant quelques champs des autres versions (mode "
|
||||
"interactif)."
|
||||
|
||||
#: agenda_culturel/forms.py:285
|
||||
#: agenda_culturel/forms.py:284
|
||||
msgid " Warning: a version is already locally modified."
|
||||
msgstr " Attention: une version a déjà été modifiée localement."
|
||||
|
||||
#: agenda_culturel/forms.py:290
|
||||
#: agenda_culturel/forms.py:289
|
||||
msgid "Create a new version by merging (interactive mode)."
|
||||
msgstr "Créer une nouvelle version par fusion (mode interactif)."
|
||||
|
||||
#: agenda_culturel/forms.py:297
|
||||
#: agenda_culturel/forms.py:296
|
||||
msgid "Make {} independent."
|
||||
msgstr "Rendre {} indépendant."
|
||||
|
||||
#: agenda_culturel/forms.py:299
|
||||
#: agenda_culturel/forms.py:298
|
||||
msgid "Make all versions independent."
|
||||
msgstr "Rendre toutes les versions indépendantes."
|
||||
|
||||
#: agenda_culturel/forms.py:354
|
||||
#: agenda_culturel/forms.py:353
|
||||
msgid "Value of the selected version"
|
||||
msgstr "Valeur de la version sélectionnée"
|
||||
|
||||
#: agenda_culturel/forms.py:356 agenda_culturel/forms.py:360
|
||||
#: agenda_culturel/forms.py:355 agenda_culturel/forms.py:359
|
||||
msgid "Value of version {}"
|
||||
msgstr "Valeur de la version {}"
|
||||
|
||||
#: agenda_culturel/forms.py:507
|
||||
#: agenda_culturel/forms.py:506
|
||||
msgid "Apply category {} to the event {}"
|
||||
msgstr "Appliquer la catégorie {} à l'événement {}"
|
||||
|
||||
#: agenda_culturel/forms.py:522 agenda_culturel/models.py:432
|
||||
#: agenda_culturel/forms.py:521 agenda_culturel/models.py:432
|
||||
#: agenda_culturel/models.py:1825
|
||||
msgid "Place"
|
||||
msgstr "Lieu"
|
||||
|
||||
#: agenda_culturel/forms.py:524
|
||||
#: agenda_culturel/forms.py:523
|
||||
msgid "Create a missing place"
|
||||
msgstr "Créer un lieu manquant"
|
||||
|
||||
#: agenda_culturel/forms.py:534
|
||||
#: agenda_culturel/forms.py:533
|
||||
msgid "Add \"{}\" to the aliases of the place"
|
||||
msgstr "Ajouter « {} » aux alias du lieu"
|
||||
|
||||
#: agenda_culturel/forms.py:561
|
||||
#: agenda_culturel/forms.py:560
|
||||
msgid "On saving, use aliases to detect all matching events with missing place"
|
||||
msgstr ""
|
||||
"Lors de l'enregistrement, utiliser des alias pour détecter tous les "
|
||||
@ -377,8 +377,8 @@ msgid "Main"
|
||||
msgstr "Principale"
|
||||
|
||||
#: agenda_culturel/models.py:398
|
||||
msgid "This location is one of the main locations (shown first)."
|
||||
msgstr "Cette position est une position principale (affichée en premier)."
|
||||
msgid "This location is one of the main locations (shown first higher values)."
|
||||
msgstr "Cette position est une position principale (affichage en premier des plus grandes valeurs)."
|
||||
|
||||
#: agenda_culturel/models.py:403
|
||||
msgid "Reference location"
|
||||
@ -894,27 +894,27 @@ msgstr "anglais"
|
||||
msgid "French"
|
||||
msgstr "français"
|
||||
|
||||
#: agenda_culturel/views.py:140
|
||||
#: agenda_culturel/views.py:141
|
||||
msgid "Recurrent import name"
|
||||
msgstr "Nome de l'import récurrent"
|
||||
|
||||
#: agenda_culturel/views.py:141
|
||||
#: agenda_culturel/views.py:142
|
||||
msgid "Add another"
|
||||
msgstr "Ajouter un autre"
|
||||
|
||||
#: agenda_culturel/views.py:142
|
||||
#: agenda_culturel/views.py:143
|
||||
msgid "Browse..."
|
||||
msgstr "Naviguer..."
|
||||
|
||||
#: agenda_culturel/views.py:143
|
||||
#: agenda_culturel/views.py:144
|
||||
msgid "No file selected."
|
||||
msgstr "Pas de fichier sélectionné."
|
||||
|
||||
#: agenda_culturel/views.py:279
|
||||
#: agenda_culturel/views.py:280
|
||||
msgid "The static content has been successfully updated."
|
||||
msgstr "Le contenu statique a été modifié avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:287
|
||||
#: agenda_culturel/views.py:288
|
||||
msgid ""
|
||||
"The event cannot be updated because the import process is not available for "
|
||||
"the referenced sources."
|
||||
@ -922,33 +922,33 @@ msgstr ""
|
||||
"La mise à jour de l'événement n'est pas possible car le processus d'import "
|
||||
"n'est pas disponible pour les sources référencées."
|
||||
|
||||
#: agenda_culturel/views.py:290
|
||||
#: agenda_culturel/views.py:291
|
||||
msgid "The event update has been queued and will be completed shortly."
|
||||
msgstr ""
|
||||
"La mise à jour de l'événement a été mise en attente et sera effectuée sous "
|
||||
"peu."
|
||||
|
||||
#: agenda_culturel/views.py:300
|
||||
#: agenda_culturel/views.py:301
|
||||
msgid "The event has been successfully modified."
|
||||
msgstr "L'événement a été modifié avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:344
|
||||
#: agenda_culturel/views.py:345
|
||||
msgid "The event has been successfully moderated."
|
||||
msgstr "L'événement a été modéré avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:360
|
||||
#: agenda_culturel/views.py:433
|
||||
msgid "The event has been successfully deleted."
|
||||
msgstr "L'événement a été supprimé avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:392
|
||||
#: agenda_culturel/views.py:465
|
||||
msgid "The status has been successfully modified."
|
||||
msgstr "Le status a été modifié avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:428
|
||||
#: agenda_culturel/views.py:501
|
||||
msgid "The event was created: <a href=\"{}\">{}</a>."
|
||||
msgstr "L'événement a été créé: <a href=\"{}\">{}</a>."
|
||||
|
||||
#: agenda_culturel/views.py:430 agenda_culturel/views.py:444
|
||||
#: agenda_culturel/views.py:503 agenda_culturel/views.py:517
|
||||
msgid ""
|
||||
"The event has been submitted and will be published as soon as it has been "
|
||||
"validated by the moderation team."
|
||||
@ -956,82 +956,82 @@ msgstr ""
|
||||
"L'événement a été soumis et sera publié dès qu'il aura été validé par "
|
||||
"l'équipe de modération."
|
||||
|
||||
#: agenda_culturel/views.py:438
|
||||
#: agenda_culturel/views.py:511
|
||||
msgid "The event is saved."
|
||||
msgstr "L'événement est enregistré."
|
||||
|
||||
#: agenda_culturel/views.py:532 agenda_culturel/views.py:584
|
||||
#: agenda_culturel/views.py:605 agenda_culturel/views.py:657
|
||||
msgid "{} has not been submitted since its already known: {}."
|
||||
msgstr "{} n'a pas été soumis car il est déjà connu: {}."
|
||||
|
||||
#: agenda_culturel/views.py:537 agenda_culturel/views.py:590
|
||||
#: agenda_culturel/views.py:610 agenda_culturel/views.py:663
|
||||
msgid ""
|
||||
"{} has not been submitted since its already known and currently into "
|
||||
"moderation process."
|
||||
msgstr "{} n'a pas été soumis car il est déjà connu et en cours de modération"
|
||||
|
||||
#: agenda_culturel/views.py:547
|
||||
#: agenda_culturel/views.py:620
|
||||
msgid "Integrating {} url(s) into our import process."
|
||||
msgstr "Intégration de {} url(s) dans notre processus d'import."
|
||||
|
||||
#: agenda_culturel/views.py:597
|
||||
#: agenda_culturel/views.py:670
|
||||
msgid "Integrating {} into our import process."
|
||||
msgstr "Intégration de {} dans notre processus d'import."
|
||||
|
||||
#: agenda_culturel/views.py:652
|
||||
#: agenda_culturel/views.py:725
|
||||
msgid "Your message has been sent successfully."
|
||||
msgstr "Votre message a été envoyé avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:662
|
||||
#: agenda_culturel/views.py:735
|
||||
msgid "The contact message has been successfully deleted."
|
||||
msgstr "Le message de contact a été supprimé avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:676
|
||||
#: agenda_culturel/views.py:749
|
||||
msgid "The contact message properties has been successfully modified."
|
||||
msgstr "Les propriétés du message de contact ont été modifié avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:813
|
||||
#: agenda_culturel/views.py:886
|
||||
msgid "Spam has been successfully deleted."
|
||||
msgstr "Le spam a été supprimé avec succès"
|
||||
|
||||
#: agenda_culturel/views.py:925
|
||||
#: agenda_culturel/views.py:998
|
||||
msgid "The import has been run successfully."
|
||||
msgstr "L'import a été lancé avec succès"
|
||||
|
||||
#: agenda_culturel/views.py:944
|
||||
#: agenda_culturel/views.py:1017
|
||||
msgid "The import has been canceled."
|
||||
msgstr "L'import a été annulé"
|
||||
|
||||
#: agenda_culturel/views.py:1018
|
||||
#: agenda_culturel/views.py:1091
|
||||
msgid "The recurrent import has been successfully modified."
|
||||
msgstr "L'import récurrent a été modifié avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1027
|
||||
#: agenda_culturel/views.py:1100
|
||||
msgid "The recurrent import has been successfully deleted."
|
||||
msgstr "L'import récurrent a été supprimé avec succès"
|
||||
|
||||
#: agenda_culturel/views.py:1067
|
||||
#: agenda_culturel/views.py:1140
|
||||
msgid "The import has been launched."
|
||||
msgstr "L'import a été lancé"
|
||||
|
||||
#: agenda_culturel/views.py:1089
|
||||
#: agenda_culturel/views.py:1162
|
||||
msgid "Imports has been launched."
|
||||
msgstr "Les imports ont été lancés"
|
||||
|
||||
#: agenda_culturel/views.py:1148
|
||||
#: agenda_culturel/views.py:1221
|
||||
msgid "Update successfully completed."
|
||||
msgstr "Mise à jour réalisée avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1206
|
||||
#: agenda_culturel/views.py:1279
|
||||
msgid "Creation of a merged event has been successfully completed."
|
||||
msgstr "Création d'un événement fusionné réalisée avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1242
|
||||
#: agenda_culturel/views.py:1315
|
||||
msgid "Events have been marked as unduplicated."
|
||||
msgstr "Les événements ont été marqués comme non dupliqués."
|
||||
|
||||
#: agenda_culturel/views.py:1256 agenda_culturel/views.py:1265
|
||||
#: agenda_culturel/views.py:1283
|
||||
#: agenda_culturel/views.py:1329 agenda_culturel/views.py:1338
|
||||
#: agenda_culturel/views.py:1356
|
||||
msgid ""
|
||||
"The selected item is no longer included in the list of duplicates. Someone "
|
||||
"else has probably modified the list in the meantime."
|
||||
@ -1039,23 +1039,23 @@ msgstr ""
|
||||
"L'élément sélectionné ne fait plus partie de la liste des dupliqués. Une "
|
||||
"autre personne a probablement modifié la liste entre temps."
|
||||
|
||||
#: agenda_culturel/views.py:1259
|
||||
#: agenda_culturel/views.py:1332
|
||||
msgid "The selected event has been set as representative"
|
||||
msgstr "L'événement sélectionné a été défini comme representatif."
|
||||
|
||||
#: agenda_culturel/views.py:1274
|
||||
#: agenda_culturel/views.py:1347
|
||||
msgid "The event has been withdrawn from the group and made independent."
|
||||
msgstr "L'événement a été retiré du groupe et rendu indépendant."
|
||||
|
||||
#: agenda_culturel/views.py:1318
|
||||
#: agenda_culturel/views.py:1391
|
||||
msgid "Cleaning up duplicates: {} item(s) fixed."
|
||||
msgstr "Nettoyage des dupliqués: {} élément(s) corrigé(s)."
|
||||
|
||||
#: agenda_culturel/views.py:1367
|
||||
#: agenda_culturel/views.py:1440
|
||||
msgid "The event was successfully duplicated."
|
||||
msgstr "L'événement a été marqué dupliqué avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1375
|
||||
#: agenda_culturel/views.py:1448
|
||||
msgid ""
|
||||
"The event has been successfully flagged as a duplicate. The moderation team "
|
||||
"will deal with your suggestion shortly."
|
||||
@ -1063,32 +1063,32 @@ msgstr ""
|
||||
"L'événement a été signalé comme dupliqué avec succès. Votre suggestion sera "
|
||||
"prochainement prise en charge par l'équipe de modération."
|
||||
|
||||
#: agenda_culturel/views.py:1428
|
||||
#: agenda_culturel/views.py:1501
|
||||
msgid "The categorisation rule has been successfully modified."
|
||||
msgstr "La règle de catégorisation a été modifiée avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1437
|
||||
#: agenda_culturel/views.py:1510
|
||||
msgid "The categorisation rule has been successfully deleted."
|
||||
msgstr "La règle de catégorisation a été supprimée avec succès"
|
||||
|
||||
#: agenda_culturel/views.py:1459
|
||||
#: agenda_culturel/views.py:1532
|
||||
msgid "The rules were successfully applied and 1 event was categorised."
|
||||
msgstr ""
|
||||
"Les règles ont été appliquées avec succès et 1 événement a été catégorisé"
|
||||
|
||||
#: agenda_culturel/views.py:1466
|
||||
#: agenda_culturel/views.py:1539
|
||||
msgid "The rules were successfully applied and {} events were categorised."
|
||||
msgstr ""
|
||||
"Les règles ont été appliquées avec succès et {} événements ont été "
|
||||
"catégorisés"
|
||||
|
||||
#: agenda_culturel/views.py:1473 agenda_culturel/views.py:1526
|
||||
#: agenda_culturel/views.py:1546 agenda_culturel/views.py:1599
|
||||
msgid "The rules were successfully applied and no events were categorised."
|
||||
msgstr ""
|
||||
"Les règles ont été appliquées avec succès et aucun événement n'a été "
|
||||
"catégorisé"
|
||||
|
||||
#: agenda_culturel/views.py:1512
|
||||
#: agenda_culturel/views.py:1585
|
||||
msgid ""
|
||||
"The rules were successfully applied and 1 event with default category was "
|
||||
"categorised."
|
||||
@ -1096,7 +1096,7 @@ msgstr ""
|
||||
"Les règles ont été appliquées avec succès et 1 événement avec catégorie par "
|
||||
"défaut a été catégorisé"
|
||||
|
||||
#: agenda_culturel/views.py:1519
|
||||
#: agenda_culturel/views.py:1592
|
||||
msgid ""
|
||||
"The rules were successfully applied and {} events with default category were "
|
||||
"categorised."
|
||||
@ -1104,41 +1104,41 @@ msgstr ""
|
||||
"Les règles ont été appliquées avec succès et {} événements avec catégorie "
|
||||
"par défaut ont été catégorisés"
|
||||
|
||||
#: agenda_culturel/views.py:1608 agenda_culturel/views.py:1670
|
||||
#: agenda_culturel/views.py:1708
|
||||
#: agenda_culturel/views.py:1681 agenda_culturel/views.py:1743
|
||||
#: agenda_culturel/views.py:1781
|
||||
msgid "{} events have been updated."
|
||||
msgstr "{} événements ont été mis à jour."
|
||||
|
||||
#: agenda_culturel/views.py:1611 agenda_culturel/views.py:1672
|
||||
#: agenda_culturel/views.py:1711
|
||||
#: agenda_culturel/views.py:1684 agenda_culturel/views.py:1745
|
||||
#: agenda_culturel/views.py:1784
|
||||
msgid "1 event has been updated."
|
||||
msgstr "1 événement a été mis à jour"
|
||||
|
||||
#: agenda_culturel/views.py:1613 agenda_culturel/views.py:1674
|
||||
#: agenda_culturel/views.py:1713
|
||||
#: agenda_culturel/views.py:1686 agenda_culturel/views.py:1747
|
||||
#: agenda_culturel/views.py:1786
|
||||
msgid "No events have been modified."
|
||||
msgstr "Aucun événement n'a été modifié."
|
||||
|
||||
#: agenda_culturel/views.py:1622
|
||||
#: agenda_culturel/views.py:1695
|
||||
msgid "The place has been successfully updated."
|
||||
msgstr "Le lieu a été modifié avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1631
|
||||
#: agenda_culturel/views.py:1704
|
||||
msgid "The place has been successfully created."
|
||||
msgstr "Le lieu a été créé avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1696
|
||||
#: agenda_culturel/views.py:1769
|
||||
msgid "The selected place has been assigned to the event."
|
||||
msgstr "Le lieu sélectionné a été assigné à l'événement."
|
||||
|
||||
#: agenda_culturel/views.py:1700
|
||||
#: agenda_culturel/views.py:1773
|
||||
msgid "A new alias has been added to the selected place."
|
||||
msgstr "Un nouvel alias a été créé pour le lieu sélectionné."
|
||||
|
||||
#: agenda_culturel/views.py:1756
|
||||
#: agenda_culturel/views.py:1829
|
||||
msgid "The tag has been successfully updated."
|
||||
msgstr "L'étiquette a été modifiée avec succès."
|
||||
|
||||
#: agenda_culturel/views.py:1763
|
||||
#: agenda_culturel/views.py:1836
|
||||
msgid "The tag has been successfully created."
|
||||
msgstr "L'étiquette a été créée avec succès."
|
||||
|
@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.9 on 2024-11-17 12:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('agenda_culturel', '0110_tag_in_excluded_suggestions_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='referencelocation',
|
||||
name='main',
|
||||
field=models.IntegerField(default=0, help_text='This location is one of the main locations (shown first higher values).', verbose_name='Main'),
|
||||
),
|
||||
]
|
@ -393,10 +393,10 @@ class DuplicatedEvents(models.Model):
|
||||
class ReferenceLocation(models.Model):
|
||||
name = models.CharField(verbose_name=_("Name"), help_text=_("Name of the location"), unique=True, null=False)
|
||||
location = LocationField(based_fields=["name"], zoom=12, default=Point(3.08333, 45.783329), srid=4326)
|
||||
main = models.BooleanField(
|
||||
main = models.IntegerField(
|
||||
verbose_name=_("Main"),
|
||||
help_text=_("This location is one of the main locations (shown first)."),
|
||||
default=False,
|
||||
help_text=_("This location is one of the main locations (shown first higher values)."),
|
||||
default=0,
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
@ -91,7 +91,12 @@
|
||||
};
|
||||
|
||||
const position = document.querySelector('#id_position');
|
||||
const choices_position = new Choices(position);
|
||||
const choices_position = new Choices(position,
|
||||
{
|
||||
shouldSort: false,
|
||||
|
||||
}
|
||||
);
|
||||
const tags = document.querySelector('#id_tags');
|
||||
const choices_tags = new Choices(tags,
|
||||
{
|
||||
|
@ -288,7 +288,7 @@
|
||||
},
|
||||
{
|
||||
"com_name": "Clermont-Ferrand",
|
||||
"main": true,
|
||||
"main": 10,
|
||||
"geo_point_2d": {
|
||||
"lon": 3.1153994509459313,
|
||||
"lat": 45.78590931605406
|
||||
@ -338,7 +338,7 @@
|
||||
},
|
||||
{
|
||||
"com_name": "Riom",
|
||||
"main": true,
|
||||
"main": 3,
|
||||
"geo_point_2d": {
|
||||
"lon": 3.13259085594027,
|
||||
"lat": 45.89435053196184
|
||||
@ -514,7 +514,7 @@
|
||||
},
|
||||
{
|
||||
"com_name": "Chamali\u00e8res",
|
||||
"main": true,
|
||||
"main": 3,
|
||||
"geo_point_2d": {
|
||||
"lon": 3.061838298868612,
|
||||
"lat": 45.77475946884152
|
||||
@ -1880,7 +1880,7 @@
|
||||
},
|
||||
{
|
||||
"com_name": "Ambert",
|
||||
"main": true,
|
||||
"main": 5,
|
||||
"geo_point_2d": {
|
||||
"lon": 3.7568846508345506,
|
||||
"lat": 45.55567832104365
|
||||
@ -1944,7 +1944,7 @@
|
||||
},
|
||||
{
|
||||
"com_name": "Pont-du-Ch\u00e2teau",
|
||||
"main": true,
|
||||
"main": 3,
|
||||
"geo_point_2d": {
|
||||
"lon": 3.2398679745448864,
|
||||
"lat": 45.79820943869307
|
||||
@ -2022,7 +2022,7 @@
|
||||
},
|
||||
{
|
||||
"com_name": "Issoire",
|
||||
"main": true,
|
||||
"main": 4,
|
||||
"geo_point_2d": {
|
||||
"lon": 3.244722971565402,
|
||||
"lat": 45.54551546108481
|
||||
@ -2261,7 +2261,7 @@
|
||||
},
|
||||
{
|
||||
"com_name": "Cournon-d'Auvergne",
|
||||
"main": true,
|
||||
"main": 3,
|
||||
"geo_point_2d": {
|
||||
"lon": 3.1863969000308425,
|
||||
"lat": 45.74302062249931
|
||||
@ -2409,7 +2409,7 @@
|
||||
},
|
||||
{
|
||||
"com_name": "Volvic",
|
||||
"main": true,
|
||||
"main": 4,
|
||||
"geo_point_2d": {
|
||||
"lon": 3.018666916678083,
|
||||
"lat": 45.86824389003399
|
||||
@ -2543,7 +2543,7 @@
|
||||
},
|
||||
{
|
||||
"com_name": "Thiers",
|
||||
"main": true,
|
||||
"main": 7,
|
||||
"geo_point_2d": {
|
||||
"lon": 3.539565856379042,
|
||||
"lat": 45.861856205367744
|
||||
|
@ -10,7 +10,10 @@ def run():
|
||||
with open(input_file, 'r') as file:
|
||||
data = json.load(file)
|
||||
|
||||
objs = [ReferenceLocation(location=Point(c["geo_point_2d"]["lon"], c["geo_point_2d"]["lat"]), name=c["com_name"], main="main" in c) for c in data]
|
||||
# remove all locations
|
||||
ReferenceLocation.objects.all().delete()
|
||||
|
||||
objs = [ReferenceLocation(location=Point(c["geo_point_2d"]["lon"], c["geo_point_2d"]["lat"]), name=c["com_name"], main=c["main"] if "main" in c else 0) for c in data]
|
||||
|
||||
objs = ReferenceLocation.objects.bulk_create(objs, ignore_conflicts=True)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user