Ejemplo n.º 1
0
    class Archive:
        doc = ResourceManager(type=types.DocType)
        pdf = ResourceManager(type=types.PDFType)
        text = ResourceManager(type=types.TxtType)
        sciencepapers = ResourceManager(type=types.DirType,
                                        verbose_name=_('Science Papers'))

        class Meta:
            root = settings.RELEASE_ARCHIVE_ROOT
            release_date = True
            embargo_date = True
            last_modified = True
            created = True
            published = True
            rename_pk = ('releases_release', 'id')
            rename_fks = (
                ('releases_release', 'source_id'),
                ('releases_release_facility', 'release_id'),
                ('releases_release_instruments', 'release_id'),
                ('releases_release_subject_category', 'release_id'),
                ('releases_release_subject_name', 'release_id'),
                ('releases_releasecontact', 'release_id'),
                ('releases_releaseimage', 'release_id'),
                ('releases_releasevideo', 'release_id'),
                ('releases_releasetranslation', 'release_id'),
                ('media_imagecomparison', 'release_date_owner'),
                ('media_image', 'release_date_owner'),
                ('media_video', 'release_date_owner'),
            )
            sort_fields = ['last_modified', 'release_date']
            clean_html_fields = [
                'description', 'notes', 'more_information', 'links',
                'disclaimer'
            ]
Ejemplo n.º 2
0
    class Archive:
        pdf = ResourceManager(type=types.PDFType)
        pdfsm = ResourceManager(type=types.PDFType)
        sciencepaper = ResourceManager(type=types.PDFType, verbose_name=_('Science paper'))

        class Meta:
            root = settings.SCIENCEANNOUNCEMENTS_ARCHIVE_ROOT
            release_date = True
            embargo_date = True
            last_modified = True
            created = True
            published = True
            rename_pk = ('science_scienceannouncement', 'id')
            rename_fks = (
                ('media_image', 'release_date_owner'),
                ('science_scienceannouncementimage', 'science_announcement_id'),
            )
            sort_fields = ['last_modified', 'release_date', ]
Ejemplo n.º 3
0
    class Archive:
        script = ResourceManager( type=types.PDFType, verbose_name=_( u"Broadcast Audio Track" ) )

        class Meta:
            root = settings.VIDEOS_ARCHIVE_ROOT
            release_date = False
            embargo_date = False
            last_modified = True
            created = True
            published = True
Ejemplo n.º 4
0
    class Archive:
        srt = ResourceManager( type=types.SubtitleType, verbose_name=_( u"Subtitle (srt)" ) )

        class Meta:
            root = settings.VIDEOS_ARCHIVE_ROOT
            release_date = False
            embargo_date = False
            last_modified = True
            created = True
            published = True
Ejemplo n.º 5
0
    class Archive:
        pdf = ResourceManager(type=types.PDFType)
        pdfsm = ResourceManager(type=types.PDFType)
        sciencepaper = ResourceManager(type=types.PDFType,
                                       verbose_name=_('Science paper'))

        class Meta:
            root = ANNOUNCEMENTS_ROOT
            release_date = True
            embargo_date = True
            last_modified = True
            created = True
            published = True
            rename_pk = ('announcements_announcement', 'id')
            rename_fks = (
                ('announcements_announcement', 'source_id'),
                ('announcements_announcementimage', 'announcement_id'),
                ('announcements_announcementvideo', 'announcement_id'),
                ('media_image', 'release_date_owner'),
                ('media_video', 'release_date_owner'),
                ('media_imagecomparison', 'release_date_owner'),
            )
            sort_fields = ['last_modified', 'release_date']
            clean_html_fields = ['description', 'links', 'contacts']
Ejemplo n.º 6
0
    class Archive:
        # Image formats
        original = ImageResourceManager( type=types.OriginalImageType )
        thumb = ImageResourceManager( derived='original', type=types.ThumbnailJpegType )
        news = ImageResourceManager( derived='original', type=types.NewsJpegType )
        newsmini = ImageResourceManager( derived='original', type=types.NewsMiniJpegType )
        videoframe = ImageResourceManager( derived='original', type=types.VideoFrameType )
        newsfeature = ImageResourceManager( derived='original', type=types.NewsFeatureType )
        potwmedium = ImageResourceManager( derived='original', type=types.POTWMediumThumbnailJpegType )
        thumb300y = ImageResourceManager( derived='original', type=types.Thumb300yType )
        thumb350x = ImageResourceManager( derived='original', type=types.Thumb350xType )

        script = ResourceManager( type=types.PDFType, verbose_name=_(u'Script') )

        # Small formats
        small_flash = ResourceManager( type=types.FlvType, verbose_name=_(u"Small Flash") )
        small_qt = ResourceManager( type=types.MovType, verbose_name=_(u"Small QT") )

        # Medium formats
        medium_podcast = ResourceManager( type=types.MediumPodcastType, verbose_name=_(u"Video Podcast") )  # video_podcast
        medium_mpeg1 = ResourceManager( type=types.MpegType, verbose_name=_(u"Medium MPEG-1") )  # medium_mpeg-1
        medium_flash = ResourceManager( type=types.FlvType, verbose_name=_(u"Medium Flash") )  # medium_flash

        # Large formats
        large_qt = ResourceManager( type=types.MovType, verbose_name=_(u"Large QT"), )  # large_qt
        broadcast_sd = ResourceManager( type=types.BroadcastSDType, verbose_name=_(u"Broadcast SD") )  # broadcast_sd

        # HD formats
        hd_and_apple = ResourceManager( type=types.HDAndAppleType, verbose_name=_(u"HD & Apple TV Preview") )  # hd_apple_tv
        hd_broadcast_720p50 = ResourceManager( type=types.BroadcastType, verbose_name=_(u"HD Broadcast 720p/50") )  # hd720p50_brodcast
        hd_1080p25_screen = ResourceManager( type=types.FullHDPreview1080p, verbose_name=_(u"Full HD Preview 1080p") )  # hd1080p25_screen
        hd_1080p25_broadcast = ResourceManager( type=types.BroadcastType, verbose_name=_(u"Full HD Broadcast 1080p") )  # hd1080p25_brodcast

        # Ultra HD (4k/2160p)
        ultra_hd = ResourceManager( type=types.UltraHDType, verbose_name=_(u"4K Ultra HD Preview H.264") )
        ultra_hd_h265 = ResourceManager( type=types.UltraHDH265Type, verbose_name=_(u"4K Ultra HD Preview H.265") )
        ultra_hd_broadcast = ResourceManager( type=types.UltraHDBroadcastType, verbose_name=_(u"4K Ultra HD Broadcast") )

        # Dome
        dome_8kmaster = ResourceManager( type=types.Dome8kMasterType, verbose_name=_(u"Fulldome 8k Master") )
        dome_4kmaster = ResourceManager( type=types.Dome4kMasterType, verbose_name=_(u"Fulldome 4k Master") )
        dome_2kmaster = ResourceManager( type=types.Dome2kMasterType, verbose_name=_(u"Fulldome 2k Master") )
        dome_mov = ResourceManager( type=types.DomeMovType, verbose_name=_(u"Fulldome 1.5k mov") )
        dome_preview = ResourceManager( type=types.DomePreviewType, verbose_name=_(u"Fulldome Preview") )

        # Cylindrical
        cylindrical_preview = ResourceManager(type=types.CylindricalPreviewType, verbose_name=_(u'Cylindrical VR Preview'))
        cylindrical_4kmaster = ResourceManager(type=types.Cylindrical4kMasterType, verbose_name=_(u'4k Cylindrical VR Master'))
        cylindrical_8kmaster = ResourceManager(type=types.Cylindrical8kMasterType, verbose_name=_(u'8k Cylindrical VR Master'))
        cylindrical_16kmaster = ResourceManager(type=types.Cylindrical16kMasterType, verbose_name=_(u'16k Cylindrical VR Master'))

        # VR
        vr_8k = ResourceManager(type=types.VR8kType, verbose_name=_(u'8k VR'))
        vr_4k = ResourceManager(type=types.VR4kType, verbose_name=_(u'4k VR'))

        # Broadcast formats
        hd_broadcast_720p25 = ResourceManager( type=types.BroadcastType, verbose_name=_(u"HD Broadcast 720p/25") )  # hd720p25_brodcast

        # External formats (used to import misc video types in a single format
        ext_highres = ResourceManager(type=types.LegacyVideo, verbose_name=_(u'Highres'))
        ext_playback = ResourceManager(type=types.LegacyVideo, verbose_name=_(u'Playback'))

        # Quictime VR
        qtvr = ResourceManager( type=types.MovType, verbose_name=_(u"QuickTime VR") )

        # For legacy formats (gif anis etc)
        old_video = ResourceManager( type=types.LegacyVideo, verbose_name=_(u"Legacy Video") )

        class Meta:
            root = settings.VIDEOS_ARCHIVE_ROOT
            release_date = True
            embargo_date = True
            release_date_owner = True
            last_modified = True
            created = True
            published = True
            rename_pk = ( 'media_video', 'id' )
            rename_fks = (
                ( 'announcements_announcementvideo', 'archive_item_id' ),
                ( 'media_pictureoftheweek', 'video_id' ),
                ( 'media_videoaudiotrack', 'video_id' ),
                ( 'media_videobroadcastaudiotrack', 'video_id' ),
                ( 'media_videocontact', 'video_id' ),
                ( 'media_video_facility', 'video_id' ),
                ( 'media_video', 'source_id'),
                ( 'media_video_subject_category', 'video_id' ),
                ( 'media_video_subject_name', 'video_id' ),
                ( 'media_videosubtitle', 'video_id' ),
                ( 'media_video_tagging_status', 'video_id' ),
                ( 'media_video_web_category', 'video_id' ),
                ( 'media_videoscript', 'video_id' ),
                ( 'releases_releasevideo', 'archive_item_id' ),
            )
            sort_fields = ['last_modified', 'release_date', 'priority', 'file_size']
            clean_html_fields = ['description', 'credit']
Ejemplo n.º 7
0
    class Archive:
        original = ImageResourceManager(type=types.OriginalImageType)
        publicationtiff40k = ImageResourceManager(
            derived='original', type=types.PublicationTiff40KType)
        publicationtiff25k = ImageResourceManager(
            derived='publicationtiff40k', type=types.PublicationTiff25KType)
        publicationtiff10k = ImageResourceManager(
            derived='publicationtiff25k', type=types.PublicationTiff10KType)
        publicationtiff = ImageResourceManager(derived='original',
                                               type=types.PublicationTiffType)
        large = ImageResourceManager(derived='original',
                                     type=types.LargeJpegType)
        publicationjpg = ImageResourceManager(derived='publicationtiff',
                                              type=types.PublicationJpegType)
        screen = ImageResourceManager(derived='publicationtiff',
                                      type=types.ScreensizeJpegType)
        wallpaper1 = ImageResourceManager(derived='publicationtiff',
                                          type=types.Wallpaper1Type)
        wallpaper2 = ImageResourceManager(derived='publicationtiff',
                                          type=types.Wallpaper2Type)
        wallpaper3 = ImageResourceManager(derived='publicationtiff',
                                          type=types.Wallpaper3Type)
        wallpaper4 = ImageResourceManager(derived='publicationtiff',
                                          type=types.Wallpaper4Type)
        wallpaper5 = ImageResourceManager(derived='publicationtiff',
                                          type=types.Wallpaper5Type)
        news = ImageResourceManager(derived='publicationtiff',
                                    type=types.NewsJpegType)
        newsmini = ImageResourceManager(derived='publicationtiff',
                                        type=types.NewsMiniJpegType)
        newsfeature = ImageResourceManager(derived='publicationtiff',
                                           type=types.NewsFeatureType)
        medium = ImageResourceManager(derived='publicationtiff',
                                      type=types.MediumJpegType)
        wallpaperthumbs = ImageResourceManager(
            derived='publicationtiff', type=types.WallpaperThumbnailType)
        potwmedium = ImageResourceManager(
            derived='publicationtiff', type=types.POTWMediumThumbnailJpegType)
        thumb150y = ImageResourceManager(derived='publicationtiff',
                                         type=types.Thumb150yType)
        thumb300y = ImageResourceManager(derived='publicationtiff',
                                         type=types.Thumb300yType)
        thumb350x = ImageResourceManager(derived='publicationtiff',
                                         type=types.Thumb350xType)
        thumb700x = ImageResourceManager(derived='publicationtiff',
                                         type=types.Thumb700xType)
        thumbs = ImageResourceManager(derived='publicationtiff',
                                      type=types.ThumbnailJpegType)
        banner1920 = ImageResourceManager(derived='publicationtiff',
                                          type=types.Banner1920Type)
        zoomable = ImageResourceManager(derived='original',
                                        type=types.ZoomableType)
        screen640 = ImageResourceManager(derived='publicationtiff',
                                         type=types.Screen640Type)
        portrait1080 = ImageResourceManager(derived='publicationtiff',
                                            type=types.Portrait1080Type)
        poster400y = ImageResourceManager(derived='publicationtiff',
                                          type=types.Poster400yType)

        pl_original = ImageResourceManager(type=types.OriginalImageType)
        pl_screen = ImageResourceManager(derived='pl_original',
                                         type=types.ScreensizeJpegType)
        pl_thumbs = ImageResourceManager(derived='pl_original',
                                         type=types.ThumbnailJpegType)

        eps = ResourceManager(type=types.EpsType)
        pdf = ResourceManager(verbose_name=_('PDF File'), type=types.PDFType)
        illustrator = ResourceManager(type=types.IllustratorType)
        illustrator_text = ResourceManager(
            type=types.IllustratorType,
            verbose_name=_('Illustrator File (traced text)'))

        class Meta:
            root = settings.IMAGES_ARCHIVE_ROOT
            release_date = True
            embargo_date = True
            release_date_owner = True
            last_modified = True
            created = True
            published = True
            rename_pk = ('media_image', 'id')
            rename_fks = (
                ('announcements_announcementimage', 'archive_item_id'),
                ('events_event', 'image_id'),
                ('feeds_postimage', 'archive_item_id'),
                ('internal_internalannouncementpublicimage',
                 'archive_item_id'),
                ('media_imagecolor', 'image_id'),
                ('media_imagecomparison', 'image_after_id'),
                ('media_imagecomparison', 'image_before_id'),
                ('media_imagecontact', 'image_id'),
                ('media_imageexposure', 'image_id'),
                ('media_image', 'source_id'),
                ('media_image_subject_category', 'image_id'),
                ('media_image_subject_name', 'image_id'),
                ('media_image_tagging_status', 'image_id'),
                ('media_image_web_category', 'image_id'),
                ('media_pictureoftheweek', 'image_id'),
                ('products_mountedimage', 'image_id'),
                ('products_visit', 'image_id'),
                ('programme_activity', 'key_visual_hori_de_id'),
                ('programme_activity', 'key_visual_hori_en_id'),
                ('programme_activity', 'poster_de_id'),
                ('programme_activity', 'poster_en_id'),
                ('releases_release', 'kids_image_id'),
                ('releases_releaseimage', 'archive_item_id'),
                ('releases_releasestockimage', 'archive_item_id'),
                ('science_scienceannouncementimage', 'archive_item_id'),
            )
            sort_fields = [
                'last_modified', 'release_date', 'priority', 'file_size',
                'distance_ly'
            ]
            crop_display_format = 'thumb300y'
            clean_html_fields = ['description', 'credit']