(self, lang=None)
return media
Somewhat counterituitively, this contains all media in the app EXCEPT app-level media (logos).
Somewhat counterituitively, this contains all media in the app EXCEPT app-level media (logos).
Somewhat counterituitively this contains all media in the app EXCEPT app - level media ( logos ) .
def all_media(self, lang=None):
        """
            Somewhat counterituitively, this contains all media in the app EXCEPT app-level media (logos).
        """
        media = []
        self.media_form_errors = False

        for module in [m for m in self.get_modules() if m.uses_media()]:
            media.extend(module.all_media(lang=lang))
            for form in module.get_forms():
                try:
                    form.validate_form()
                except (XFormValidationError, XFormException):
                    self.media_form_errors = True
                else:
                    media.extend(form.all_media(lang=lang))
        return media
def all_media ( self , lang = None ) : media = [ ] self . media_form_errors = False for module in [ m for m in self . get_modules ( ) if m . uses_media ( ) ] : media . extend ( module . all_media ( lang = lang ) ) for form in module . get_forms ( ) : try : form . validate_form ( ) except ( XFormValidationError , XFormException ) : self . media_form_errors = True else : media . extend ( form . all_media ( lang = lang ) ) return media