Django-cotton

Latest version: v2.0.3

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

Scan your dependencies

Page 2 of 11

1.6.0

Create default component with index.html

We've introduced the ability to choose a default component when calling a directory path by using an index.html.

[Docs](https://django-cotton.com/docs/usage-patterns#index)

Before:


- cotton
- card
- header.html
- card.html


<c-card.card>
<c-card.header />
</c-card.card>


After:


- cotton
- card
- header.html
- index.html


<c-card>
<c-card.header />
</c-card>


* Added index.html pattern by wrabit in https://github.com/wrabit/django-cotton/pull/256
* added docs for index.html pattern by wrabit in https://github.com/wrabit/django-cotton/pull/257


**Full Changelog**: https://github.com/wrabit/django-cotton/compare/1.5.3...1.6.0

1.5.3

Fix non-dynamic attributes on cvars

* Fixes parsing of non-dynamic attributes in cvars by wrabit in https://github.com/wrabit/django-cotton/pull/251

Previously we were still template-parsing non-dynamic attributes on `<c-vars />`. So this:

`<c-vars attribute1="None" attribute2="False" attribute3="1" />`

Would give us the python types `None`, `False`, `1` respectively. Even though if these were attributes on the component, they would have correctly been provided as strings. As raised in 249.

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.5.2...1.5.3

1.5.2

Allow valid json to be passed inside attributes
* Handle attributes containing quoted spaces by wrabit in https://github.com/wrabit/django-cotton/pull/241

Previously, passing a space inside a quoted string inside an attribute value would produce a malformed string due to the way Django understands attributes on a templatetag. Cotton's underlying component templatetag now handles this as expected.

In reference to:
- 240

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.5.1...v1.5.2

1.5.1

`COTTON_BASE_DIR` to set project base location

* Don't rely on existence of BASE_DIR settings variable. by fbinz in https://github.com/wrabit/django-cotton/pull/234

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

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.5.0...v1.5.1

1.5.0

Support shorthand alpine.js `x-bind` with `::`
* Support colon escaping - alpinejs bind shortcut support by wrabit in https://github.com/wrabit/django-cotton/pull/227
* More here: https://django-cotton.com/docs/components#alpine-js-support
* Related discussion 180


**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.4.0...v1.5.0

1.4.0

Support for top-level project root `templates`

If you are a top-level templates person, you can now place your cotton components in the project root folder. Both of these approaches are supported:

- `[project]/templates/cotton/...` (NEW)
- `[project]/[app]/templates/cotton/...`

**Full Changelog**: https://github.com/wrabit/django-cotton/compare/v1.3.0...v1.4.0

Page 2 of 11

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.