Beispiel #1
0
 def _test_get(self):
     # The view is not registered in urls.py at the moment, so we call it
     # and render the response manually instead of letting django do it for
     # us.
     self.req = RequestFactory().get('/')
     self.req.user = AnonymousUser()
     view = WebsiteView.as_view()
     response = view(self.req)
     response.render()
     response.json = json.loads(response.content)
     return response
Beispiel #2
0
        name='feed-shelf-publish'),
    # Nix FP version once FP using consumer/feed with app_serializer=fireplace.
    url(r'^fireplace/feed/(?P<item_type>[\w]+)/(?P<slug>[^/.]+)/$',
        views.FeedElementGetView.as_view(),
        name='feed.fire_feed_element_get'),
    url(r'^consumer/feed/(?P<item_type>[\w]+)/(?P<slug>[^/.]+)/$',
        views.FeedElementGetView.as_view(),
        name='feed.feed_element_get'),
    url(r'^transonic/feed/(?P<item_type>[\w]+)/$',
        views.FeedElementListView.as_view(),
        name='feed.feed_element_list'),
    url(r'^langpacks', include(langpacks.urls)),
    url(r'^late-customization', include(latecustomization.urls)),
    url(r'^websites/search/',
        WebsiteSearchView.as_view(),
        name='website-search-api'),
    url(r'^websites/website/(?P<pk>[^/.]+)/',
        WebsiteView.as_view(),
        name='website-detail'),
    url(r'^websites/scrape/',
        WebsiteMetadataScraperView.as_view(),
        name='website-scrape'),
    url(r'^websites/submit/',
        WebsiteSubmissionViewSet.as_view({'post': 'create'}),
        name='website-submit'),
    url(r'^websites/submissions/',
        WebsiteSubmissionViewSet.as_view({'get': 'list'}),
        name='website-submissions'),
    url(r'^multi-search/', MultiSearchView.as_view(), name='multi-search-api'),
) + v1_urls
Beispiel #3
0
    url(r'^feed/shelves/(?P<pk>[^/.]+)/publish/$',
        views.FeedShelfPublishView.as_view(),
        name='feed-shelf-publish'),
    # Nix FP version once FP using consumer/feed with app_serializer=fireplace.
    url(r'^fireplace/feed/(?P<item_type>[\w]+)/(?P<slug>[^/.]+)/$',
        views.FeedElementGetView.as_view(), name='feed.fire_feed_element_get'),
    url(r'^consumer/feed/(?P<item_type>[\w]+)/(?P<slug>[^/.]+)/$',
        views.FeedElementGetView.as_view(), name='feed.feed_element_get'),
    url(r'^transonic/feed/(?P<item_type>[\w]+)/$',
        views.FeedElementListView.as_view(), name='feed.feed_element_list'),

    url(r'^games/daily/$', DailyGamesView.as_view(), name='games.daily'),

    url(r'^langpacks', include(langpacks.urls)),
    url(r'^late-customization', include(latecustomization.urls)),
    url(r'^websites/search/', WebsiteSearchView.as_view(),
        name='website-search-api'),
    url(r'^websites/website/(?P<pk>[^/.]+)/', WebsiteView.as_view(),
        name='website-detail'),
    url(r'^websites/scrape/', WebsiteMetadataScraperView.as_view(),
        name='website-scrape'),
    url(r'^websites/submit/',
        WebsiteSubmissionViewSet.as_view({'post': 'create'}),
        name='website-submit'),
    url(r'^websites/submissions/',
        WebsiteSubmissionViewSet.as_view({'get': 'list'}),
        name='website-submissions'),
    url(r'^multi-search/', MultiSearchView.as_view(),
        name='multi-search-api'),
) + v1_urls
Beispiel #4
0
    url(r'^feed/shelves/', include(subfeedshelf.urls)),
    url(r'^feed/shelves/(?P<pk>[^/.]+)/publish/$',
        views.FeedShelfPublishView.as_view(),
        name='feed-shelf-publish'),
    # Nix FP version once FP using consumer/feed with app_serializer=fireplace.
    url(r'^fireplace/feed/(?P<item_type>[\w]+)/(?P<slug>[^/.]+)/$',
        views.FeedElementGetView.as_view(), name='feed.fire_feed_element_get'),
    url(r'^consumer/feed/(?P<item_type>[\w]+)/(?P<slug>[^/.]+)/$',
        views.FeedElementGetView.as_view(), name='feed.feed_element_get'),
    url(r'^transonic/feed/(?P<item_type>[\w]+)/$',
        views.FeedElementListView.as_view(), name='feed.feed_element_list'),

    url(r'^games/daily/$', DailyGamesView.as_view(), name='games.daily'),

    url(r'^langpacks', include(langpacks.urls)),
    url(r'^websites/search/', WebsiteSearchView.as_view(),
        name='website-search-api'),
    url(r'^websites/website/(?P<pk>[^/.]+)/', WebsiteView.as_view(),
        name='website-detail'),
    url(r'^websites/scrape/', WebsiteMetadataScraperView.as_view(),
        name='website-scrape'),
    url(r'^websites/submit/',
        WebsiteSubmissionViewSet.as_view({'post': 'create'}),
        name='website-submit'),
    url(r'^websites/submissions/',
        WebsiteSubmissionViewSet.as_view({'get': 'list'}),
        name='website-submissions'),
    url(r'^multi-search/', MultiSearchView.as_view(),
        name='multi-search-api'),
) + v1_urls
Beispiel #5
0
        url(r"^feed/elements/search/$", views.FeedElementSearchView.as_view(), name="feed.element-search"),
        url(r"^feed/get/", views.FeedView.as_view(), name="feed.get"),
        url(r"^feed/", include(feed.urls)),
        url(r"^feed/apps/", include(subfeedapp.urls)),
        url(r"^feed/collections/", include(subfeedcollection.urls)),
        url(r"^feed/shelves/", include(subfeedshelf.urls)),
        url(r"^feed/shelves/(?P<pk>[^/.]+)/publish/$", views.FeedShelfPublishView.as_view(), name="feed-shelf-publish"),
        # Nix FP version once FP using consumer/feed with app_serializer=fireplace.
        url(
            r"^fireplace/feed/(?P<item_type>[\w]+)/(?P<slug>[^/.]+)/$",
            views.FeedElementGetView.as_view(),
            name="feed.fire_feed_element_get",
        ),
        url(
            r"^consumer/feed/(?P<item_type>[\w]+)/(?P<slug>[^/.]+)/$",
            views.FeedElementGetView.as_view(),
            name="feed.feed_element_get",
        ),
        url(
            r"^transonic/feed/(?P<item_type>[\w]+)/$",
            views.FeedElementListView.as_view(),
            name="feed.feed_element_list",
        ),
        url(r"^langpacks", include(langpacks.urls)),
        url(r"^websites/search/", WebsiteSearchView.as_view(), name="website-search-api"),
        url(r"^websites/website/(?P<pk>[^/.]+)/", WebsiteView.as_view(), name="website-detail"),
        url(r"^multi-search/", MultiSearchView.as_view(), name="multi-search-api"),
    )
    + v1_urls
)