mirror of
https://git.cmoser.eu/tinytools/django-tinywiki.git
synced 2026-02-04 06:06:33 +01:00
2025.12.27 13:27:44 (cachyos.cmoser.eu)
This commit is contained in:
@@ -215,8 +215,9 @@ def import_builtin_images(json_file: str | Path, user=None):
|
||||
|
||||
|
||||
def import_builtin_images_from_zip(zip: str | Path, user=None):
|
||||
if isinstance(zip, str):
|
||||
if not isinstance(zip, Path):
|
||||
zip = Path(zip).resolve()
|
||||
|
||||
if not zip.exists():
|
||||
raise ValueError(f"File \"{zip}\" does not exist!")
|
||||
if not zip.isfile():
|
||||
@@ -362,6 +363,7 @@ def export_wiki_content(app: str,
|
||||
BuiltinImages.objects.create(app=app, prefix=prefix, version=image_version)
|
||||
return True
|
||||
|
||||
|
||||
def export_tinywiki_wiki_content(filename=None):
|
||||
if filename is None:
|
||||
filename = Path(django_settings.MEDIA_ROOT) / "tinywiki-tinywiki.zip"
|
||||
|
||||
Reference in New Issue
Block a user