Django-cotton

Latest version: v2.0.3

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

Scan your dependencies

Page 10 of 11

0.9.16

What's Changed
* Cotton component caching by wrabit in https://github.com/wrabit/django-cotton/pull/51

Cotton components are now cached whilst in production / `DEBUG = False`.

- The cache type is LRU with a record count of 1024 which will be cleared on app restart
- Future refinement needed to optimise the responsibility of caching in the loader
- Planned improvement of hybrid caching during development

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v0.9.15...v0.9.16

0.9.15

What's Changed
* converts hyphen var names to uderscores for access by wrabit in https://github.com/wrabit/django-cotton/pull/41

When we want to explicitly access attribute as a var which has '-' hyphens, it will be accessible by the snake case form. i.e.

html
<c-component x-data="{}" />



{{ x_data }}


**Note:** This does not affect attribute names within `{{ attrs }}` where any hyphenated name will stay hyphenated.


**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v0.9.14...v0.9.15

0.9.14

What's Changed
* Optimise cvars by wrabit in https://github.com/wrabit/django-cotton/pull/39

The vars frame is now only used when we have specified a `<c-vars />` tag in a compoent. From benchmarks, there's a ~15% performance increase:

10k components rendering:

Before:
1.71s

After:
1.39s

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v0.9.13...v0.9.14

0.9.13

What's Changed
* allow new lines in attrs by wrabit in https://github.com/wrabit/django-cotton/pull/38

We can now use multi-line attribute values, like:

html
<div x-data="{
something: true
}">
...
</div>

0.9.12

What's Changed

* Dropped suffix requirement by wrabit in https://github.com/wrabit/django-cotton/pull/32

Breaking changes:

Cotton no longer requires the `.cotton.html` suffix on component or view templates. A simple `.html` will do. This is to optimise experience and help reduce any 'project creep' the original implementation introduced.

- Rename our cotton related files, from`[filename].html.cotton` -> [fileame]`.html`
- If you have cotton in production, it's recommended to clear the Django cache

This will ensure the cache rebuilds in the next visit to the page.

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v0.9.11...v0.9.12

0.9.11

What's Changed
- Attribute ordering was not being kept during compilation which was breaking situations when we are using template expressions to govern attributes in HTML tags
* Refactor loader + keep attribute ordering by wrabit in https://github.com/wrabit/django-cotton/pull/27

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v0.9.10...v0.9.11

Page 10 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.