Django-cotton

Latest version: v1.5.1

Safety actively analyzes 688126 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 10

1.2.1

What's Changed
* Fixes direct rendering components that use cvars, referenced in 201, by wrabit in https://github.com/wrabit/django-cotton/pull/202


**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.2.0...v1.2.1

1.2.0

What's Changed
* Supports dynamic components with `only` context isolation by wrabit in https://github.com/wrabit/django-cotton/pull/197


**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.1.3...v1.2.0

1.1.3

What's Changed

* Prevent loader from modifying Engine.dirs by alorence in https://github.com/wrabit/django-cotton/pull/191
* added docs about the new 'only' attribute by wrabit in https://github.com/wrabit/django-cotton/pull/185

New Contributors
* alorence made their first contribution in https://github.com/wrabit/django-cotton/pull/191

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.1.2...v1.1.3

1.1.2

What's Changed
* `only` support for isolating context by mattbha in https://github.com/wrabit/django-cotton/pull/174
* Makes tooling more deterministic mattbha in https://github.com/wrabit/django-cotton/pull/175
* Additional Test for HTMX vals support - added another test by mattbha in https://github.com/wrabit/django-cotton/pull/177
* Removes some unused deps, files and imports by wrabit in https://github.com/wrabit/django-cotton/pull/178


**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.1.1...v1.1.2

1.1.1

Bug fix
* Enabled multiline tags in manual setup.

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.1.0...v1.1.1

1.1.0

New compilation technique, possible minor breaking changes, performance summary

🫳 Dropped BS4 (BeautifulSoup4) for HTML parsing in the compilation step.

This was due to:

- Increasing number of patches to control BS4's parsing and validating of the HTML
- Inability to support some planned features of cotton, without some extensive patching of BS4 base classes, specifically for now [supporting quoteless attributes](https://github.com/wrabit/django-cotton/discussions/141)

⚠️ Minor changes:

- Attribute casing is now preserved. `<div SomeAttribute="1">` would have previously been lowercased.
- Whitespace behaviour is now more in-line with your template, this should not affect the view, but may affect things like tests if you have any changing HTML
- Whitespacing around attributes in some of the tags have changed which again may affect tests

🏎️ Performance summary

A fix for a [recent issue](165) allowed us to improve performance and we're now on par with (and sometimes outperforming) Django for the render load tests. (scope of tests have room for improving)


Running benchmarks with 5 runs, 5000 iterations each
---
Native Django {% for %} loop: 38.59 ms
Cotton equivalent: 28.34 ms
---
Native {% include %}: 28.64 ms
Cotton equivalent: 28.98 ms
---
Native {% block %} and {% extends %}: 90.44 ms
Cotton equivalent: 103.65 ms


**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.0.12...v1.1.0

Page 2 of 10

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.