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
I am trying to build my own plugin that will extend the table template, but I think I'm stuck on some sort of conflict with other plugins that also extend the table template, like the write-ui. Logged in as root with the write-ui plugin installed, I see an 'add new row' button on my table page.
Just as a test, I made a trivial template table.html in my plugin's template/ directory:
{%extends"default:table.html"%}{%blockcontent%}
<h1>TABLE EXTRA HTML AT THE TOP OF THE CONTENT BLOCK</h1>
<p>This line renders the original block:</p>
{{ super() }}
{%endblock%}
but if I have the datasette-write-ui plugin installed, I don't see the TABLE EXTRA HTML text.
However, even with the datasette-write-ui plugin installed, if I have a row.html file in my plugin's template/ directory, this works:
{%extends"default:row.html"%}{%blockcontent%}
<h1>ROW EXTRA HTML AT THE TOP OF THE CONTENT BLOCK</h1>
<p>This line renders the original block:</p>
{{ super() }}
{%endblock%}
If I uninstall datasette-write-ui, then I see my trivial table template.
If I then reinstall the datasette-write-ui plugin, this time I still see the TABLE EXTRA HTML text but the 'Add new row' button is not rendered. If I remove the table.html file from my plugins templates/ directory without making any other changes, then the 'Add new row' button returns.
For now it's not a big deal for me, I just won't have the write-ui plugin installed while I'm using my plugin, but if there's something better I can do so my plugin can coexist with other plugins, I would appreciate any direction you can point me.
The text was updated successfully, but these errors were encountered:
I am trying to build my own plugin that will extend the table template, but I think I'm stuck on some sort of conflict with other plugins that also extend the table template, like the write-ui. Logged in as root with the write-ui plugin installed, I see an 'add new row' button on my table page.
Just as a test, I made a trivial template table.html in my plugin's template/ directory:
but if I have the datasette-write-ui plugin installed, I don't see the TABLE EXTRA HTML text.
However, even with the datasette-write-ui plugin installed, if I have a row.html file in my plugin's template/ directory, this works:
If I uninstall datasette-write-ui, then I see my trivial table template.
If I then reinstall the datasette-write-ui plugin, this time I still see the TABLE EXTRA HTML text but the 'Add new row' button is not rendered. If I remove the table.html file from my plugins templates/ directory without making any other changes, then the 'Add new row' button returns.
For now it's not a big deal for me, I just won't have the write-ui plugin installed while I'm using my plugin, but if there's something better I can do so my plugin can coexist with other plugins, I would appreciate any direction you can point me.
The text was updated successfully, but these errors were encountered: