def get_urls(self): """ Introduce more urls """ urls = super(FluentPageAdmin, self).get_urls() my_urls = patterns("", url(r"^get_layout/(?P<id>\d+)/$", self.admin_site.admin_view(self.get_layout_view))) return my_urls + urls
def get_urls(self): """ Introduce more urls """ urls = super(FluentPageAdmin, self).get_urls() my_urls = patterns( '', url(r'^get_layout/(?P<id>\d+)/$', self.admin_site.admin_view(self.get_layout_view))) return my_urls + urls
""" The URLs to serve the CMS. They can be included using: urlpatterns += patterns('', url(r'', include('fluent_pages.urls')) ) The following named URLs are defined: - fluent-page-admin-redirect - An redirect to the admin. - fluent-page - Display of a page. By Appending @admin to an URL, the request will be redirected to the admin URL of the page. """ from fluent_pages.views import CmsPageDispatcher, CmsPageAdminRedirect from fluent_pages.utils.compat import url, patterns # This urlpatterns acts as a catch-all, as there is no terminating slash in the pattern. # This allows the pages to have any name, including file names such as /robots.txt # Sadly, that circumvents the CommonMiddleware check whether a slash needs to be appended to a path. # The APPEND_SLASH behavior is implemented in the CmsPageDispatcher so the standard behavior still works as expected. urlpatterns = patterns('fluent_pages.views', url(r'^(?P<path>.*)@admin$', CmsPageAdminRedirect.as_view(), name='fluent-page-admin-redirect'), url(r'^(?P<path>.*)$', CmsPageDispatcher.as_view(), name='fluent-page-url'), url(r'^$', CmsPageDispatcher.as_view(), name='fluent-page'), )
from fluent_pages.utils.compat import patterns, url, include from django.contrib import admin urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^pages/', include('fluent_pages.urls')), )
from fluent_pages.utils.compat import patterns, url, include from django.contrib import admin urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^pages/', include('fluent_pages.urls')), )
import fluent_pages.admin # Register model from fluent_pages.utils.compat import patterns, url, include from django.contrib import admin urlpatterns = patterns( "", url(r"^admin/", include(admin.site.urls)), url(r"^404/$", "django.views.defaults.page_not_found"), url(r"", include("fluent_pages.urls")), )
import fluent_pages.admin # Register model from fluent_pages.utils.compat import patterns, url, include from django.contrib import admin urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), url(r'^404/$', 'django.views.defaults.page_not_found'), url(r'', include('fluent_pages.urls')), )
The URLs to serve the CMS. They can be included using: urlpatterns += patterns('', url(r'', include('fluent_pages.urls')) ) The following named URLs are defined: - fluent-page-admin-redirect - An redirect to the admin. - fluent-page - Display of a page. By Appending @admin to an URL, the request will be redirected to the admin URL of the page. """ from fluent_pages.views import CmsPageDispatcher, CmsPageAdminRedirect from fluent_pages.utils.compat import url, patterns # This urlpatterns acts as a catch-all, as there is no terminating slash in the pattern. # This allows the pages to have any name, including file names such as /robots.txt # Sadly, that circumvents the CommonMiddleware check whether a slash needs to be appended to a path. # The APPEND_SLASH behavior is implemented in the CmsPageDispatcher so the standard behavior still works as expected. urlpatterns = patterns( 'fluent_pages.views', url(r'^(?P<path>.*)@admin$', CmsPageAdminRedirect.as_view(), name='fluent-page-admin-redirect'), url(r'^(?P<path>.*)$', CmsPageDispatcher.as_view(), name='fluent-page-url'), url(r'^$', CmsPageDispatcher.as_view(), name='fluent-page'), )
from fluent_pages.utils.compat import patterns, url from django.http import HttpResponse def webshop_index(request): return HttpResponse("test_webshop: index_page") def webshop_article(request, slug): return HttpResponse("test_webshop: article: " + slug) urlpatterns = patterns( '', url(r'^$', webshop_index, name='webshop_index'), url(r'^(?P<slug>[^/]+)/$', webshop_article, name='webshop_article'), )
from fluent_pages.utils.compat import patterns, url from django.http import HttpResponse def webshop_index(request): return HttpResponse("test_webshop: index_page") def webshop_article(request, slug): return HttpResponse("test_webshop: article: " + slug) urlpatterns = patterns('', url(r'^$', webshop_index, name='webshop_index'), url(r'^(?P<slug>[^/]+)/$', webshop_article, name='webshop_article'), )
from fluent_pages.utils.compat import patterns, url, include urlpatterns = patterns( '', url(r'^pages/', include('fluent_pages.urls')), )
from fluent_pages.utils.compat import patterns, url, include urlpatterns = patterns( "", url(r"", include("fluent_pages.urls")), url(r"^404/$", "django.views.defaults.page_not_found") )