Skip to main content

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:

  1. Create a copy of the actual file contents in the backend.
  2. Store the path to a file which already exists in a backend.

Quick start

  1. Install the package via pip:

    pip install wagtail_admin_files
    
  2. Add 'wagtail_admin_files' to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
    ...,
       'wagtail_admin_files',
    ]
    
  3. Add the following header to your settings.py

    X_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.

Metadata

Release files for wagtail-admin-files 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-admin-files 1.0.6
File Size Uploaded
wagtail_admin_files-1.0.6.tar.gz 315.8 kB Details

Release files / wagtail_admin_files-1.0.6.tar.gz

Download URL wagtail_admin_files-1.0.6.tar.gz
Size 315.8 kB
Tags Source
SHA-256 checksum
How to use checksums
79fb027d46b0a5e8cf11a372a0872e3dcf5bd6d81b0996523cfc0237fe747388
BLAKE2b-256 checksum
How to use checksums
81c20ec327a9721f6cff0590fe4e0aa6ebaff1711c28e9047197e7c584b39077
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.6

Release history Release notifications | RSS feed

This release

1.0.6 This release

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page