accrete 0.0.17__py3-none-any.whl → 0.0.19__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.
Files changed (93) hide show
  1. accrete/contrib/ui/__init__.py +1 -0
  2. accrete/contrib/ui/filter.py +2 -1
  3. accrete/contrib/ui/helper.py +11 -1
  4. accrete/contrib/ui/static/bulma/LICENSE +21 -0
  5. accrete/contrib/ui/static/bulma/README.md +139 -0
  6. accrete/contrib/ui/static/bulma/bulma.sass +10 -0
  7. accrete/contrib/ui/static/bulma/css/bulma-rtl.css +11851 -0
  8. accrete/contrib/ui/static/bulma/css/bulma-rtl.css.map +1 -0
  9. accrete/contrib/ui/static/bulma/css/bulma-rtl.min.css +1 -0
  10. accrete/contrib/ui/static/bulma/css/bulma.css +11851 -0
  11. accrete/contrib/ui/static/bulma/css/bulma.css.map +1 -0
  12. accrete/contrib/ui/static/bulma/css/bulma.min.css +1 -0
  13. accrete/contrib/ui/static/bulma/package.json +56 -0
  14. accrete/contrib/ui/static/bulma/sass/base/_all.sass +6 -0
  15. accrete/contrib/ui/static/bulma/sass/base/animations.sass +5 -0
  16. accrete/contrib/ui/static/bulma/sass/base/generic.sass +145 -0
  17. accrete/contrib/ui/static/bulma/sass/base/helpers.sass +1 -0
  18. accrete/contrib/ui/static/bulma/sass/base/minireset.sass +79 -0
  19. accrete/contrib/ui/static/bulma/sass/components/_all.sass +15 -0
  20. accrete/contrib/ui/static/bulma/sass/components/breadcrumb.sass +77 -0
  21. accrete/contrib/ui/static/bulma/sass/components/card.sass +103 -0
  22. accrete/contrib/ui/static/bulma/sass/components/dropdown.sass +83 -0
  23. accrete/contrib/ui/static/bulma/sass/components/level.sass +79 -0
  24. accrete/contrib/ui/static/bulma/sass/components/media.sass +59 -0
  25. accrete/contrib/ui/static/bulma/sass/components/menu.sass +59 -0
  26. accrete/contrib/ui/static/bulma/sass/components/message.sass +101 -0
  27. accrete/contrib/ui/static/bulma/sass/components/modal.sass +117 -0
  28. accrete/contrib/ui/static/bulma/sass/components/navbar.sass +446 -0
  29. accrete/contrib/ui/static/bulma/sass/components/pagination.sass +167 -0
  30. accrete/contrib/ui/static/bulma/sass/components/panel.sass +121 -0
  31. accrete/contrib/ui/static/bulma/sass/components/tabs.sass +176 -0
  32. accrete/contrib/ui/static/bulma/sass/elements/_all.sass +16 -0
  33. accrete/contrib/ui/static/bulma/sass/elements/box.sass +26 -0
  34. accrete/contrib/ui/static/bulma/sass/elements/button.sass +357 -0
  35. accrete/contrib/ui/static/bulma/sass/elements/container.sass +29 -0
  36. accrete/contrib/ui/static/bulma/sass/elements/content.sass +162 -0
  37. accrete/contrib/ui/static/bulma/sass/elements/form.sass +1 -0
  38. accrete/contrib/ui/static/bulma/sass/elements/icon.sass +46 -0
  39. accrete/contrib/ui/static/bulma/sass/elements/image.sass +73 -0
  40. accrete/contrib/ui/static/bulma/sass/elements/notification.sass +52 -0
  41. accrete/contrib/ui/static/bulma/sass/elements/other.sass +31 -0
  42. accrete/contrib/ui/static/bulma/sass/elements/progress.sass +73 -0
  43. accrete/contrib/ui/static/bulma/sass/elements/table.sass +134 -0
  44. accrete/contrib/ui/static/bulma/sass/elements/tag.sass +140 -0
  45. accrete/contrib/ui/static/bulma/sass/elements/title.sass +70 -0
  46. accrete/contrib/ui/static/bulma/sass/form/_all.sass +9 -0
  47. accrete/contrib/ui/static/bulma/sass/form/checkbox-radio.sass +22 -0
  48. accrete/contrib/ui/static/bulma/sass/form/file.sass +184 -0
  49. accrete/contrib/ui/static/bulma/sass/form/input-textarea.sass +66 -0
  50. accrete/contrib/ui/static/bulma/sass/form/select.sass +88 -0
  51. accrete/contrib/ui/static/bulma/sass/form/shared.sass +60 -0
  52. accrete/contrib/ui/static/bulma/sass/form/tools.sass +215 -0
  53. accrete/contrib/ui/static/bulma/sass/grid/_all.sass +5 -0
  54. accrete/contrib/ui/static/bulma/sass/grid/columns.sass +513 -0
  55. accrete/contrib/ui/static/bulma/sass/grid/tiles.sass +36 -0
  56. accrete/contrib/ui/static/bulma/sass/helpers/_all.sass +12 -0
  57. accrete/contrib/ui/static/bulma/sass/helpers/color.sass +39 -0
  58. accrete/contrib/ui/static/bulma/sass/helpers/flexbox.sass +35 -0
  59. accrete/contrib/ui/static/bulma/sass/helpers/float.sass +10 -0
  60. accrete/contrib/ui/static/bulma/sass/helpers/other.sass +14 -0
  61. accrete/contrib/ui/static/bulma/sass/helpers/overflow.sass +2 -0
  62. accrete/contrib/ui/static/bulma/sass/helpers/position.sass +7 -0
  63. accrete/contrib/ui/static/bulma/sass/helpers/spacing.sass +31 -0
  64. accrete/contrib/ui/static/bulma/sass/helpers/typography.sass +103 -0
  65. accrete/contrib/ui/static/bulma/sass/helpers/visibility.sass +122 -0
  66. accrete/contrib/ui/static/bulma/sass/layout/_all.sass +6 -0
  67. accrete/contrib/ui/static/bulma/sass/layout/footer.sass +11 -0
  68. accrete/contrib/ui/static/bulma/sass/layout/hero.sass +153 -0
  69. accrete/contrib/ui/static/bulma/sass/layout/section.sass +17 -0
  70. accrete/contrib/ui/static/bulma/sass/utilities/_all.sass +9 -0
  71. accrete/contrib/ui/static/bulma/sass/utilities/animations.sass +1 -0
  72. accrete/contrib/ui/static/bulma/sass/utilities/controls.sass +49 -0
  73. accrete/contrib/ui/static/bulma/sass/utilities/derived-variables.sass +114 -0
  74. accrete/contrib/ui/static/bulma/sass/utilities/extends.sass +25 -0
  75. accrete/contrib/ui/static/bulma/sass/utilities/functions.sass +135 -0
  76. accrete/contrib/ui/static/bulma/sass/utilities/initial-variables.sass +79 -0
  77. accrete/contrib/ui/static/bulma/sass/utilities/mixins.sass +303 -0
  78. accrete/contrib/ui/static/css/accrete.css +10346 -76
  79. accrete/contrib/ui/static/css/accrete.css.bak +156 -0
  80. accrete/contrib/ui/static/css/accrete.css.map +1 -0
  81. accrete/contrib/ui/static/css/accrete.scss +153 -0
  82. accrete/contrib/ui/templates/ui/layout.html +3 -2
  83. accrete/contrib/ui/templates/ui/partials/filter.html +1 -1
  84. accrete/contrib/ui/templates/ui/partials/header.html +1 -1
  85. accrete/contrib/ui/templates/ui/table.html +8 -4
  86. accrete/contrib/user/templates/user/user_detail.html +11 -3
  87. accrete/contrib/user/templates/user/user_form.html +1 -3
  88. accrete/contrib/user/views.py +3 -1
  89. {accrete-0.0.17.dist-info → accrete-0.0.19.dist-info}/METADATA +1 -1
  90. accrete-0.0.19.dist-info/RECORD +188 -0
  91. accrete-0.0.17.dist-info/RECORD +0 -111
  92. {accrete-0.0.17.dist-info → accrete-0.0.19.dist-info}/WHEEL +0 -0
  93. {accrete-0.0.17.dist-info → accrete-0.0.19.dist-info}/licenses/LICENSE +0 -0
@@ -6,6 +6,7 @@ from .helper import (
6
6
  ListContext,
7
7
  BreadCrumb,
8
8
  TableField,
9
+ TableFieldAlignment,
9
10
  build_querystring,
10
11
  queryset_from_querystring
11
12
  )
@@ -275,12 +275,13 @@ class Filter:
275
275
  method_label = str(method.get('label', method_name.capitalize()))
276
276
  func = getattr(model, method['name'])
277
277
  return_type = func.__annotations__.get('return')
278
+ print(method)
278
279
  if return_type == str:
279
280
  return self.get_char_query_term(method_label, param)
280
281
  elif return_type == int:
281
282
  return self.get_int_query_term(method_label, param)
282
283
  elif return_type in [float, Decimal]:
283
- return self.get_float_query_term(method_label, param, 0)
284
+ return self.get_float_query_term(method_label, param, method.get('step', 0))
284
285
  elif return_type == bool:
285
286
  return self.get_boolean_query_term(method_label, param)
286
287
  elif return_type == datetime.datetime:
@@ -1,6 +1,7 @@
1
1
  import datetime
2
2
  import logging
3
3
  import json
4
+ from enum import Enum
4
5
  from dataclasses import dataclass, field
5
6
  from django.db.models.functions import Lower
6
7
  from django.db.models import Model, QuerySet, Q, CharField, Manager
@@ -33,11 +34,19 @@ class BreadCrumb:
33
34
  url: str
34
35
 
35
36
 
37
+ class TableFieldAlignment(Enum):
38
+
39
+ LEFT = 'left'
40
+ CENTER = 'center'
41
+ RIGHT = 'right'
42
+
43
+
36
44
  @dataclass
37
45
  class TableField:
38
46
 
39
47
  label: str
40
48
  name: str
49
+ align: type[TableFieldAlignment] = TableFieldAlignment.LEFT
41
50
 
42
51
 
43
52
  @dataclass
@@ -60,6 +69,7 @@ class ListContext:
60
69
  breadcrumbs: list[BreadCrumb] = field(default_factory=list)
61
70
  obj_label: str = None
62
71
  fields: list[TableField] = field(default_factory=list)
72
+ unselect_button: bool = False
63
73
 
64
74
  def get_queryset(self):
65
75
  order = self.get_order()
@@ -355,7 +365,7 @@ def get_related_model(model, path):
355
365
  try:
356
366
  related_model = related_model._meta.fields_map[part].related_model
357
367
  except (AttributeError, KeyError):
358
- continue
368
+ related_model = getattr(related_model, part).field.related_model
359
369
  return related_model
360
370
 
361
371
 
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Jeremy Thomas
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,139 @@
1
+ # [Bulma](https://bulma.io)
2
+
3
+ Bulma is a **modern CSS framework** based on [Flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes).
4
+
5
+ ![Github](https://img.shields.io/github/v/release/jgthms/bulma?logo=Bulma)
6
+ [![npm](https://img.shields.io/npm/v/bulma.svg)][npm-link]
7
+ [![npm](https://img.shields.io/npm/dm/bulma.svg)][npm-link]
8
+ [![](https://data.jsdelivr.com/v1/package/npm/bulma/badge)](https://www.jsdelivr.com/package/npm/bulma)
9
+ [![Awesome][awesome-badge]][awesome-link]
10
+ [![Join the chat at https://gitter.im/jgthms/bulma](https://badges.gitter.im/jgthms/bulma.svg)](https://gitter.im/jgthms/bulma)
11
+ [![Build Status](https://travis-ci.org/jgthms/bulma.svg?branch=master)](https://travis-ci.org/jgthms/bulma)
12
+
13
+ <a href="https://bulma.io"><img src="https://raw.githubusercontent.com/jgthms/bulma/master/docs/images/bulma-banner.png" alt="Bulma: a Flexbox CSS framework" style="max-width:100%;" width="600"></a>
14
+
15
+ ## Quick install
16
+
17
+ Bulma is constantly in development! Try it out now:
18
+
19
+ ### NPM
20
+
21
+ ```sh
22
+ npm install bulma
23
+ ```
24
+
25
+ **or**
26
+
27
+ ### Yarn
28
+
29
+ ```sh
30
+ yarn add bulma
31
+ ```
32
+
33
+ ### Bower
34
+
35
+ ```sh
36
+ bower install bulma
37
+ ```
38
+
39
+ ### Import
40
+
41
+ After installation, you can import the CSS file into your project using this snippet:
42
+
43
+ ```sh
44
+ @import 'bulma/css/bulma.css'
45
+ ```
46
+
47
+ ### CDN
48
+
49
+ [https://www.jsdelivr.com/package/npm/bulma](https://www.jsdelivr.com/package/npm/bulma)
50
+
51
+ Feel free to raise an issue or submit a pull request.
52
+
53
+ ## CSS only
54
+
55
+ Bulma is a **CSS** framework. As such, the sole output is a single CSS file: [bulma.css](https://github.com/jgthms/bulma/blob/master/css/bulma.css)
56
+
57
+ You can either use that file, "out of the box", or download the Sass source files to customize the [variables](https://bulma.io/documentation/overview/variables/).
58
+
59
+ There is **no** JavaScript included. People generally want to use their own JS implementation (and usually already have one). Bulma can be considered "environment agnostic": it's just the style layer on top of the logic.
60
+
61
+ ## Browser Support
62
+
63
+ Bulma uses [autoprefixer](https://github.com/postcss/autoprefixer) to make (most) Flexbox features compatible with earlier browser versions. According to [Can I use](https://caniuse.com/#feat=flexbox), Bulma is compatible with **recent** versions of:
64
+
65
+ - Chrome
66
+ - Edge
67
+ - Firefox
68
+ - Opera
69
+ - Safari
70
+
71
+ Internet Explorer (10+) is only partially supported.
72
+
73
+ ## Documentation
74
+
75
+ The documentation resides in the [docs](docs) directory, and is built with the Ruby-based [Jekyll](https://jekyllrb.com/) tool.
76
+
77
+ Browse the [online documentation here.](https://bulma.io/documentation/overview/start/)
78
+
79
+ ## Related projects
80
+
81
+ | Project | Description |
82
+ | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
83
+ | [Bulma with Attribute Modules](https://github.com/j5bot/bulma-attribute-selectors) | Adds support for attribute-based selectors |
84
+ | [Bulma with Rails](https://github.com/joshuajansen/bulma-rails) | Integrates Bulma with the rails asset pipeline |
85
+ | [BulmaRazor](https://github.com/loogn/bulmarazor) | A lightweight component library based on Bulma and Blazor. |
86
+ | [Vue Admin (dead)](https://github.com/vue-bulma/vue-admin) | Vue Admin framework powered by Bulma |
87
+ | [Bulmaswatch](https://github.com/jenil/bulmaswatch) | Free themes for Bulma |
88
+ | [Goldfish (read-only)](https://github.com/Caiyeon/goldfish) | Vault UI with Bulma, Golang, and Vue Admin |
89
+ | [ember-bulma](https://github.com/open-tux/ember-bulma) | Ember addon providing a collection of UI components for Bulma |
90
+ | [Bloomer](https://bloomer.js.org) | A set of React components for Bulma |
91
+ | [React-bulma](https://github.com/kulakowka/react-bulma) | React.js components for Bulma |
92
+ | [Buefy](https://buefy.org/) | Lightweight UI components for Vue.js based on Bulma |
93
+ | [vue-bulma-components](https://github.com/vouill/vue-bulma-components) | Bulma components for Vue.js with straightforward syntax |
94
+ | [BulmaJS](https://github.com/VizuaaLOG/BulmaJS) | Javascript integration for Bulma. Written in ES6 with a data-\* API |
95
+ | [Bulma-modal-fx](https://github.com/postare/bulma-modal-fx) | A set of modal window effects with CSS transitions and animations for Bulma |
96
+ | [Bulma Stylus](https://github.com/groenroos/bulma-stylus) | Up-to-date 1:1 translation to Stylus |
97
+ | [Bulma.styl (read-only)](https://github.com/log1x/bulma.styl) | 1:1 Stylus translation of Bulma 0.6.11 |
98
+ | [elm-bulma](https://github.com/surprisetalk/elm-bulma) | Bulma + Elm |
99
+ | [elm-bulma-classes](https://github.com/ahstro/elm-bulma-classes) | Bulma classes prepared for usage with Elm |
100
+ | [Bulma Customizer](https://bulma-customizer.bstash.io/) | Bulma Customizer &#8211; Create your own **bespoke** Bulma build |
101
+ | [Fulma](https://fulma.github.io/Fulma/) | Wrapper around Bulma for [fable-react](https://github.com/fable-compiler/fable-react) |
102
+ | [Laravel Enso](https://github.com/laravel-enso/enso) | SPA Admin Panel built with Bulma, VueJS and Laravel |
103
+ | [Django Bulma](https://github.com/timonweb/django-bulma) | Integrates Bulma with Django |
104
+ | [Bulma Templates](https://github.com/dansup/bulma-templates) | Free Templates for Bulma |
105
+ | [React Bulma Components](https://github.com/couds/react-bulma-components) | Another React wrap on React for Bulma.io |
106
+ | [purescript-bulma](https://github.com/sectore/purescript-bulma) | PureScript bindings for Bulma |
107
+ | [Vue Datatable](https://github.com/laravel-enso/vuedatatable) | Bulma themed datatable based on Vue, Laravel & JSON templates |
108
+ | [bulma-fluent](https://mubaidr.github.io/bulma-fluent/) | Fluent Design Theme for Bulma inspired by Microsoft’s Fluent Design System |
109
+ | [csskrt-csskrt](https://github.com/4d11/csskrt-csskrt) | Automatically add Bulma classes to HTML files |
110
+ | [bulma-pagination-react](https://github.com/hipstersmoothie/bulma-pagination-react) | Bulma pagination as a react component |
111
+ | [bulma-helpers](https://github.com/jmaczan/bulma-helpers) | Functional / Atomic CSS classes for Bulma |
112
+ | [bulma-swatch-hook](https://github.com/hipstersmoothie/bulma-swatch-hook) | Bulma swatches as a react hook and a component |
113
+ | [BulmaWP (read-only)](https://github.com/tomhrtly/BulmaWP) | Starter WordPress theme for Bulma |
114
+ | [Ralma](https://github.com/aldi/ralma) | Stateless Ractive.js Components for Bulma |
115
+ | [Django Simple Bulma](https://github.com/python-discord/django-simple-bulma) | Lightweight integration of Bulma and Bulma-Extensions for your Django app |
116
+ | [rbx](https://dfee.github.io/rbx) | Comprehensive React UI Framework written in TypeScript |
117
+ | [Awesome Bulma Templates](https://github.com/aldi/awesome-bulma-templates) | Free real-world Templates built with Bulma |
118
+ | [Trunx](http://g14n.info/trunx) | Super Saiyan React components, son of awesome Bulma, implemented in TypeScript |
119
+ | [@aybolit/bulma](https://github.com/web-padawan/aybolit/tree/master/packages/bulma) | Web Components library inspired by Bulma and Bulma-extensions |
120
+ | [Drulma](https://www.drupal.org/project/drulma) | Drupal theme for Bulma. |
121
+ | [Bulrush](https://github.com/textbook/bulrush) | A Bulma-based Python Pelican blog theme |
122
+ | [Bulma Variable Export](https://github.com/service-paradis/bulma-variables-export) | Access Bulma Variables in Javascript/Typescript in project using Webpack |
123
+ | [Bulmil](https://github.com/gomah/bulmil) | An agnostic UI components library based on Web Components, made with Bulma & Stencil. |
124
+ | [Svelte Bulma Components](https://github.com/elcobvg/svelte-bulma-components) | Library of UI components to be used in [Svelte.js](https://svelte.technology/) or standalone. |
125
+ | [Bulma Nunjucks Starterkit](https://github.com/benninkcorien/nunjucks-starter-kit) | Starterkit for Nunjucks with Bulma. |
126
+ | [Bulma-Social](https://github.com/aldi/bulma-social) | Social Buttons and Colors for Bulma |
127
+ | [Divjoy](https://divjoy.com/?kit=bulma) | React codebase generator with Bulma templates |
128
+ | [Blazorise](https://github.com/Megabit/Blazorise) | Blazor component library with the support for Bulma CSS framework |
129
+ | [Oruga-Bulma](https://github.com/oruga-ui/theme-bulma) | Bulma theme for [Oruga UI](https://oruga.io) |
130
+ | [@bulvar/bulma](https://github.com/daniil4udo/bulvar/tree/master/packages/bulma) | Bulma with [CSS Variables](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties) support |
131
+ | [@angular-bulma](https://quinnjr.github.io/angular-bulma) | [Angular](https://angular.io/) directives and components to use in your Bulma projects |
132
+
133
+ ## Copyright and license ![Github](https://img.shields.io/github/license/jgthms/bulma?logo=Github)
134
+
135
+ Code copyright 2022 Jeremy Thomas. Code released under [the MIT license](https://github.com/jgthms/bulma/blob/master/LICENSE).
136
+
137
+ [npm-link]: https://www.npmjs.com/package/bulma
138
+ [awesome-link]: https://github.com/awesome-css-group/awesome-css
139
+ [awesome-badge]: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg
@@ -0,0 +1,10 @@
1
+ @charset "utf-8"
2
+ /*! bulma.io v0.9.4 | MIT License | github.com/jgthms/bulma */
3
+ @import "sass/utilities/_all"
4
+ @import "sass/base/_all"
5
+ @import "sass/elements/_all"
6
+ @import "sass/form/_all"
7
+ @import "sass/components/_all"
8
+ @import "sass/grid/_all"
9
+ @import "sass/helpers/_all"
10
+ @import "sass/layout/_all"