djangoldp-ds4go 1.0.4__tar.gz → 1.1.0__tar.gz

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.
Files changed (28) hide show
  1. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/PKG-INFO +1 -1
  2. djangoldp_ds4go-1.1.0/djangoldp_ds4go/__init__.py +1 -0
  3. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/admin.py +1 -0
  4. djangoldp_ds4go-1.1.0/djangoldp_ds4go/migrations/0003_factbundle.py +137 -0
  5. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/models/__init__.py +1 -0
  6. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/models/category.py +2 -0
  7. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/models/fact.py +2 -2
  8. djangoldp_ds4go-1.1.0/djangoldp_ds4go/models/fact_bundle.py +29 -0
  9. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/models/media.py +3 -0
  10. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/translation.py +6 -1
  11. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go.egg-info/PKG-INFO +1 -1
  12. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go.egg-info/SOURCES.txt +2 -0
  13. djangoldp_ds4go-1.0.4/djangoldp_ds4go/__init__.py +0 -1
  14. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/README.md +0 -0
  15. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/apps.py +0 -0
  16. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/management/__init__.py +0 -0
  17. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/management/commands/__init__.py +0 -0
  18. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/management/commands/import_rss.py +0 -0
  19. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/migrations/0001_initial.py +0 -0
  20. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/migrations/0002_djangoldp_i18n.py +0 -0
  21. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/migrations/__init__.py +0 -0
  22. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/models/__base_model.py +0 -0
  23. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go/models/__base_named_model.py +0 -0
  24. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go.egg-info/dependency_links.txt +0 -0
  25. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go.egg-info/requires.txt +0 -0
  26. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/djangoldp_ds4go.egg-info/top_level.txt +0 -0
  27. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/setup.cfg +0 -0
  28. {djangoldp_ds4go-1.0.4 → djangoldp_ds4go-1.1.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: djangoldp_ds4go
3
- Version: 1.0.4
3
+ Version: 1.1.0
4
4
  Summary: djangoldp package for dataspace interoperability framework
5
5
  Home-page: https://git.startinblox.com/djangoldp-packages/djangoldp-ds4go
6
6
  Author: Startin'blox
@@ -0,0 +1 @@
1
+ __version__ = '1.1.0'
@@ -7,6 +7,7 @@ from djangoldp_ds4go.models import *
7
7
 
8
8
  @admin.register(
9
9
  Category,
10
+ FactBundle,
10
11
  Media,
11
12
  )
12
13
  class DS4GOModelAdmin(DjangoLDPI18nAdmin, DjangoLDPAdmin):
@@ -0,0 +1,137 @@
1
+ # Generated by Django 5.2.10 on 2026-01-27 12:52
2
+
3
+ import djangoldp.fields
4
+ import djangoldp_edc.permissions.v3
5
+ import djangoldp_i18n.views
6
+ from django.db import migrations, models
7
+
8
+
9
+ class Migration(migrations.Migration):
10
+
11
+ dependencies = [
12
+ ("djangoldp_ds4go", "0002_djangoldp_i18n"),
13
+ ]
14
+
15
+ operations = [
16
+ migrations.CreateModel(
17
+ name="FactBundle",
18
+ fields=[
19
+ (
20
+ "id",
21
+ models.AutoField(
22
+ auto_created=True,
23
+ primary_key=True,
24
+ serialize=False,
25
+ verbose_name="ID",
26
+ ),
27
+ ),
28
+ (
29
+ "urlid",
30
+ djangoldp.fields.LDPUrlField(
31
+ blank=True, db_index=True, null=True, unique=True
32
+ ),
33
+ ),
34
+ (
35
+ "is_backlink",
36
+ models.BooleanField(
37
+ default=False,
38
+ help_text="set automatically to indicate the Model is a backlink",
39
+ ),
40
+ ),
41
+ (
42
+ "allow_create_backlink",
43
+ models.BooleanField(
44
+ default=True,
45
+ help_text="set to False to disable backlink creation after Model save",
46
+ ),
47
+ ),
48
+ (
49
+ "created_at",
50
+ djangoldp.fields.DateTimeField(
51
+ auto_now_add=True, verbose_name="Creation Date"
52
+ ),
53
+ ),
54
+ (
55
+ "updated_at",
56
+ djangoldp.fields.DateTimeField(
57
+ auto_now=True, verbose_name="Update Date"
58
+ ),
59
+ ),
60
+ (
61
+ "name",
62
+ djangoldp.fields.CharField(
63
+ blank=True, max_length=255, null=True, verbose_name="Name"
64
+ ),
65
+ ),
66
+ (
67
+ "name_fr",
68
+ djangoldp.fields.CharField(
69
+ blank=True, max_length=255, null=True, verbose_name="Name"
70
+ ),
71
+ ),
72
+ (
73
+ "name_en",
74
+ djangoldp.fields.CharField(
75
+ blank=True, max_length=255, null=True, verbose_name="Name"
76
+ ),
77
+ ),
78
+ (
79
+ "name_es",
80
+ djangoldp.fields.CharField(
81
+ blank=True, max_length=255, null=True, verbose_name="Name"
82
+ ),
83
+ ),
84
+ (
85
+ "description",
86
+ djangoldp.fields.TextField(
87
+ blank=True, null=True, verbose_name="Description"
88
+ ),
89
+ ),
90
+ (
91
+ "description_fr",
92
+ djangoldp.fields.TextField(
93
+ blank=True, null=True, verbose_name="Description"
94
+ ),
95
+ ),
96
+ (
97
+ "description_en",
98
+ djangoldp.fields.TextField(
99
+ blank=True, null=True, verbose_name="Description"
100
+ ),
101
+ ),
102
+ (
103
+ "description_es",
104
+ djangoldp.fields.TextField(
105
+ blank=True, null=True, verbose_name="Description"
106
+ ),
107
+ ),
108
+ (
109
+ "facts",
110
+ djangoldp.fields.ManyToManyField(
111
+ blank=True, to="djangoldp_ds4go.fact", verbose_name="Facts"
112
+ ),
113
+ ),
114
+ ],
115
+ options={
116
+ "verbose_name": "Facts Bundle",
117
+ "verbose_name_plural": "Facts Bundles",
118
+ "abstract": False,
119
+ "default_permissions": {"add", "change", "control", "delete", "view"},
120
+ "rdf_type": "ds4go:FactBundle",
121
+ "view_set": djangoldp_i18n.views.I18nLDPViewSet,
122
+ "permission_classes": [
123
+ djangoldp_edc.permissions.v3.EdcContractPermissionV3
124
+ ],
125
+ "serializer_fields": [
126
+ "@id",
127
+ "created_at",
128
+ "updated_at",
129
+ "name",
130
+ "description",
131
+ "facts",
132
+ ],
133
+ "nested_fields": ["facts"],
134
+ "depth": 2,
135
+ },
136
+ ),
137
+ ]
@@ -2,4 +2,5 @@ from .__base_model import *
2
2
  from .__base_named_model import *
3
3
  from .category import *
4
4
  from .fact import *
5
+ from .fact_bundle import *
5
6
  from .media import *
@@ -1,6 +1,7 @@
1
1
  from django.db import models
2
2
  from django.utils.translation import gettext_lazy as _
3
3
  from djangoldp import fields
4
+ from djangoldp.permissions import AnonymousReadOnly, ReadAndCreate
4
5
  from djangoldp_i18n.views import I18nLDPViewSet
5
6
 
6
7
  from djangoldp_ds4go.models.__base_named_model import baseNamedModel
@@ -15,6 +16,7 @@ class Category(baseNamedModel):
15
16
  verbose_name = _("Category")
16
17
  verbose_name_plural = _("Categories")
17
18
  container_path = "categories"
19
+ permission_classes = [AnonymousReadOnly, ReadAndCreate]
18
20
 
19
21
  rdf_type = "ds4go:Category"
20
22
  serializer_fields = baseNamedModel.Meta.serializer_fields + [
@@ -1,10 +1,10 @@
1
1
  from django.utils.translation import gettext_lazy as _
2
2
  from djangoldp import fields
3
+ from djangoldp.permissions import AnonymousReadOnly, ReadAndCreate
3
4
  from djangoldp_i18n.views import I18nLDPViewSet
4
5
 
5
6
  from djangoldp_ds4go.models.__base_named_model import baseNamedModel
6
7
  from djangoldp_ds4go.models.category import Category
7
- from djangoldp_edc.permissions import EdcContractPermissionV3
8
8
 
9
9
 
10
10
  class Fact(baseNamedModel):
@@ -28,9 +28,9 @@ class Fact(baseNamedModel):
28
28
 
29
29
  class Meta(baseNamedModel.Meta):
30
30
  depth = 1
31
- permission_classes = [EdcContractPermissionV3]
32
31
  verbose_name = _("Fact")
33
32
  verbose_name_plural = _("Facts")
33
+ permission_classes = [AnonymousReadOnly, ReadAndCreate]
34
34
 
35
35
  rdf_type = "ds4go:Fact"
36
36
  serializer_fields = baseNamedModel.Meta.serializer_fields + [
@@ -0,0 +1,29 @@
1
+ from django.utils.translation import gettext_lazy as _
2
+ from djangoldp import fields
3
+ from djangoldp_edc.permissions import EdcContractPermissionV3
4
+ from djangoldp_i18n.views import I18nLDPViewSet
5
+
6
+ from djangoldp_ds4go.models.__base_named_model import baseNamedModel
7
+ from djangoldp_ds4go.models.category import Category
8
+ from djangoldp_ds4go.models.fact import Fact
9
+
10
+
11
+ class FactBundle(baseNamedModel):
12
+ description = fields.TextField(blank=True, null=True, verbose_name=_("Description"))
13
+ facts = fields.ManyToManyField(Fact, blank=True, verbose_name=_("Facts"))
14
+
15
+ class Meta(baseNamedModel.Meta):
16
+ depth = 2
17
+ permission_classes = [EdcContractPermissionV3]
18
+ verbose_name = _("Facts Bundle")
19
+ verbose_name_plural = _("Facts Bundles")
20
+
21
+ rdf_type = "ds4go:FactBundle"
22
+ serializer_fields = baseNamedModel.Meta.serializer_fields + [
23
+ "description",
24
+ "facts",
25
+ ]
26
+
27
+ nested_fields = baseNamedModel.Meta.nested_fields + ["facts"]
28
+
29
+ view_set = I18nLDPViewSet
@@ -1,6 +1,7 @@
1
1
  from django.db import models
2
2
  from django.utils.translation import gettext_lazy as _
3
3
  from djangoldp import fields
4
+ from djangoldp.permissions import InheritPermissions
4
5
  from djangoldp_i18n.views import I18nLDPViewSet
5
6
 
6
7
  from djangoldp_ds4go.models.__base_model import baseModel
@@ -29,6 +30,8 @@ class Media(baseModel):
29
30
  class Meta(baseModel.Meta):
30
31
  verbose_name = _("Media")
31
32
  verbose_name_plural = _("Medias")
33
+ permission_classes = [InheritPermissions]
34
+ inherit_permissions = ["related_fact"]
32
35
 
33
36
  rdf_type = "ds4go:Media"
34
37
  serializer_fields = baseModel.Meta.serializer_fields + [
@@ -1,6 +1,6 @@
1
1
  from modeltranslation.translator import TranslationOptions, register
2
2
 
3
- from djangoldp_ds4go.models import Category, Fact, Media
3
+ from djangoldp_ds4go.models import Category, Fact, FactBundle, Media
4
4
 
5
5
 
6
6
  @register(Fact)
@@ -16,3 +16,8 @@ class CategoryTranslationOptions(TranslationOptions):
16
16
  @register(Media)
17
17
  class MediaTranslationOptions(TranslationOptions):
18
18
  fields = ("description",)
19
+
20
+
21
+ @register(FactBundle)
22
+ class FactBundleTranslationOptions(TranslationOptions):
23
+ fields = ("name", "description")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: djangoldp_ds4go
3
- Version: 1.0.4
3
+ Version: 1.1.0
4
4
  Summary: djangoldp package for dataspace interoperability framework
5
5
  Home-page: https://git.startinblox.com/djangoldp-packages/djangoldp-ds4go
6
6
  Author: Startin'blox
@@ -15,10 +15,12 @@ djangoldp_ds4go/management/commands/__init__.py
15
15
  djangoldp_ds4go/management/commands/import_rss.py
16
16
  djangoldp_ds4go/migrations/0001_initial.py
17
17
  djangoldp_ds4go/migrations/0002_djangoldp_i18n.py
18
+ djangoldp_ds4go/migrations/0003_factbundle.py
18
19
  djangoldp_ds4go/migrations/__init__.py
19
20
  djangoldp_ds4go/models/__base_model.py
20
21
  djangoldp_ds4go/models/__base_named_model.py
21
22
  djangoldp_ds4go/models/__init__.py
22
23
  djangoldp_ds4go/models/category.py
23
24
  djangoldp_ds4go/models/fact.py
25
+ djangoldp_ds4go/models/fact_bundle.py
24
26
  djangoldp_ds4go/models/media.py
@@ -1 +0,0 @@
1
- __version__ = '1.0.4'