django-nominopolitan 0.6.0__py3-none-any.whl → 0.7.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-nominopolitan
3
- Version: 0.6.0
3
+ Version: 0.7.0
4
4
  Summary: Neapolitan with namespaces - Django CRUD views
5
5
  Home-page: https://github.com/doctor-cornelius/django-nominopolitan
6
6
  Author: Michael Foulds
@@ -11,12 +11,14 @@ Classifier: Programming Language :: Python :: 3.13
11
11
  Requires-Dist: django (>=5.1.3,<6.0.0)
12
12
  Requires-Dist: django-htmx (>=1.21.0,<2.0.0)
13
13
  Requires-Dist: django-template-partials (>=24.4,<25.0)
14
- Requires-Dist: neapolitan (>=24.8,<25.0)
15
- Requires-Dist: pydantic (>=2.7.1,<3.0.0)
16
- Requires-Dist: validators (>=0.28.3,<0.29.0)
17
14
  Project-URL: Repository, https://github.com/doctor-cornelius/django-nominopolitan
18
15
  Description-Content-Type: text/markdown
19
16
 
20
17
  # Nominopolitan
21
18
 
22
19
  It's [`neapolitan`](https://github.com/carltongibson/neapolitan/tree/main), but with namespaces.
20
+
21
+ ## Status
22
+
23
+ Being tested.
24
+
@@ -1,16 +1,16 @@
1
1
  nominopolitan/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  nominopolitan/apps.py,sha256=lBeSvSX8giCnwIpj2VofxkZ1be-9L4j7i8rihZoVvcA,189
3
- nominopolitan/mixins.py,sha256=HXEsmb4KiPRZxHXH1aLWbw7qKQ_B4KQlUjVgprZCShc,5995
3
+ nominopolitan/mixins.py,sha256=UTECE8Yz4OUdSdc0sZCYSYaNFvATEgYPx3sUCAE6ZvY,6128
4
4
  nominopolitan/templates/nominopolitan/base.html,sha256=fTV7OuDK7jXLHeaz_3GC3CqlqugrzR7j22tCQz7nPHM,88
5
5
  nominopolitan/templates/nominopolitan/object_confirm_delete.html,sha256=8zvZVfZlWcS9IUc8IS-FuZB47xHIVPt9YKkOhQMmN4M,767
6
6
  nominopolitan/templates/nominopolitan/object_detail.html,sha256=lKz1I0U668VhBEC9Y2e8TvF9dPCTKsHMrx-A649KhG8,370
7
- nominopolitan/templates/nominopolitan/object_form.html,sha256=HS2auFBHRHiE5cUTN-W7bozIEnpsmCeDepuljXtOa6I,802
7
+ nominopolitan/templates/nominopolitan/object_form.html,sha256=s9RnXolkO2vPIV1L3S7PFnULDAA9NfufgZu63rukRIY,957
8
8
  nominopolitan/templates/nominopolitan/object_list.html,sha256=sjXC3Cin7_FWGvnu_jXihk3m8FQKhGVuBq5KzdoA-Oo,886
9
9
  nominopolitan/templates/nominopolitan/partial/detail.html,sha256=Prz2W6zlYMSbg3YIoJqGQST_7u4sOLCpK0SvunjTAWI,273
10
10
  nominopolitan/templates/nominopolitan/partial/list.html,sha256=IENKq35m3RbkAFcOkJaB5PXuPitPblDCvMLaswGsS4s,1085
11
11
  nominopolitan/templatetags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  nominopolitan/templatetags/nominopolitan.py,sha256=WmZvYvvTYRrIGff4vqNdD5QOpLed7gkTTS-HDDWYs7o,2744
13
- django_nominopolitan-0.6.0.dist-info/LICENSE,sha256=DEXdAFnaDEh6DpBUH_Y70cc1SP1Je-Yg9AtxUbqpBjQ,1073
14
- django_nominopolitan-0.6.0.dist-info/METADATA,sha256=agG7kYVheL90v41E0cFmdmG6NvFxgIh8oOsLwJPHOV8,882
15
- django_nominopolitan-0.6.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
16
- django_nominopolitan-0.6.0.dist-info/RECORD,,
13
+ django_nominopolitan-0.7.0.dist-info/LICENSE,sha256=DEXdAFnaDEh6DpBUH_Y70cc1SP1Je-Yg9AtxUbqpBjQ,1073
14
+ django_nominopolitan-0.7.0.dist-info/METADATA,sha256=pN7Kh2vjvIc0RIQKkUoknsgG8ZLQv_qn0ooXFISbGng,783
15
+ django_nominopolitan-0.7.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
16
+ django_nominopolitan-0.7.0.dist-info/RECORD,,
nominopolitan/mixins.py CHANGED
@@ -11,10 +11,10 @@ log = logging.getLogger(__name__)
11
11
  class NominopolitanMixin:
12
12
  namespace = None
13
13
  create_form_class = None
14
-
15
14
  template_path = "nominopolitan"
16
15
  base_template_path = "nominopolitan/base.html"
17
16
  use_htmx_partials = True
17
+ use_crispy = False
18
18
 
19
19
 
20
20
  @staticmethod
@@ -102,6 +102,9 @@ class NominopolitanMixin:
102
102
  # set base_template_path
103
103
  context["base_template_path"] = self.base_template_path
104
104
 
105
+ context["use_htmx_partials"] = self.use_htmx_partials
106
+ context["use_crispy"] = self.use_crispy
107
+
105
108
  # Add related fields for list view
106
109
  if self.role == Role.LIST and hasattr(self, "object_list"):
107
110
  context["related_fields"] = {
@@ -2,7 +2,7 @@
2
2
  {% load nominopolitan %}
3
3
  {% load partials %}
4
4
 
5
- {% load crispy_forms_tags %}
5
+ {% if use_crispy %}{% load crispy_forms_tags %}{% endif %}
6
6
 
7
7
  {% block content %}
8
8
  {% partial content %}
@@ -17,7 +17,14 @@
17
17
  <form method="POST" {% if form.is_multipart %}enctype="multipart/form-data" {% endif %}
18
18
  action="{% if object %}{{ update_view_url }}{% else %}{{ create_view_url }}{% endif %}">
19
19
  {% csrf_token %}
20
- {{ form|crispy }}
20
+
21
+ {% if use_crispy %}
22
+ {{ form|crispy }}
23
+ {% else %}
24
+ {{ form }}
25
+ {% endif %}
26
+
27
+
21
28
  <button type="submit" class="button is-primary mt-4">Save</button>
22
29
  </form>
23
30
  </div>
OSZAR »