On Fri, May 08, 2020 at 06:47:22PM -0700, Dorian LE NET wrote:
> Let's say I have a django app where users can display images by choosing 
> among infinite parameters through a form. These images do not exist before 
> the user generate them as they are built accordingly to its selection of 
> parameters. Such images are dynamically and internally generated. Then they 
> are neither static nor uploaded by users.
> 
> 
> How should I store such images ? As *static* images, as *media* images or 
> as a customized category ?
> 
> 
> As images are internally generated and not uploaded by users, it does not 
> seem necessary to use the file storage systems and the /media/ location. 
> But it does not seem clever to use the /static/ directory either, as many 
> images will be added (and removed) - they are not static by definition.
> 
> 
> I would also like to use a model that contains these images and other 
> information about them. What model field class should I use to handle them 
> ? As the images are not uploaded by users models.ImageField does not seem 
> appropriate.

My rule of thumb is that if an image is referenced in the database then
it goes under "media".

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20200512144027.GF29564%40fattuba.com.

Reply via email to