Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModelAdmin mixins for the FileModel #111

Open
jayvdb opened this issue Aug 25, 2020 · 2 comments
Open

ModelAdmin mixins for the FileModel #111

jayvdb opened this issue Aug 25, 2020 · 2 comments
Assignees

Comments

@jayvdb
Copy link

jayvdb commented Aug 25, 2020

I like to have Django admin support for all models in DEBUG mode, as it helps understanding of the data model, making onboarding new devs easier.

The initial mixin could put the entire model into "read only" mode within Django admin - that is still useful.

Full edit support is easy for a text based file store.

The main field where editing is useful would be the mimetype. Sometimes that needs to be made more precise, e.g. using newly defined mimetypes like application/vnd.open-api+yaml for old files which were a normal yaml mimetype.

Widgets for uploading raw binary data is a bit tricky, but is possible. e.g. https://stackoverflow.com/questions/58529099/adding-file-upload-widget-for-binaryfield-to-django-admin

However the admin for the FileModel could simply disable "add" until there is some way to upload the binary file.

@Aagam41
Copy link
Owner

Aagam41 commented Jan 16, 2024

Hello,

I've been going through the idea you shared, and I find it quite intriguing!

To move things forward, would you be interested in submitting a pull request with your implementation, or perhaps collaborating on bringing this idea to life?

Let me know if you have any questions or need guidance on the next steps. Looking forward to your active contribution!

@jayvdb
Copy link
Author

jayvdb commented Jan 16, 2024

sorry I dont use django much these days, so wont be able to help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants