You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: start_app urlpattern formatting (add leading comma+newline)
fix: eliminate runtime partials/templatetags dependency from CRUD
- Replace partials/table.html with inline table HTML in build_blueprint_context
- Delete partials/table.html, partials/pagination.html, templatetags/falco_cli.py
- CRUD now uses cotton pagination component instead of partial include
- Inline table with explicit field references, heroicons for booleans/actions
- Inject project_name derived from settings.ROOT_URLCONF
{{% if {model_name_lower}s_page.paginator.num_pages > 1 %}}
475
-
{{% include "partials/pagination.html" with page={model_name_lower}s_page %}}
476
-
{{% endif %}}
477
-
""",
478
-
"table_block": f"""
479
-
{{% if {model_name_lower}s_page.object_list %}}
480
-
{{% include "partials/table.html" with objects={model_name_lower}s_page.object_list fields=fields detail_view="{app_label}:{detail_view_name}" delete_view="{app_label}:{delete_view_name}" update_view="{app_label}:{update_view_name}" %}}
481
-
{{% else %}}
482
-
<p class="mt-8">There are no {django_model["verbose_name_plural"]}. <a class="hover:underline cursor-pointer" href="{create_view_url}">Create one now?</a> </p>
483
-
{{% endif %}}
484
-
""",
529
+
"pagination_block": (
530
+
f'{{% if {model_name_lower}s_page.paginator.num_pages > 1 %}}'
531
+
f'<c-pagination page={model_name_lower}s_page />'
532
+
f'{{% endif %}}'
533
+
),
534
+
"table_block": (
535
+
f'{{% if {model_name_lower}s_page.object_list %}}'
536
+
f'<div class="overflow-x-auto">'
537
+
f'<table class="table">'
538
+
f'<caption>A list of {django_model["verbose_name_plural"]}.</caption>'
539
+
f'<thead><tr>{table_headers}</tr></thead>'
540
+
f'<tbody>'
541
+
f'{{% for object in {model_name_lower}s_page.object_list %}}'
542
+
f'<tr>{table_cells}{actions_cell}</tr>'
543
+
f'{{% endfor %}}'
544
+
f'</tbody>'
545
+
f'</table>'
546
+
f'</div>'
547
+
f'{{% else %}}'
548
+
f'<p class="mt-8">There are no {django_model["verbose_name_plural"]}. <a class="hover:underline cursor-pointer" href="{create_view_url}">Create one now?</a> </p>'
0 commit comments