localcosmos-server 0.24.8__py3-none-any.whl → 0.24.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- localcosmos_server/api/serializers.py +7 -1
- localcosmos_server/template_content/api/serializers.py +3 -3
- localcosmos_server/template_content/migrations/0004_localizedtemplatecontent_author_and_more.py +23 -0
- {localcosmos_server-0.24.8.dist-info → localcosmos_server-0.24.9.dist-info}/METADATA +1 -1
- {localcosmos_server-0.24.8.dist-info → localcosmos_server-0.24.9.dist-info}/RECORD +8 -7
- {localcosmos_server-0.24.8.dist-info → localcosmos_server-0.24.9.dist-info}/WHEEL +0 -0
- {localcosmos_server-0.24.8.dist-info → localcosmos_server-0.24.9.dist-info}/licenses/LICENCE +0 -0
- {localcosmos_server-0.24.8.dist-info → localcosmos_server-0.24.9.dist-info}/top_level.txt +0 -0
|
@@ -335,9 +335,13 @@ class TaxonRelationshipTaxonSerializer(serializers.Serializer):
|
|
|
335
335
|
taxonAuthor = serializers.CharField(read_only=True)
|
|
336
336
|
nameUuid = serializers.CharField(read_only=True)
|
|
337
337
|
taxonNuid = serializers.CharField(read_only=True)
|
|
338
|
+
slug = serializers.CharField(read_only=True)
|
|
339
|
+
localizedSlug = serializers.DictField(child=serializers.CharField(read_only=True), read_only=True)
|
|
340
|
+
gbifNubkey = serializers.IntegerField(read_only=True, allow_null=True)
|
|
338
341
|
image = ImageSerializer(read_only=True)
|
|
339
342
|
vernacular = serializers.DictField(child=serializers.CharField(read_only=True), read_only=True)
|
|
340
343
|
hasTaxonProfile = serializers.BooleanField(read_only=True)
|
|
344
|
+
shortProfile = serializers.CharField(allow_null=True, required=False, read_only=True)
|
|
341
345
|
taxonProfileId = serializers.IntegerField(read_only=True, allow_null=True)
|
|
342
346
|
|
|
343
347
|
def __init__(self, *args, app=None, **kwargs):
|
|
@@ -354,7 +358,7 @@ class TaxonRelationshipTaxonSerializer(serializers.Serializer):
|
|
|
354
358
|
if localized_taxon_profiles_path:
|
|
355
359
|
root = self.app.get_installed_app_path('published')
|
|
356
360
|
taxon_profile_path = os.path.join(root, localized_taxon_profiles_path.lstrip('/'), instance['taxonSource'], instance['nameUuid'] + '.json')
|
|
357
|
-
|
|
361
|
+
|
|
358
362
|
if os.path.isfile(taxon_profile_path):
|
|
359
363
|
with open(taxon_profile_path, 'r', encoding='utf-8') as f:
|
|
360
364
|
taxon_profile = json.load(f)
|
|
@@ -368,8 +372,10 @@ class TaxonRelationshipTaxonSerializer(serializers.Serializer):
|
|
|
368
372
|
|
|
369
373
|
if taxon_profile:
|
|
370
374
|
taxon['taxonProfileId'] = taxon_profile['taxonProfileId']
|
|
375
|
+
taxon['vernacular'] = taxon_profile['vernacular']
|
|
371
376
|
else:
|
|
372
377
|
taxon['taxonProfileId'] = None
|
|
378
|
+
taxon['vernacular'] = {}
|
|
373
379
|
|
|
374
380
|
return taxon
|
|
375
381
|
|
|
@@ -71,13 +71,13 @@ class LocalizedTemplateContentSerializer(serializers.ModelSerializer):
|
|
|
71
71
|
return localized_template_content.published_author
|
|
72
72
|
|
|
73
73
|
def get_createdAt(self, localized_template_content):
|
|
74
|
-
return localized_template_content.created_at
|
|
74
|
+
return localized_template_content.created_at.isoformat()
|
|
75
75
|
|
|
76
76
|
def get_lastModified(self, localized_template_content):
|
|
77
|
-
return localized_template_content.
|
|
77
|
+
return localized_template_content.last_modified.isoformat()
|
|
78
78
|
|
|
79
79
|
def get_publishedAt(self, localized_template_content):
|
|
80
|
-
return localized_template_content.published_at
|
|
80
|
+
return localized_template_content.published_at.isoformat()
|
|
81
81
|
|
|
82
82
|
def get_templateName(self, localized_template_content):
|
|
83
83
|
return self.get_from_definition(localized_template_content, 'templateName')
|
localcosmos_server/template_content/migrations/0004_localizedtemplatecontent_author_and_more.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Generated by Django 5.1.7 on 2025-11-19 08:34
|
|
2
|
+
|
|
3
|
+
from django.db import migrations, models
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class Migration(migrations.Migration):
|
|
7
|
+
|
|
8
|
+
dependencies = [
|
|
9
|
+
('template_content', '0003_alter_templatecontent_template_type'),
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
operations = [
|
|
13
|
+
migrations.AddField(
|
|
14
|
+
model_name='localizedtemplatecontent',
|
|
15
|
+
name='author',
|
|
16
|
+
field=models.CharField(blank=True, help_text="Author name for attribution (e.g., 'Dr. Jane Smith' or 'LocalCosmos Team')", max_length=355, null=True),
|
|
17
|
+
),
|
|
18
|
+
migrations.AddField(
|
|
19
|
+
model_name='localizedtemplatecontent',
|
|
20
|
+
name='published_author',
|
|
21
|
+
field=models.CharField(blank=True, max_length=355, null=True),
|
|
22
|
+
),
|
|
23
|
+
]
|
|
@@ -37,7 +37,7 @@ localcosmos_server/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
37
37
|
localcosmos_server/api/anycluster_schema_urls.py,sha256=nVa9-1pf6a1F-LNYaN3im9xy9LkebIxp0eaJs-Bwvok,1219
|
|
38
38
|
localcosmos_server/api/examples.py,sha256=o9MyhwcsOKUI1YstEKQ7bFHM5nrVjy873WQcH_OTL-s,309
|
|
39
39
|
localcosmos_server/api/permissions.py,sha256=HLToMDOGIMYWsRbM1asgw5NUGz7ukABrqGLSJxZEaXI,1303
|
|
40
|
-
localcosmos_server/api/serializers.py,sha256=
|
|
40
|
+
localcosmos_server/api/serializers.py,sha256=C7yZgyIBrJ9ZaVI2MSx-JpbrYVI5uL0NPdkuH2ty_cg,22487
|
|
41
41
|
localcosmos_server/api/urls.py,sha256=YwGSsvIofYWMPuO1e69VEo2W6oOM6TWU4vrv_Z9DuRk,2282
|
|
42
42
|
localcosmos_server/api/views.py,sha256=1RSz7r5fGs0VC1fmu0VAk6N6BZ3wncv3fxkOVmY3MOM,26686
|
|
43
43
|
localcosmos_server/api/example_files/taxon_profile.json,sha256=SeWCnsAHQejKZoKxBVEelcETd3emYYkuDXjkvJFSUlU,4861
|
|
@@ -2577,12 +2577,13 @@ localcosmos_server/template_content/utils.py,sha256=-qQQTwEiI9J2InPMGehidtgLK_6r
|
|
|
2577
2577
|
localcosmos_server/template_content/views.py,sha256=QlCkPgvwjUn_4AAzwzPa_c6qfLY7Rcy9aV_EhZ9689k,37534
|
|
2578
2578
|
localcosmos_server/template_content/widgets.py,sha256=iNQkktV_Fk7VZre-Jpy_tF03a7-PUL5XDVZ1YH5dNBQ,1775
|
|
2579
2579
|
localcosmos_server/template_content/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2580
|
-
localcosmos_server/template_content/api/serializers.py,sha256=
|
|
2580
|
+
localcosmos_server/template_content/api/serializers.py,sha256=5FI5wsw00lP96BZP9Ll45XNdXWscAs2J3zV0Mv4_mp0,12550
|
|
2581
2581
|
localcosmos_server/template_content/api/urls.py,sha256=JPngLtzbQ0K2w3Wpq4O3RnvmSBCzTuNTcbIPkSO-QIE,893
|
|
2582
2582
|
localcosmos_server/template_content/api/views.py,sha256=aVei450Ugi6XRrlssIzDkvthDzN5j2dqBYGEnwV9i2s,2538
|
|
2583
2583
|
localcosmos_server/template_content/migrations/0001_initial.py,sha256=nABlB8A9ezsSXjYaYuv2Ks2gl8k3mB2Zwh8z0KDb1G8,3430
|
|
2584
2584
|
localcosmos_server/template_content/migrations/0002_navigation_and_more.py,sha256=36xmQLxkUbWFfU3VRA27VkcVKzxqz7f_jQBUO1URwJo,4183
|
|
2585
2585
|
localcosmos_server/template_content/migrations/0003_alter_templatecontent_template_type.py,sha256=8Vm_6KZuLiAE5npZ48rt84obb2S4Rq6ft_8fAcWdiNk,468
|
|
2586
|
+
localcosmos_server/template_content/migrations/0004_localizedtemplatecontent_author_and_more.py,sha256=-Qua4RUlwnej8UTCEgeN-Snhsd1_CQAdJta1WvX1eWY,743
|
|
2586
2587
|
localcosmos_server/template_content/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2587
2588
|
localcosmos_server/template_content/static/template_content/template_content.css,sha256=LIfhVPtjTAePXiuYlu1SDglqwFnUm_LdKpjwNto0w8c,1961
|
|
2588
2589
|
localcosmos_server/template_content/static/template_content/template_content.js,sha256=h_FjRkBv_Qg8zvJ6wWbwshtzjXegdBkBfayNEardC1w,3081
|
|
@@ -2776,8 +2777,8 @@ localcosmos_server/tests/mixins.py,sha256=2k-zCrqndwQLABNULDWRftROij3kwhW_bTiV6r
|
|
|
2776
2777
|
localcosmos_server/tests/test_forms.py,sha256=axF1v-T0NGR16St3hueQAuREb2sbWzajdNFQDpFeYqI,9767
|
|
2777
2778
|
localcosmos_server/tests/test_models.py,sha256=h4d70Ps0hLbcgL6rL1OV_6zxJ_ewDfHgvzJTJDw1m6E,33000
|
|
2778
2779
|
localcosmos_server/tests/test_views.py,sha256=SaEuAFAfapsSJi1_R6WEgp41MB03sPruCIy_hJ_oGwc,4308
|
|
2779
|
-
localcosmos_server-0.24.
|
|
2780
|
-
localcosmos_server-0.24.
|
|
2781
|
-
localcosmos_server-0.24.
|
|
2782
|
-
localcosmos_server-0.24.
|
|
2783
|
-
localcosmos_server-0.24.
|
|
2780
|
+
localcosmos_server-0.24.9.dist-info/licenses/LICENCE,sha256=VnxALPSxXoU59rlNeRdJtwS_nU79IFpVWsZZCQUM4Mw,1086
|
|
2781
|
+
localcosmos_server-0.24.9.dist-info/METADATA,sha256=dLFwzSZeyrNNTATEnMjQVPinv_HpI05B9oxpTCnT1KI,1686
|
|
2782
|
+
localcosmos_server-0.24.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
2783
|
+
localcosmos_server-0.24.9.dist-info/top_level.txt,sha256=hNVjlPGCtXvUF5CJY5HOFA_Dh5fYivfqVSyFMUDkqPY,19
|
|
2784
|
+
localcosmos_server-0.24.9.dist-info/RECORD,,
|
|
File without changes
|
{localcosmos_server-0.24.8.dist-info → localcosmos_server-0.24.9.dist-info}/licenses/LICENCE
RENAMED
|
File without changes
|
|
File without changes
|