Skip to content

Releases: wrabit/django-cotton

v1.5.2

10 Jan 13:23
Compare
Choose a tag to compare

Allow valid json to be passed inside attributes

  • Handle attributes containing quoted spaces by @wrabit in #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:

Full Changelog: v1.5.1...v1.5.2

v1.5.1

06 Dec 13:29
4107d13
Compare
Choose a tag to compare

COTTON_BASE_DIR to set project base location

  • Don't rely on existence of BASE_DIR settings variable. by @fbinz in #234

New Contributors

Full Changelog: v1.5.0...v1.5.1

v1.5.0

29 Nov 12:13
f41d300
Compare
Choose a tag to compare

Support shorthand alpine.js x-bind with ::

Full Changelog: v1.4.0...v1.5.0

v1.4.0

28 Nov 17:08
5efbfbe
Compare
Choose a tag to compare

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: v1.3.0...v1.4.0

v1.3.0

03 Nov 13:51
82105da
Compare
Choose a tag to compare

Support hyphenated filenames

  • added support for hyphenated component filenames by @wrabit in #214

This introduces a new config option as detailed in the docs: https://django-cotton.com/docs/configuration.

Summary

<c-my-button />

Filepath before: cotton/my_button.html

Filepath after: cotton/my-button.html
(with COTTON_SNAKE_CASED_NAMES = False)

What else

  • raise value error when multiple c-vars provided by @wrabit in #213

Cotton only supports a maximum of 1 c-vars tag per component. Some user's reach for using multiple, which is not currently supported. To ensure this is clear, cotton now raises an exception when it detects more than one c-vars in a component.

Full Changelog: v1.2.1...v1.3.0

v1.2.1

16 Oct 12:18
Compare
Choose a tag to compare

What's Changed

  • Fixes direct rendering components that use cvars, referenced in #201, by @wrabit in #202

Full Changelog: v1.2.0...v1.2.1

v1.2.0

11 Oct 20:15
d2ec298
Compare
Choose a tag to compare

What's Changed

  • Supports dynamic components with only context isolation by @wrabit in #197

Full Changelog: v1.1.3...v1.2.0

v1.1.3

09 Oct 07:14
Compare
Choose a tag to compare

What's Changed

  • Prevent loader from modifying Engine.dirs by @alorence in #191
  • added docs about the new 'only' attribute by @wrabit in #185

New Contributors

Full Changelog: v1.1.2...v1.1.3

v1.1.2

06 Oct 09:56
5fac6ec
Compare
Choose a tag to compare

What's Changed

  • only support for isolating context by @mattbha in #174
  • Makes tooling more deterministic @mattbha in #175
  • Additional Test for HTMX vals support - added another test by @mattbha in #177
  • Removes some unused deps, files and imports by @wrabit in #178

Full Changelog: v1.1.1...v1.1.2

v1.1.1

29 Sep 19:53
Compare
Choose a tag to compare

Bug fix

  • Enabled multiline tags in manual setup.

Full Changelog: v1.1.0...v1.1.1