Exemple #1
0
    def ready(self):
        from article.feeds import ArticleFeed
        from blog.feeds import PostFeed
        from forum.feeds import TopicFeed
        from news.feeds import NewsFeed
        from comments.feeds import CommentFeed
        from desktops.feeds import DesktopFeed
        from tweets.feeds import TweetFeed

        FeedsRegister.register_standard_feed(ArticleFeed())
        FeedsRegister.register_standard_feed(TopicFeed())
        FeedsRegister.register_standard_feed(NewsFeed())
        FeedsRegister.register_standard_feed(PostFeed())
        FeedsRegister.register_standard_feed(CommentFeed())
        FeedsRegister.register_standard_feed(DesktopFeed())
        FeedsRegister.register_standard_feed(TweetFeed())
Exemple #2
0
from django.conf.urls import url

from news.feeds import NewsFeed
from news.views import EntryListView

urlpatterns = [
    url(r'^strana/(?P<page>[0-9]+)/$',
        EntryListView.as_view(),
        name='news_list'),
    url(r'^feed/$', NewsFeed(), name='news_feed'),
]
Exemple #3
0
        r'^change_count/$',
        'news.views.change_count',
    ),
)

from news.feeds import NewsFeed, YandexFeed
#feed_dict = {'latest':NewsFeed, 'yandex':YandexFeed, }

from django.views.decorators.cache import cache_page

urlpatterns += patterns(
    '',
    url(
        r'^feeds/latest/$',
        cache_page(
            NewsFeed(),
            60 * 30,
        ),
    ),
    url(
        r'^feeds/yandex/$',
        cache_page(
            YandexFeed(),
            60 * 30,
        ),
    ),
    #    url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.Feed', {'feed_dict': feed_dict}),
    #    url(r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.Feed', {'feed_dict': feed_dict}),
)

from news.models import News
Exemple #4
0
from django.conf.urls import patterns, include, url

from news import views
from news.feeds import NewsFeed

urlpatterns = patterns('news.views',
    url(r'^$', 'index', name='index'),
    url(r'^(\d+)/$', 'newspage', name='newspage'),
    url(r'^f/$', NewsFeed(), name='newsfeed'),
    )
Exemple #5
0
from django.conf.urls.defaults import patterns, url
from news.feeds import NewsFeed, NewsByTagFeed

urlpatterns = patterns(
    'news.views',
    #Feeds
    url('^rss/$', NewsFeed(), name='news_feed'),
    url('^rss/(?P<tag_slug>[-\w]+)/$', NewsByTagFeed(), name='news_tag_feed'),
    url('^$', 'news_list', name='news_list'),
    url('^(?P<slug>[-\w]+)/$', 'news_detail', name='news_detail'),
    url('^(?P<slug>[-\w]+)/subscribe/$',
        'news_comment_subscribe',
        name='news_comment_subscribe'),
    url('^(?P<slug>[-\w]+)/unsubscribe/$',
        'news_comment_unsubscribe',
        name='news_comment_unsubscribe'),
    url('^tag/(?P<tag_slug>[-\w]+)/$', 'news_list', name='news_tag_list'),
)