<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page

from .views import ContainerList, ContainerDetail
from .views import Search
from opps.contrib.feeds.views import ContainerFeed, ChannelFeed


urlpatterns = patterns(
    '',
    url(r'^$', ContainerList.as_view(), name='home'),

    url(r'^(rss|feed)$', cache_page(settings.OPPS_CACHE_EXPIRE)(
        ContainerFeed()), name='feed'),

    url(r'^search/', Search(), name='search'),

    url(r'^(?P<long_slug>[\w\b//-]+)/(rss|feed)$',
        cache_page(settings.OPPS_CACHE_EXPIRE)(
            ChannelFeed()), name='channel_feed'),

    url(r'^(?P<channel__long_slug>[\w//-]+)/(?P<slug>[\w-]+)$',
        cache_page(settings.OPPS_CACHE_EXPIRE_DETAIL)(
            ContainerDetail.as_view()), name='open'),

    url(r'^(?P<channel__long_slug>[\w\b//-]+)/$',
        cache_page(settings.OPPS_CACHE_EXPIRE_LIST)(
            ContainerList.as_view()), name='channel'),
)
<commit_msg>Add url entry container api<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
from django.conf import settings
from django.views.decorators.cache import cache_page

from .views import ContainerList, ContainerDetail
from .views import ContainerAPIList, ContainerAPIDetail
from .views import Search
from opps.contrib.feeds.views import ContainerFeed, ChannelFeed


urlpatterns = patterns(
    '',
    url(r'^$', ContainerList.as_view(), name='home'),

    url(r'^(rss|feed)$', cache_page(settings.OPPS_CACHE_EXPIRE)(
        ContainerFeed()), name='feed'),

    url(r'^search/', Search(), name='search'),

    url(r'^(?P<long_slug>[\w\b//-]+)/(rss|feed)$',
        cache_page(settings.OPPS_CACHE_EXPIRE)(
            ChannelFeed()), name='channel_feed'),

    url(r'^(?P<channel__long_slug>[\w//-]+)/(?P<slug>[\w-]+).api$',
        cache_page(settings.OPPS_CACHE_EXPIRE_DETAIL)(
            ContainerAPIDetail.as_view()), name='open-api'),
    url(r'^(?P<channel__long_slug>[\w//-]+)/(?P<slug>[\w-]+)$',
        cache_page(settings.OPPS_CACHE_EXPIRE_DETAIL)(
            ContainerDetail.as_view()), name='open'),

    url(r'^(?P<channel__long_slug>[\w\b//-]+).api$',
        cache_page(settings.OPPS_CACHE_EXPIRE_LIST)(
            ContainerAPIList.as_view()), name='channel-api'),
    url(r'^(?P<channel__long_slug>[\w\b//-]+)/$',
        cache_page(settings.OPPS_CACHE_EXPIRE_LIST)(
            ContainerList.as_view()), name='channel'),
)

{'fraction_non_alphanumeric': 0.18891491022638562, 'fraction_numerical': 0.00078064012490242, 'mean_word_length': 4.035363457760314, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5684536', 'n_tokens_mistral': 898, 'n_tokens_neox': 876, 'n_words': 127}