EmilStenstrom / django-components

Create simple reusable template components in Django.
MIT License
953 stars 59 forks source link

feat: Allow multiple slots with the same name in the same template #457

Closed JuroOravec closed 2 weeks ago

JuroOravec commented 3 weeks ago

One more for today. I will publish the fixes after this.

With the current implementation it's safe to allow multiple slots with same name in the same template. See this thread for context https://github.com/EmilStenstrom/django-components/discussions/419#discussioncomment-9209027.

Enabling it was easy - just removing an error path. I added a few tests, also for tricky parts like duplicate slots in loops and nested in fills.