Hello,

Here's some example code:

[code]

class Creative(...):
    ....
    file2 = models.ManyToManyField('Asset', ...)
    ....
class Asset(...):
    file = models.FileField(...)

[/code]

Can I use limit_choices_to to limit "Asset" to only the files that were 
uploaded by the currently viewed "Creative" instance?

In other words, if an uploaded file was not uploaded by the current 
instance, then I do not want to show it in the admin M2M choice filed.

Does that make sense?

I have googled around, but I have not had any luck implementing a solid 
solution. Any tips?

Thanks so much!

Cheers,
Micky

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/MlhzZ1lkS0N5WElK.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to