diff --git a/README.md b/README.md index dbebac18284f63ccc5dc842e3c364bcb9de78448..f2152571fc59fbff2a1685259a957f20b22b9d41 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# hshassets []() +# hshassets []() []() This django-app provides everything you ever wanted! (probably not, but i hope you feel happy anyways). It brings fonts, styles, javascript and layouts as templates. @@ -20,7 +20,7 @@ The current version of this package ships the following own stuff and awesome th #### CSS - [animate.css](https://github.com/daneden/animate.css) (3.5.2) - cross-browser library of CSS animations -- [bulma](https://github.com/jgthms/bulma) (0.5.0) - modern CSS framework based on Flexbox +- [bulma](https://github.com/jgthms/bulma) (0.5.1) - modern CSS framework based on Flexbox - [font-awesome](https://github.com/FortAwesome/Font-Awesome) (4.7.0) - iconic font and CSS toolkit #### JavaScript @@ -61,7 +61,8 @@ This example structure ... │ │ │ ├── cat.png │ │ │ │ └── mouse.png │ │ │ ├── js │ -│ │ │ └── somescript.js │ +│ │ │ ├── foo.js │ +│ │ │ └── bar.js │ │ │ └── sass │ │ │ ├── _init.scss │ │ │ └── stuff.scss │ @@ -89,15 +90,18 @@ This example structure ... │ │ └── [appname] ├─ The produced result │ │ ├── fonts │ │ │ │ └── funny_font.woff │ But be careful, never edit files here directly! -│ │ ├── img │ `hshassets` manages this directory entirely. This -│ │ │ ├── dog.png │ means that everything here will be overwritten or -│ │ │ ├── cat.png │ deleted if it shouldn't be here. Use the `assets` -│ │ │ └── mouse.png │ folder for your custom stuff. +│ │ │ | `hshassets` manages this directory entirely. This +│ │ ├── img │ means that everything here will be overwritten or +│ │ │ ├── dog.png │ deleted if it shouldn't be here. Use the `assets` +│ │ │ ├── cat.png │ folder for your custom stuff. +│ │ │ └── mouse.png │ │ │ │ │ -│ │ ├── script.js │ -│ │ ├── script.min.js │ -│ │ ├── styles.css │ -│ │ └── styles.min.css │ +│ │ ├── js ├─ Javascript won't be concatinated but minified +│ │ │ ├── foo.js │ +│ │ │ └── bar.js | +│ │ │ | +│ │ ├── styles.css ├─ Sass / Scss files will be compiled, concatinated +│ │ └── styles.min.css │ and minified. │ │ ┘ │ ├── urls.py │ ├── wsgi.py diff --git a/hshassets/templatetags/bulma.py b/hshassets/templatetags/bulma.py index 71df062709ee4e4131052c159a655d06a0654a0c..3b367eaa0ae0781158a6f32453a0ce40b92eada3 100644 --- a/hshassets/templatetags/bulma.py +++ b/hshassets/templatetags/bulma.py @@ -20,7 +20,9 @@ def bulma_form_fields(form): if field.errors: widget_classes.append("is-danger") # done - field.field.widget.attrs["class"] = " ".join(widget_classes) + if field.field.widget.attrs.get('class'): + widget_classes.append(field.field.widget.attrs['class']) + field.field.widget.attrs['class'] = " ".join(widget_classes) if getattr(form, 'layout', None): output = render_layout(form.layout, form) else: