datasette / datasette-write-ui

A Datasette plugin that adds UI elements to edit, insert, or delete rows in SQLite tables
Apache License 2.0
15 stars 2 forks source link

Setting `base_url` breaks Datasette in surprising ways #18

Closed simonw closed 10 months ago

simonw commented 10 months ago

https://github.com/datasette/datasette-write-ui/blob/d7c4d54b1d808f7a292af83dce74b83f6a7aaf3f/datasette_write_ui/__init__.py#L16-L23

The problem with setting base_url is that it over-rides the Datasette base_url variable, set here: https://github.com/simonw/datasette/blob/943df09dcca93c3b9861b8c96277a01320db8662/datasette/app.py#L1209

Which results in things like URLs to static assets coming out as -/static/ instead of /-/static.

simonw commented 10 months ago

Here's the commit that caused the problem: https://github.com/datasette/datasette-write-ui/commit/9a7b1c9c314592e4986ac8696d926b87715c89b4

asg017 commented 10 months ago

Merged and deploy your fix in 0.0.1a8, sorry about that!