当前位置: 首页>>代码示例>>Python>>正文


Python superdesk.get_backend函数代码示例

本文整理汇总了Python中superdesk.get_backend函数的典型用法代码示例。如果您正苦于以下问题:Python get_backend函数的具体用法?Python get_backend怎么用?Python get_backend使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_backend函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: init_app

def init_app(app):

    endpoint_name = "archive_publish"
    service = ArchivePublishService(endpoint_name, backend=get_backend())
    ArchivePublishResource(endpoint_name, app=app, service=service)

    endpoint_name = "archive_kill"
    service = KillPublishService(endpoint_name, backend=get_backend())
    KillPublishResource(endpoint_name, app=app, service=service)

    endpoint_name = "archive_correct"
    service = CorrectPublishService(endpoint_name, backend=get_backend())
    CorrectPublishResource(endpoint_name, app=app, service=service)

    endpoint_name = "published"
    service = PublishedItemService(endpoint_name, backend=get_backend())
    PublishedItemResource(endpoint_name, app=app, service=service)

    endpoint_name = "archive_resend"
    service = ResendService(endpoint_name, backend=get_backend())
    ResendResource(endpoint_name, app=app, service=service)

    superdesk.privilege(name="subscribers", label="Subscribers", description="User can manage subscribers")
    superdesk.privilege(name="publish", label="Publish", description="Publish a content")
    superdesk.privilege(name="kill", label="Kill", description="Kill a published content")
    superdesk.privilege(name="correct", label="Correction", description="Correction to a published content")
    superdesk.privilege(name="publish_queue", label="Publish Queue", description="User can update publish queue")
    superdesk.privilege(name="resend", label="Resending Stories", description="User can resend published stories")
开发者ID:akintolga,项目名称:superdesk-core,代码行数:28,代码来源:__init__.py

示例2: init_app

def init_app(app):

    endpoint_name = 'archive_publish'
    service = ArchivePublishService(endpoint_name, backend=get_backend())
    ArchivePublishResource(endpoint_name, app=app, service=service)

    endpoint_name = 'archive_kill'
    service = KillPublishService(endpoint_name, backend=get_backend())
    KillPublishResource(endpoint_name, app=app, service=service)

    endpoint_name = 'archive_correct'
    service = CorrectPublishService(endpoint_name, backend=get_backend())
    CorrectPublishResource(endpoint_name, app=app, service=service)

    endpoint_name = 'published'
    service = PublishedItemService(endpoint_name, backend=get_backend())
    PublishedItemResource(endpoint_name, app=app, service=service)

    endpoint_name = 'archive_resend'
    service = ResendService(endpoint_name, backend=get_backend())
    ResendResource(endpoint_name, app=app, service=service)

    superdesk.privilege(name='subscribers', label='Subscribers', description='User can manage subscribers')
    superdesk.privilege(name='publish', label='Publish', description='Publish a content')
    superdesk.privilege(name='kill', label='Kill', description='Kill a published content')
    superdesk.privilege(name='correct', label='Correction', description='Correction to a published content')
    superdesk.privilege(name='publish_queue', label='Publish Queue', description='User can update publish queue')
    superdesk.privilege(name='resend', label='Resending Stories', description='User can resend published stories')
    superdesk.privilege(name='embargo', label='Embargo', description='User can set embargo date')
开发者ID:hlmnrmr,项目名称:superdesk-core,代码行数:29,代码来源:__init__.py

示例3: init_app

def init_app(app):
    endpoint_name = 'preferences'
    service = BaseService(endpoint_name, backend=get_backend())
    PreferencesResource(endpoint_name, app=app, service=service)
    endpoint_name = 'available_preferences'
    service = AvailablePreferencesService(endpoint_name, backend=get_backend())
    AvailablePreferencesResource(endpoint_name, app=app, service=service)
开发者ID:chupym,项目名称:superdesk-server,代码行数:7,代码来源:preferences.py

示例4: init_app

def init_app(app):
    endpoint_name = 'auth'
    service = BaseService('auth', backend=superdesk.get_backend())
    AuthResource(endpoint_name, app=app, service=service)

    service = BaseService('auth_user', backend=superdesk.get_backend())
    AuthUsersResource('auth_user', app=app, service=service)
开发者ID:jerome-poisson,项目名称:superdesk-core,代码行数:7,代码来源:__init__.py

示例5: init_app

def init_app(app):
    endpoint_name = 'saved_searches'
    service = SavedSearchesService(endpoint_name, backend=superdesk.get_backend())
    SavedSearchesResource(endpoint_name, app=app, service=service)

    endpoint_name = 'all_saved_searches'
    service = AllSavedSearchesService(endpoint_name, backend=superdesk.get_backend())
    AllSavedSearchesResource(endpoint_name, app=app, service=service)

    endpoint_name = 'saved_search_items'
    service = SavedSearchItemsService(endpoint_name, backend=superdesk.get_backend())
    SavedSearchItemsResource(endpoint_name, app=app, service=service)

    superdesk.privilege(name='global_saved_searches',
                        label='Manage Global Saved Searches',
                        description='User can manage other users\' global saved searches')
    superdesk.privilege(name='saved_searches',
                        label='Manage Saved Searches',
                        description='User can manage saved searches')
    superdesk.privilege(name='saved_searches_subscriptions',
                        label='Manage Saved Searches Subscriptions',
                        description='User can (un)subscribe to saved searches')
    superdesk.privilege(name='saved_searches_subscriptions_admin',
                        label='Manage Saved Searches Subscriptions For Other Users',
                        description='User manage other users saved searches subscriptions ')
开发者ID:jerome-poisson,项目名称:superdesk-core,代码行数:25,代码来源:__init__.py

示例6: init_app

def init_app(app):
    endpoint_name = 'desks'
    service = DesksService(endpoint_name, backend=superdesk.get_backend())
    DesksResource(endpoint_name, app=app, service=service)
    endpoint_name = 'user_desks'
    service = UserDesksService(endpoint_name, backend=superdesk.get_backend())
    UserDesksResource(endpoint_name, app=app, service=service)
开发者ID:akintolga,项目名称:superdesk-server,代码行数:7,代码来源:desks.py

示例7: init_app

def init_app(app):
    endpoint_name = 'groups'
    service = BaseService(endpoint_name, backend=superdesk.get_backend())
    GroupsResource(endpoint_name, app=app, service=service)
    endpoint_name = 'user_groups'
    service = UserGroupsService(endpoint_name, backend=superdesk.get_backend())
    UserGroupsResource(endpoint_name, app=app, service=service)
开发者ID:akintolga,项目名称:superdesk-server,代码行数:7,代码来源:groups.py

示例8: init_app

def init_app(app):
    endpoint_name = 'packages'
    service = PackageService(endpoint_name, backend=get_backend())
    PackageResource(endpoint_name, app=app, service=service)

    endpoint_name = 'packages_versions'
    service = PackagesVersionsService(endpoint_name, backend=get_backend())
    PackageVersionsResource(endpoint_name, app=app, service=service)
开发者ID:akintolga,项目名称:superdesk-server,代码行数:8,代码来源:__init__.py

示例9: init_app

def init_app(app):
    endpoint_name = 'item_comments'
    service = ItemCommentsService(endpoint_name, backend=superdesk.get_backend())
    ItemCommentsResource(endpoint_name, app=app, service=service)

    endpoint_name = 'content_item_comments'
    service = ItemCommentsSubService(endpoint_name, backend=superdesk.get_backend())
    ItemCommentsSubResource(endpoint_name, app=app, service=service)
开发者ID:jerome-poisson,项目名称:superdesk-core,代码行数:8,代码来源:item_comments.py

示例10: init_app

def init_app(app):
    endpoint_name = "subscribers"
    service = SubscribersService(endpoint_name, backend=get_backend())
    SubscribersResource(endpoint_name, app=app, service=service)

    endpoint_name = "publish_queue"
    service = PublishQueueService(endpoint_name, backend=get_backend())
    PublishQueueResource(endpoint_name, app=app, service=service)
开发者ID:ahilles107,项目名称:superdesk-core,代码行数:8,代码来源:__init__.py

示例11: init_app

def init_app(app):
    endpoint_name = 'auth'
    service = ADAuthService(endpoint_name, backend=superdesk.get_backend())
    AuthResource(endpoint_name, app=app, service=service)

    endpoint_name = ImportUserProfileResource.url
    service = ImportUserProfileService(endpoint_name, backend=superdesk.get_backend())
    ImportUserProfileResource(endpoint_name, app=app, service=service)
开发者ID:auliakausar,项目名称:superdesk-server,代码行数:8,代码来源:__init__.py

示例12: init_app

def init_app(app):
    endpoint_name = 'posts'
    service = PostsService(endpoint_name, backend=superdesk.get_backend())
    PostsResource(endpoint_name, app=app, service=service)

    endpoint_name = 'blog_posts'
    service = BlogPostService(endpoint_name, backend=superdesk.get_backend())
    BlogPostResource(endpoint_name, app=app, service=service)
开发者ID:nistormihai,项目名称:liveblog-server,代码行数:8,代码来源:__init__.py

示例13: init_app

def init_app(app):
    endpoint_name = 'legal_archive_consistency'
    service = BaseService(endpoint_name, backend=get_backend())
    LegalArchiveConsistencyResource(endpoint_name, app=app, service=service)

    endpoint_name = 'consistency'
    service = ConsistencyRecordService(endpoint_name, backend=get_backend())
    ConsistencyRecordResource(endpoint_name, app=app, service=service)
开发者ID:akintolga,项目名称:superdesk-aap,代码行数:8,代码来源:__init__.py

示例14: init_app

def init_app(app):
    endpoint_name = 'publish_items'
    service = Service(endpoint_name, backend=get_backend())
    PublicItemsResource(endpoint_name, app=app, service=service)

    endpoint_name = 'publish_packages'
    service = Service(endpoint_name, backend=get_backend())
    PublicPackagesResource(endpoint_name, app=app, service=service)
开发者ID:Flowdeeps,项目名称:superdesk-1,代码行数:8,代码来源:__init__.py

示例15: init_app

def init_app(app):
    endpoint_name = "desks"
    service = DesksService(endpoint_name, backend=superdesk.get_backend())
    DesksResource(endpoint_name, app=app, service=service)
    endpoint_name = "user_desks"
    service = UserDesksService(endpoint_name, backend=superdesk.get_backend())
    UserDesksResource(endpoint_name, app=app, service=service)
    endpoint_name = "sluglines"
    service = SluglineDeskService(endpoint_name, backend=superdesk.get_backend())
    SluglineDesksResource(endpoint_name, app=app, service=service)
开发者ID:copyfun,项目名称:superdesk,代码行数:10,代码来源:desks.py


注:本文中的superdesk.get_backend函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。