An application made for the Django Web Framework.
Project description
wagtail_admin_files
Easily share files through the wagtail admin, only for admins.
Useful for easily grouping files submitted through a contact form, or files bound to another model.
SharedFile object creation can either:
- Create a copy of the actual file contents in the backend.
- Store the path to a file which already exists in a backend.
Quick start
-
Install the package via pip:
pip install wagtail_admin_files
-
Add 'wagtail_admin_files' to your INSTALLED_APPS setting like this:
INSTALLED_APPS = [ ..., 'wagtail_admin_files', ] -
Add the following header to your
settings.pyX_FRAME_OPTIONS = "SAMEORIGIN"
A settings menu item will be automatically registered.
The WAGTAIL_ADMIN_FILES_MENU_HOOK setting can be set to register the menu item to a different menu.
By default, the hook it registers to is register_settings_menu_item
Public Views
Public views are available, but can be disabled by setting WAGTAIL_ADMIN_FILES_ALLOW_PUBLIC to False in settings.py.
In this case, the admin will take over, all public views will return a 404 status code.
The public views extend base.html by default, this can be overridden by setting WAGTAIL_ADMIN_FILES_TEMPLATE_EXTENDS in settings.py to point to a different file.
The public views use the generic {% block content %}...{% endblock content %} in order to override the content block of the above mentioned WAGTAIL_ADMIN_FILES_TEMPLATE_EXTENDS file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file wagtail_admin_files-1.0.5.tar.gz.
File metadata
- Download URL: wagtail_admin_files-1.0.5.tar.gz
- Upload date:
- Size: 315.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbdc5555dc9dbd8ef523208521253c1785b5e9d34e3cc641f1f9debc19d112ef
|
|
| MD5 |
cc68ec45830f964633e01a0559f6a31f
|
|
| BLAKE2b-256 |
098722d327e7147c2278857ec307eb42acc59ce54f3d74461d721fff9e46430e
|