A Django app that wraps Filemanager from Core Five Labs, adding lots of Djangoy goodness
Installing
Install the package:
pip install django-filemanager
Add it to your installed apps:
INSTALLED_APPS += (
'filemanager',
)
Set a few config options:
FILEMANAGER_UPLOAD_ROOT = MEDIA_ROOT + 'uploads/' FILEMANAGER_UPLOAD_URL = MEDIA_URL + 'uploads/'
And include its URLs:
# in urls.py
urlpatterns += patterns("",
(r"^filemanager/", include("filemanager.urls")),
)
Now, send a user to /filemanager/ and they will be able to manage file uploads on the server.
Configuring
The following options are supported:
- FILEMANAGER_UPLOAD_URL
The URL that uploaded files will be served from. This should be the MEDIA_URL with an optional suffix. The suffix should be the same as that used in the FILEMANAGER_UPLOAD_ROOT in most instances. For example:
FILEMANAGER_UPLOAD_URL = MEDIA_URL + '/uploads/'
- FILEMANAGER_UPLOAD_ROOT
The directory that uploaded files should be saved to. This should be the MEDIA_ROOT with an optional suffix. The suffix should be the same as that used in the FILEMANAGER_UPLOAD_URL in most instances. For example:
FILEMANAGER_UPLOAD_ROOT = MEDIA_ROOT + '/uploads/'
- FILEMANAGER_AUTH_CALLBACK
Either a callable, or a dotted Python import path to a callable, that checks if a user is authorised to use the Filemanager. Three default callbacks are supplied:
'filemanager.auth.allow_all': Allow all users to use the filemanager.
'filemanager.auth.require_staff': Only allow staff members (users with the staff attribute).
'filemanager.auth.require_superuser': Only allow superusers (users with the superuser attribute).
The default is to only allow staff members.
If you want to write your own, it must be a callable that takes a Request object and returns a boolean:
# in myapp.auth def check_filemanager_auth(request): return request.user.has_perm('...'): # in settings.py FILEMANAGER_AUTH_CALLBACK = 'myapp.auth.check_filemanager_auth'
Metadata
Release files for django-filemanager-tjh 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django-filemanager-tjh-0.6.0.tar.gz | 772.3 kB | Without provenance | Details for django-filemanager-tjh-0.6.0.tar.gz |
Release files / django-filemanager-tjh-0.6.0.tar.gz
| Download URL | django-filemanager-tjh-0.6.0.tar.gz |
|---|---|
| Size | 772.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b82142f618afdfc942033c65a08df79024c7946bfc7e801ed3d143504944ded
|
|
BLAKE2b-256 checksum How to use checksums |
1a3855a2e3c6ef7d6b5553f86af939f8152aacdbd3513c1e698ddaa5d544f606
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django-filemanager-tjh 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.