I've been trying to tackle the question of having object relations expire after a set period of time using Django REST framework. Here's the general idea:
*I have a view that presents a list of objects i.e. accepts GET requests to retrieve information about this list:* - These objects have a one-to-many (foreign key) relationship with another type of object - The other type of object provides useless information after 24 hours *Therefore, I'd like to be able to have these related objects disappear from the view after one day. I figure there are three possible solutions, of which I'm not sure how to implement:* 1. Have relationship expire after 24 hours 2. Related object deletes after 24 hours 3. View filters against related objects that were created >24 hours ago Has anyone carried out something similar in the past and could provide a code snippet that demonstrates performing said implementation? Thanks for your help. -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
