-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Low prioritySomething which is nice to have, but not urgent.Something which is nice to have, but not urgent.enhancementNew feature or requestNew feature or request
Description
It would be good if we modified PiccoloCRUD, so it could accept a media_storage argument (like create_admin does in Piccolo Admin).
PiccoloCRUD(
Movie,
media_columns=[
LocalMediaStorage(Movie.poster, media_path='/srv/media/movie_posters/')
]
)We could then add a new GET parameter called something like __media_urls, which then auto adds the URL to the response for accessing the media.
GET /1/?__media_urls
{
'id': 1,
'name': 'Star Wars',
'poster': 'some-file-abc-123.jpg',
'poster_url': '/media/some-file-abc-123.jpg',
}
Once this is in place, we can refactor Piccolo Admin slightly, so it passes the media_storage argument to PiccoloCRUD, and lets PiccoloCRUD do all of the heavy lifting.
Metadata
Metadata
Assignees
Labels
Low prioritySomething which is nice to have, but not urgent.Something which is nice to have, but not urgent.enhancementNew feature or requestNew feature or request