Exemple #1
0
from django.views.generic import (RedirectView, TemplateView)

from blog import urls as blog_urls
from blog.feeds import AtomPostFeed, Rss2PostFeed
from contact import urls as contact_urls
from organizer.urls import (startup as startup_urls, tag as tag_urls)
from user import urls as user_urls

from .sitemaps import sitemaps as sitemaps_dict

admin.site.site_header = 'Startup Organizer Admin'
admin.site.site_title = 'Startup Organizer Site Admin'

sitenews = [
    url(r'^atom/$', AtomPostFeed(), name='blog_atom_feed'),
    url(r'^rss/$', Rss2PostFeed(), name='blog_rss_feed'),
]

urlpatterns = [
    url(r'^$',
        RedirectView.as_view(pattern_name='blog_post_list', permanent=False)),
    url(r'^about/$',
        TemplateView.as_view(template_name='site/about.html'),
        name='about_site'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^blog/', include(blog_urls)),
    url(r'^contact/', include(contact_urls)),
    url(r'^sitemap\.xml$',
        site_index_view, {'sitemaps': sitemaps_dict},
        name='sitemap'),
    url(r'^sitemap-(?P<section>.+)\.xml$',
Exemple #2
0
from contact import urls as contact_urls
from organizer.urls import (
    startup as startup_urls, tag as tag_urls)
from user import urls as user_urls

from .sitemaps import sitemaps as sitemaps_dict

admin.site.site_header = 'Startup Organizer Admin'
admin.site.site_title = 'Startup Organizer Site Admin'

sitenews = [
    url(r'^atom/$',
        AtomPostFeed(),
        name='blog_atom_feed'),
    url(r'^rss/$',
        Rss2PostFeed(),
        name='blog_rss_feed'),
]

urlpatterns = [
    url(r'^$',
        RedirectView.as_view(
            pattern_name='blog_post_list',
            permanent=False)),
    url(r'^about/$',
        TemplateView.as_view(
            template_name='site/about.html'),
        name='about_site'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^blog/', include(blog_urls)),
    url(r'^contact/', include(contact_urls)),
Exemple #3
0
from user import urls as auth_urls
from django.contrib import admin
from organizer import urls as organizer_urls
from blog import urls as blog_urls
from contact import urls as contact_urls
from django.views.generic import TemplateView, RedirectView
from django.conf import settings
from django.urls import include, path, re_path
from blog.feeds import AtomPostFeed, Rss2PostFeed
from django.contrib.sitemaps.views import index as site_index_view, sitemap as sitemap_view
from .sitemaps import sitemaps as sitemaps_dict
from django.conf.urls.static import static

sitenews = [
    path('atom/', AtomPostFeed(), name='blog_atom_feed'),
    path('rss/', Rss2PostFeed(), name='blog_rss_feed'),
]

urlpatterns = [
    path('admin/', admin.site.urls),
    re_path(r'^', include(organizer_urls)),
    re_path(r'^', include(blog_urls)),
    re_path(r'^', include(contact_urls)),
    path('about/', TemplateView.as_view(template_name='site/about.html'), name='about_site'),
    path('', RedirectView.as_view(pattern_name='blog_post_list', permanent=False)),
    path('user/', include(auth_urls)),
    path('sitenews/', include(sitenews)),
    re_path(r'^sitemap\.xml$', site_index_view, {'sitemaps': sitemaps_dict}, name='sitemap'),
    re_path(r'^sitemap-(?P<section>.+)\.xml$', sitemap_view, {'sitemaps': sitemaps_dict}, name='sitemaps_sections'),
]
api_urls = root_api_url + blog_api_urls + organizer_api_urls


urlpatterns = [
    path("admin/", admin.site.urls),
    path("api/v1/", include(api_urls)),
    path("atom/", AtomPostFeed(), name="post_atom_feed"),
    path("blog/", include(blog_urls)),
    path(
        "o/",
        include(
            "oauth2_provider.urls",
            namespace="oauth2_provider",
        ),
    ),
    path("rss/", Rss2PostFeed(), name="post_rss_feed"),
    path(
        "sitemap.xml",
        site_index_view,
        {"sitemaps": sitemaps_dict},
        name="sitemap",
    ),
    path(
        "sitemap-<section>.xml",
        sitemap_view,
        {"sitemaps": sitemaps_dict},
        name="django.contrib.sitemaps.views.sitemap",
    ),
    path("test/", test_celery),
    path("", include(organizer_urls)),
    path(