예제 #1
0
    # Django admin
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include('cms.urls')),

    # Test pages
    url(r'^500test/$', view=Http500View.as_view()),
    url(r'^403/$', 'django.views.defaults.permission_denied'),
    url(r'^404/$', 'django.views.defaults.page_not_found'),
    url(r'^500/$', 'django.views.defaults.server_error'),

    # SEO API's
    url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap',
        {'sitemaps': sitemaps}),
    url(
        r'^robots.txt$',
        TextFileView.as_view(content_type='text/plain',
                             template_name='robots.txt')),

    # CMS modules
    # TODO: add your urls here
)

if settings.DEBUG:
    urlpatterns.insert(
        0,
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT,
            'show_indexes': True
        }))
    urlpatterns.insert(
        0,
        url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {
예제 #2
0
urlpatterns = [
    # Django admin
    url(r'^admin/', include(admin.site.urls)),
    url(r'^admin/filebrowser/', include(fb_site.urls)),
    url(r'^admin/util/tools/', include('admin_tools.urls')),

    # Test pages
    url(r'^500test/$', view=Http500View.as_view()),
    url(r'^403/$', 'django.views.defaults.permission_denied'),
    url(r'^404/$', 'django.views.defaults.page_not_found'),
    url(r'^500/$', 'django.views.defaults.server_error'),

    # SEO API's
    url(r'^sitemap.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
    url(r'^robots.txt$', TextFileView.as_view(content_type='text/plain', template_name='robots.txt')),

    # Monitoring API's
    url(r'^api/ping/', include('ping.urls')),

    # CMS modules
    # TODO: add your urls here
]

if settings.DEBUG:
    # For runserver, also host the media files
    # Sass files are exported so browsers can open the Sass sources via sourcemaps.
    urlpatterns = [
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
        url(r'^sass/(?P<path>.*)$', 'django.views.static.serve', {'document_root': path.join(settings.SRC_DIR, 'frontend', 'sass'), 'show_indexes': True}),
    ] + urlpatterns
예제 #3
0
    "",
    # Django admin
    url(r"^admin/doc/", include("django.contrib.admindocs.urls")),
    url(r"^admin/", include(admin.site.urls)),
    url(r"^admin/filebrowser/", include(fb_site.urls)),
    url(r"^admin/util/tags/", include("taggit_autocomplete_modified.urls")),
    url(r"^admin/util/tools/", include("admin_tools.urls")),
    url(r"^admin/util/tinymce/", include("tinymce.urls")),
    # Test pages
    url(r"^500test/$", view=Http500View.as_view()),
    url(r"^403/$", "django.views.defaults.permission_denied"),
    url(r"^404/$", "django.views.defaults.page_not_found"),
    url(r"^500/$", "django.views.defaults.server_error"),
    # SEO API's
    url(r"^sitemap.xml$", "django.contrib.sitemaps.views.sitemap", {"sitemaps": sitemaps}),
    url(r"^robots.txt$", TextFileView.as_view(content_type="text/plain", template_name="robots.txt")),
    # CMS modules
    url(r"^blog/comments/", include("fluent_comments.urls")),
    url(r"", include("fluent_pages.urls")),
)

if settings.DEBUG:
    urlpatterns.insert(
        0,
        url(
            r"^media/(?P<path>.*)$",
            "django.views.static.serve",
            {"document_root": settings.MEDIA_ROOT, "show_indexes": True},
        ),
    )