extensions-website/notifications
Anna Sirota b0bb4905b2 Reuse files as previews, icons or featured images (#161)
Now it should be be possible to:

* upload the same image as a preview or featured image on different extensions;
* upload the same image as an icon on different extensions;
* select the same video/image multiple times while adding previews on Draft or Edit page: first one will be saved, the rest of the duplicates will be ignored.

If all extensions referencing the file in any way are deleted, the file remains in the database: no thumbnail generating or scanning will happen if/when the file gets re-uploaded as a preview or featured image.

In all cases of re-upload `File.user` will not change: this shouldn't be a problem because currently there's no code relying on image ownership.

Version files will remain the only exception from this changed behaviour: it will only be possible to re-upload a version file once the version itself is deleted (which also deletes its file).

As a consequence of this change `File.extension_id` is dropped, because it is no longer possible to choose which extension should be saved there.

Should take care of #157

Reviewed-on: #161
Reviewed-by: Oleg-Komarov <oleg-komarov@noreply.localhost>
2024-06-04 12:23:25 +02:00
..
management Basic email template for notifications (#96) 2024-05-02 14:04:22 +02:00
migrations Notification emails (#80) 2024-04-18 16:11:18 +02:00
templates/notifications UI: Add various improvements for layout and style on small screens 2024-05-24 17:43:45 +02:00
tests Reuse files as previews, icons or featured images (#161) 2024-06-04 12:23:25 +02:00
__init__.py Fix typo in the filename 2024-04-18 16:41:29 +02:00
admin.py Notifications: add django admin 2024-04-19 12:39:48 +02:00
apps.py Notification emails (#80) 2024-04-18 16:11:18 +02:00
models.py Notifications: add url fragment to navigate to a particular rating or review 2024-05-06 11:48:48 +02:00
signals.py Upload new version: generate approval activity item (#95) 2024-04-30 10:49:03 +02:00
urls.py Notification emails (#80) 2024-04-18 16:11:18 +02:00
views.py Notifications: prefetch related objects 2024-05-30 17:11:18 +02:00