django-cards 0.11.7__tar.gz → 0.11.8__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {django-cards-0.11.7/django_cards.egg-info → django_cards-0.11.8}/PKG-INFO +1 -1
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/base.py +12 -6
- {django-cards-0.11.7 → django_cards-0.11.8/django_cards.egg-info}/PKG-INFO +1 -1
- {django-cards-0.11.7 → django_cards-0.11.8}/setup.py +1 -1
- {django-cards-0.11.7 → django_cards-0.11.8}/LICENSE +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/MANIFEST.in +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/README.md +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/__init__.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/apps.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/card_list/__init__.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/card_list/base.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/card_list/main.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/card_list/tree.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/includes.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/standard.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default/32px.png +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default/40px.png +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default/style.css +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default/style.min.css +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default/throbber.gif +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default-dark/32px.png +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default-dark/40px.png +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default-dark/style.css +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default-dark/style.min.css +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default-dark/throbber.gif +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/30px.png +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/32px.png +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.eot +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.svg +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.ttf +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-bold-webfont.woff +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.eot +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.svg +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.ttf +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-extralight-webfont.woff +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.eot +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.svg +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.ttf +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/fonts/titillium/titilliumweb-regular-webfont.woff +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/style.css +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/style.min.css +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/throbber.gif +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/js/jstree.js +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/js/jstree.min.js +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/groups/groups.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/blank.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/card_group.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/datatable.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/default.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/default_body.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/html.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/list_selection.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/message.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/table.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/table_body.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/tree_selection.html +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templatetags/__init__.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/templatetags/django_cards_tags.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/cards/url_converters.py +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/django_cards.egg-info/SOURCES.txt +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/django_cards.egg-info/dependency_links.txt +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/django_cards.egg-info/top_level.txt +0 -0
- {django-cards-0.11.7 → django_cards-0.11.8}/setup.cfg +0 -0
@@ -84,7 +84,7 @@ class CardBase:
|
|
84
84
|
group_type=CARD_TYPE_STANDARD, show_created_modified_dates=False,
|
85
85
|
footer=None, extra_card_context=None,
|
86
86
|
is_empty=False, empty_template_name=None, empty_message='N/A',
|
87
|
-
collapsed=None, hidden_if_blank_or_none=None, **kwargs):
|
87
|
+
collapsed=None, hidden_if_blank_or_none=None, hidden_if_zero=None, **kwargs):
|
88
88
|
|
89
89
|
if code is None:
|
90
90
|
if title is not None:
|
@@ -118,6 +118,7 @@ class CardBase:
|
|
118
118
|
self.enable_collapse = collapsed is not None
|
119
119
|
self.collapsed = collapsed
|
120
120
|
self.hidden_if_blank_or_none = hidden_if_blank_or_none
|
121
|
+
self.hidden_if_zero = hidden_if_zero
|
121
122
|
|
122
123
|
if is_empty:
|
123
124
|
self.group_type = CARD_TYPE_STANDARD
|
@@ -137,7 +138,7 @@ class CardBase:
|
|
137
138
|
self.child_card_groups = []
|
138
139
|
|
139
140
|
# noinspection PyMethodMayBeStatic
|
140
|
-
def add_extra_card_info(self, extra_info, group_type,
|
141
|
+
def add_extra_card_info(self, extra_info, group_type, **kwargs):
|
141
142
|
if group_type in (CARD_TYPE_DATATABLE, CARD_TYPE_ORDERED_DATATABLE):
|
142
143
|
extra_info['datatable_id'] = kwargs.get('datatable_id', self.code)
|
143
144
|
extra_info['datatable'] = kwargs.get('datatable')
|
@@ -220,7 +221,7 @@ class CardBase:
|
|
220
221
|
self.rows.append(row)
|
221
222
|
|
222
223
|
def add_entry(self, value=None, field=None, label=None, entry_css_class=None, css_class=None,
|
223
|
-
default='N/A', link=None,
|
224
|
+
default='N/A', link=None, hidden=False, hidden_if_blank_or_none=None, hidden_if_zero=None,
|
224
225
|
html_override=None, value_method=None, value_type=None, default_if=None, row_style=None, **kwargs):
|
225
226
|
|
226
227
|
entry = self._add_entry_internal(value=value,
|
@@ -232,6 +233,7 @@ class CardBase:
|
|
232
233
|
link=link,
|
233
234
|
hidden=hidden,
|
234
235
|
hidden_if_blank_or_none=hidden_if_blank_or_none,
|
236
|
+
hidden_if_zero=hidden_if_zero,
|
235
237
|
html_override=html_override,
|
236
238
|
value_method=value_method,
|
237
239
|
value_type=value_type,
|
@@ -323,7 +325,7 @@ class CardBase:
|
|
323
325
|
if callable(value):
|
324
326
|
value = value()
|
325
327
|
html += html_barge.replace('%1%', str(value))
|
326
|
-
|
328
|
+
|
327
329
|
return self._add_entry_internal(label=label,
|
328
330
|
value=html,
|
329
331
|
default=default,
|
@@ -337,7 +339,7 @@ class CardBase:
|
|
337
339
|
**kwargs)
|
338
340
|
|
339
341
|
def _add_entry_internal(self, value=None, field=None, label=None, default='N/A', link=None,
|
340
|
-
hidden=False, hidden_if_blank_or_none=None, html_override=None,
|
342
|
+
hidden=False, hidden_if_blank_or_none=None, hidden_if_zero=None, html_override=None,
|
341
343
|
value_method=None, value_type=None,
|
342
344
|
entry_css_class=None, css_class=None, menu=None, default_if=None, row_style=None,
|
343
345
|
**kwargs):
|
@@ -347,7 +349,11 @@ class CardBase:
|
|
347
349
|
if hidden_if_blank_or_none is None:
|
348
350
|
hidden_if_blank_or_none = self.hidden_if_blank_or_none
|
349
351
|
|
350
|
-
if
|
352
|
+
if hidden_if_zero is None:
|
353
|
+
hidden_if_zero = self.hidden_if_zero
|
354
|
+
|
355
|
+
if hidden or (hidden_if_blank_or_none and (value is None or value == '') or
|
356
|
+
(hidden_if_zero and isinstance(value, (float, int)) and value == 0)):
|
351
357
|
return None
|
352
358
|
if isinstance(value, bool):
|
353
359
|
return self.add_boolean_entry(value=value,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default/32px.png
RENAMED
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default/40px.png
RENAMED
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/default/style.css
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/30px.png
RENAMED
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/32px.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/style.css
RENAMED
File without changes
|
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/static/cards/jstree/css/themes/proton/throbber.gif
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/default_body.html
RENAMED
File without changes
|
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/list_selection.html
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{django-cards-0.11.7 → django_cards-0.11.8}/cards/templates/cards/standard/tree_selection.html
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|