mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Renamed /:memory: to /_memory, with redirects - closes #1205
This commit is contained in:
parent
382e9ecd1d
commit
1600d2a3ec
10 changed files with 65 additions and 34 deletions
|
|
@ -138,7 +138,7 @@ class DatabaseView(DataView):
|
|||
"metadata": metadata,
|
||||
"allow_download": self.ds.setting("allow_download")
|
||||
and not db.is_mutable
|
||||
and database != ":memory:",
|
||||
and not db.is_memory,
|
||||
},
|
||||
(f"database-{to_css_class(database)}.html", "database.html"),
|
||||
)
|
||||
|
|
@ -160,7 +160,7 @@ class DatabaseDownload(DataView):
|
|||
raise DatasetteError("Invalid database", status=404)
|
||||
db = self.ds.databases[database]
|
||||
if db.is_memory:
|
||||
raise DatasetteError("Cannot download :memory: database", status=404)
|
||||
raise DatasetteError("Cannot download in-memory databases", status=404)
|
||||
if not self.ds.setting("allow_download") or db.is_mutable:
|
||||
raise Forbidden("Database download is forbidden")
|
||||
if not db.path:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue