) urlpatterns = patterns( "", # Syndication feeds url("^feeds/posts/$", LastPosts(), name="feed_posts"), url("^feeds/topics/$", LastTopics(), name="feed_topics"), ) urlpatterns += patterns( "pybb.views", # Index, Category, Forum url("^$", IndexView.as_view(), name="index"), url("^category/(?P<pk>\d+)/$", CategoryView.as_view(), name="category"), url("^forum/(?P<pk>\d+)/$", ForumView.as_view(), name="forum"), # User url("^users/(?P<username>[^/]+)/$", UserView.as_view(), name="user"), url("^block_user/([^/]+)/$", "block_user", name="block_user"), # Profile url("^profile/edit/$", ProfileEditView.as_view(), name="edit_profile"), # Topic url("^topic/(?P<pk>\d+)/$", TopicView.as_view(), name="topic"), url("^topic/(?P<pk>\d+)/stick/$", StickTopicView.as_view(), name="stick_topic"), url("^topic/(?P<pk>\d+)/unstick/$", UnstickTopicView.as_view(), name="unstick_topic"), url("^topic/(?P<pk>\d+)/close/$", CloseTopicView.as_view(), name="close_topic"), url("^topic/(?P<pk>\d+)/open/$", OpenTopicView.as_view(), name="open_topic"), # Add topic/post url("^forum/(?P<forum_id>\d+)/topic/add/$", AddPostView.as_view(), name="add_topic"), url("^topic/(?P<topic_id>\d+)/post/add/$", AddPostView.as_view(), name="add_post"), # Post
feeds = {'posts': LastPosts, 'topics': LastTopics} urlpatterns = patterns( '', # Syndication feeds url('^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}, name='feed'), ) urlpatterns += patterns( 'pybb.views', # Index, Category, Forum url('^$', IndexView.as_view(), name='index'), url('^category/(?P<pk>\d+)/$', CategoryView.as_view(), name='category'), url('^forum/(?P<pk>\d+)/$', ForumView.as_view(), name='forum'), # User url('^users/(?P<username>[^/]+)/$', UserView.as_view(), name='user'), url('^block_user/([^/]+)/$', 'block_user', name='block_user'), # Profile url('^profile/edit/$', ProfileEditView.as_view(), name='edit_profile'), # Topic url('^topic/(?P<pk>\d+)/$', TopicView.as_view(), name='topic'), url('^topic/(?P<pk>\d+)/stick/$', StickTopicView.as_view(), name='stick_topic'), url('^topic/(?P<pk>\d+)/unstick/$', UnstickTopicView.as_view(),
from views import IndexView, CategoryView, ForumView, TopicView, AddPostView, EditPostView,\ UserView, PostView, DeletePostView, StickTopicView, UnstickTopicView,\ CloseTopicView, OpenTopicView, ModeratePost urlpatterns = patterns('', # Syndication feeds url('^feeds/posts/$', LastPosts(), name='feed_posts'), url('^feeds/topics/$', LastTopics(), name='feed_topics'), ) urlpatterns += patterns('pybb.views', # Index, Category, Forum url('^$', IndexView.as_view(), name='index'), url('^category/(?P<pk>\d+)/$', CategoryView.as_view(), name='category'), url('^forum/(?P<pk>\d+)/$', ForumView.as_view(), name='forum'), # User url('^users/(?P<username>[^/]+)/$', UserView.as_view(), name='user'), url('^block_user/([^/]+)/$', 'block_user', name='block_user'), # Profile # url('^profile/edit/$', ProfileEditView.as_view(), name='edit_profile'), # Topic url('^topic/(?P<pk>\d+)/$', TopicView.as_view(), name='topic'), url('^topic/(?P<pk>\d+)/stick/$', StickTopicView.as_view(), name='stick_topic'), url('^topic/(?P<pk>\d+)/unstick/$', UnstickTopicView.as_view(), name='unstick_topic'), url('^topic/(?P<pk>\d+)/close/$', CloseTopicView.as_view(), name='close_topic'), url('^topic/(?P<pk>\d+)/open/$', OpenTopicView.as_view(), name='open_topic'),
from django.conf.urls.defaults import patterns, include, url from django.contrib import admin admin.autodiscover() from views import ForumView, AddPostView urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), # Intercept the following views from pybb url('^forum/$', ForumView.as_view(), name='global_forum'), url('^forum/(?P<forum_id>\d+)/topic/add/$', AddPostView.as_view(), name='add_topic'), (r'^', include('pybb.urls', namespace='pybb')), (r'^accounts/', include('registration_backends.community_discussions.urls')), )
from django.conf.urls import patterns, url from views import ForumView, LatestNewsFeed from django.conf import settings FORUM_ID = getattr(settings, 'PYBB_NEWS_FORUM_ID', 1) PAGE_SIZE = getattr(settings, 'PYBB_NEWS_PAGE_SIZE', 10) urlpatterns = patterns( '', url(r'^$', ForumView.as_view(), {'pk': FORUM_ID}, name='list'), url(r'^feed/$', LatestNewsFeed(), name='feed'), )
from django.conf.urls import patterns, url from views import ForumView, LatestNewsFeed from django.conf import settings FORUM_ID = getattr(settings, 'PYBB_NEWS_FORUM_ID', 1) PAGE_SIZE = getattr(settings, 'PYBB_NEWS_PAGE_SIZE', 10) urlpatterns = patterns('', url(r'^$', ForumView.as_view(), {'pk': FORUM_ID}, name='list'), url(r'^feed/$', LatestNewsFeed(), name='feed'), )
return feeds[url]()(request) except: raise Http404 urlpatterns = patterns('', # Syndication feeds url('^feeds/(?P<url>.*)/$', feed, name='feed'), ) urlpatterns += patterns('pybb.views', # Index, Category, Forum url('^$', IndexView.as_view(), name='index'), url('^category/(?P<pk>\d+)/$', CategoryView.as_view(), name='category'), url( '^forum/((?P<pk>\d+)|(?P<slug>[-\w]+))/$', ForumView.as_view(), name='forum' ), url( '^forum/(?P<id>\d+)/$', 'redirect_forum', name='redirect_forum' ), url( '^forum/(?P<slug>[-\w]+)/$', ForumView.as_view(), name='forum' ), # User url('^users/(?P<username>[^/]+)/$', UserView.as_view(), name='user'), url('^block_user/([^/]+)/$', 'block_user', name='block_user'), # Profile url('^profile/edit/$', ProfileEditView.as_view(), name='edit_profile'),