def test_is_well_setup(self): """ Test that base parameters are Ok """ self.assertEqual(self.tutofeed.link, "/tutoriels/") reftitle = "Tutoriels sur {}".format( overridden_zds_app["site"]["literal_name"]) self.assertEqual(self.tutofeed.title, reftitle) refdescription = "Les derniers tutoriels parus sur {}.".format( overridden_zds_app["site"]["literal_name"]) self.assertEqual(self.tutofeed.description, refdescription) atom = LastTutorialsFeedATOM() self.assertEqual(atom.subtitle, refdescription)
def test_is_well_setup(self): """ Test that base parameters are Ok """ self.assertEqual(self.tutofeed.link, '/tutoriels/') reftitle = u'Tutoriels sur {}'.format( settings.ZDS_APP['site']['litteral_name']) self.assertEqual(self.tutofeed.title, reftitle) refdescription = u'Les derniers tutoriels parus sur {}.'.format( settings.ZDS_APP['site']['litteral_name']) self.assertEqual(self.tutofeed.description, refdescription) atom = LastTutorialsFeedATOM() self.assertEqual(atom.subtitle, refdescription)
from django.conf.urls import url from django.views.generic.base import RedirectView from zds.tutorialv2.views.contents import RedirectOldBetaTuto from zds.tutorialv2.views.published import DisplayOnlineTutorial, DisplayOnlineContainer, \ DownloadOnlineTutorial, RedirectContentSEO, TagsListView from zds.tutorialv2.feeds import LastTutorialsFeedRSS, LastTutorialsFeedATOM urlpatterns = [ # flux url(r'^flux/rss/$', LastTutorialsFeedRSS(), name='feed-rss'), url(r'^flux/atom/$', LastTutorialsFeedATOM(), name='feed-atom'), # view url(r'^(?P<pk>\d+)/(?P<slug>.+)/(?P<p2>\d+)/(?P<parent_container_slug>.+)/(?P<p3>\d+)/(?P<container_slug>.+)/$', RedirectContentSEO.as_view(), name='redirect_old_tuto'), url(r'^(?P<pk>\d+)/(?P<slug>.+)/(?P<parent_container_slug>.+)/(?P<container_slug>.+)/$', DisplayOnlineContainer.as_view(), name='view-container'), url(r'^(?P<pk>\d+)/(?P<slug>.+)/(?P<container_slug>.+)/$', DisplayOnlineContainer.as_view(), name='view-container'), url(r'^(?P<pk>\d+)/(?P<slug>.+)/$', DisplayOnlineTutorial.as_view(), name='view'), # downloads: url(r'^md/(?P<pk>\d+)/(?P<slug>.+)\.md$', DownloadOnlineTutorial.as_view(requested_file='md'), name='download-md'),
from django.urls import path, re_path from django.views.generic.base import RedirectView from zds.tutorialv2.views.contributors import ContentOfContributors from zds.tutorialv2.views.lists import TagsListView, ContentOfAuthor from zds.tutorialv2.views.download_online import DownloadOnlineTutorial from zds.tutorialv2.views.display import DisplayOnlineTutorial, DisplayOnlineContainer from zds.tutorialv2.views.redirect import RedirectContentSEO, RedirectOldBetaTuto from zds.tutorialv2.feeds import LastTutorialsFeedRSS, LastTutorialsFeedATOM urlpatterns = [ # flux re_path(r"^flux/rss/$", LastTutorialsFeedRSS(), name="feed-rss"), re_path(r"^flux/atom/$", LastTutorialsFeedATOM(), name="feed-atom"), # view re_path( r"^(?P<pk>\d+)/(?P<slug>.+)/(?P<p2>\d+)/(?P<parent_container_slug>.+)/(?P<p3>\d+)/(?P<container_slug>.+)/$", RedirectContentSEO.as_view(), name="redirect_old_tuto", ), re_path( r"^(?P<pk>\d+)/(?P<slug>.+)/(?P<parent_container_slug>.+)/(?P<container_slug>.+)/$", DisplayOnlineContainer.as_view(), name="view-container", ), re_path(r"^(?P<pk>\d+)/(?P<slug>.+)/(?P<container_slug>.+)/$", DisplayOnlineContainer.as_view(), name="view-container"), re_path(r"^(?P<pk>\d+)/(?P<slug>.+)/$", DisplayOnlineTutorial.as_view(), name="view"),