Release Notes — v0.2.16 (July 10, 2026)


1. Custom url_name — Decouple URL Names from Model Names

Status: Committed
Plan: .kilo/plans/1783698278672-custom-url-name-support.md

Views can now specify a custom url_name class attribute to decouple URL pattern names from the auto-derived model._meta.model_name. When url_name is set, all URL name generation methods use the custom prefix instead of the model name. When not set (default), behavior is unchanged.

Motivation

Previously, URL names were strictly derived from model names (e.g., purchaseorder_list, purchaseorder_detail), creating a hard coupling between database model names and Django URL patterns. With url_name, developers can:

  • Create multiple view sets for the same model with different URL names and configurations
  • Decouple URL naming from model naming for cleaner URL structures
  • Use URL names that better reflect business domain rather than database schema

Usage

python
class OrderListView(BaseListView):
    model = PurchaseOrder
    url_name = "orders"  # Generates: orders_list, orders_detail, orders_create, orders_delete

class AdminOrderListView(BaseListView):
    model = PurchaseOrder
    url_name = "admin_orders"  # Generates: admin_orders_list, admin_orders_detail, ...

Changes

Core: UrlMixin (enezaframework/views/mixins.py:932)

Added url_name = None class attribute and _get_url_prefix() helper method:

python
class UrlMixin:
    url_name = None

    def _get_url_prefix(self):
        return self.url_name or self.model._meta.model_name

All four URL-name methods updated to use _get_url_prefix(): - get_detail_url_name() → f"{self._get_url_prefix()}_detail" - get_list_url_name() → f"{self._get_url_prefix()}_list" - get_create_url_name() → f"{self._get_url_prefix()}_create" - get_delete_url_name() → f"{self._get_url_prefix()}_delete"

Views That Automatically Benefit (inherit UrlMixin)

  • BaseListView, BaseDetailView, BaseCreateView
  • BaseInlineListView, BaseInlineDetailView, BaseInlineCreateView
  • BaseInlineOneToOneDetailView
  • All journal and journal-line list/detail/create views

Views Updated Individually (do NOT inherit UrlMixin)

Class File Method Updated
BaseDeleteView base.py:515 get_success_url()
BaseParameter base.py:544 get_parameter_url_name()
BaseInlineDeleteView baseinline.py:612 get_success_url()
BasejournalsDeleteView baseJournals.py:316 get_success_url()
BaseJournalsLinesDeleteView basejournalslines.py:481 get_success_url()
BaseAction baseactions.py:22 get_detail_url()

Each class received url_name = None attribute and the pattern url_prefix = self.url_name or self.model._meta.model_name in its URL construction.

Backward Compatibility

  • Views without url_name set continue to use model._meta.model_name — identical behavior to before.
  • No migration, data, or template changes required. URL names flow through existing template context variables (detail_url_name, list_url_name, etc.).

Files changed: 7 files.


2. Rich Text Editor Not Initializing in Inline Forms After Save

Status: Committed

When an inline form was submitted via fetch() API (not HTMX), Quill rich text editors in the response HTML were not being initialized, leaving rich text fields displaying as raw HTML without the WYSIWYG editor.

Root Cause

Inline templates (inline_update_partial.html, inline_create_partial.html, inline_details_partial.html, and their _add_con variants) use fetch() with manual innerHTML assignment for form submissions, bypassing HTMX's swap lifecycle. The quill_editor.html template registers Quill editor initialization on the htmx:afterSettle event — which never fires for manual DOM manipulation.

Fix

Added initQuillEditors() call alongside the existing initTomSelects() call in the .then() callback of all 7 inline form templates, immediately after innerHTML assignment and htmx.process():

javascript
.then(function(html) {
    var target = document.getElementById('{{related_object_container_name}}-content');
    if (target) {
        target.innerHTML = html;
        if (typeof htmx !== 'undefined') htmx.process(target);
        if (typeof initTomSelects === 'function') initTomSelects(target);
        if (typeof initQuillEditors === 'function') initQuillEditors();  // ADDED
    }
})

Affected Templates

Template Directory
inline_update_partial.html core/partials/
inline_create_partial.html core/partials/
inline_details_partial.html core/partials/
inline_create_add_con_partial.html core/partials/
inline_details_add_con_partial.html core/partials/
inline_create_partial.html setups/partials/
inline_details_partial.html setups/partials/

Re-initialization Safety

initQuillEditors() is idempotent — it checks for existing .ql-editor elements and window.quillInstances registry entries before creating new Quill instances. Calling it multiple times (e.g., on both initial load and after HTMX swap) is safe.

Files changed: 7 template files.


3. Version Bump

  • setup.py: Version bumped from 0.2.15 → 0.2.16.

Summary

Area Description Files
Custom URL Names url_name attribute on views decouples URL pattern names from model names; added to UrlMixin and 6 non-UrlMixin view classes 7
Inline Rich Text Fix initQuillEditors() call added to inline form fetch response handlers; Quill editors now reinitialize after inline form saves 7
Versioning Version bumped to 0.2.16 1
Plan Document Feature architecture document for custom URL name support 1

Total: 15 files changed (7 views + 7 templates + 1 setup + 1 plan document), 135 insertions, 13 deletions.


v0.2.15 was a version-number-only bump with no functional changes. All new functionality described here was introduced in v0.2.16.