Source code for file.models.associated_files

from onegov.core.orm.abstract import associated
from onegov.file.models.file import File


[docs] class AssociatedFiles: """ Use this mixin if uploaded files belong to a specific instance """
[docs] files = associated(File, 'files', 'one-to-many')
[docs] class MultiAssociatedFiles: """ Use this mixin if uploaded files can belong to any number of instances """
[docs] files = associated(File, 'files', 'many-to-many')