Example #1
0
File: www.py Project: profbiyi/site
     name='about'),
 url(r'^about/privacy/$',
     cache_page(60 * 5)(flatpage), {'url': '/about/privacy/'},
     name='privacy'),
 url(r'^about/terms/$',
     cache_page(60 * 5)(flatpage), {'url': '/about/terms/'},
     name='terms'),
 url(r'^(?P<url>shared/.*)$', flatpage),
 url(r'^contact/$',
     ContactView.as_view(success_url='/contact/',
                         template_name='pages/contact.html'),
     {'gapi_key': getattr(settings, 'GOOGLE_API_KEY', None)},
     name='contact'),
 url(r'^services/$',
     with_headers(False, X_Robots_Tag='noarchive')(LandingPageView.as_view(
         template_name='pages/services.html',
         cache_timeout=settings.DEBUG and 5 or 300)),
     name='services'),
 url(r'^robots\.txt$',
     TemplateView.as_view(
         content_type='text/plain',
         template_name='robots.txt',
     ),
     name='robots'),
 url(r'^sitemap\.xml$',
     cache_page(60 * 60)(sitemap), {'sitemaps': sitemaps}),
 url(r'^manifest\.json$',
     cache_page(60 * 60)(TemplateView.as_view(
         content_type='application/json', template_name='manifest.json')),
     {'prefix': getattr(settings, 'FAVICON_PREFIX', None)},
     name='chrome_manifest'),
Example #2
0
 def foo_via_headers_func(self):
     return with_headers(
         default=True, Foo='bar'
     )(via_header(my_ip_address))
Example #3
0
 def foo_via_force_headers_func(self):
     return with_headers(
         default=False, Foo='bar',
     )(via_header(my_ip_address))
Example #4
0
        name='shared'
    ),

    url(r'^contact/$',
        ContactView.as_view(
            success_url='/contact/',
            template_name = 'pages/contact.html'
        ),
        kwargs={'gapi_key' : getattr(settings, 'GOOGLE_API_KEY', None)},
        name='contact'
    ),

    url(r'^services/$',
        with_headers(False, X_Robots_Tag='noarchive')(
            LandingPageView.as_view(
                template_name='pages/services.html',
                cache_timeout=settings.DEBUG and 5 or 300
            )
        ),
        name='services'
    ),

    url(r'^shop/$',
        LandingPageView.as_view(
            template_name='pages/shop.html'
        ),
        name='shop'
    ),

    url(r'^info/calendar/month/$',
        flatpage,
        kwargs={'url': '/info/calendar/month/'},
Example #5
0
 def foo_via_headers_func(self):
     return with_headers(default=True, Foo='bar')(via_header(my_ip_address))
Example #6
0
 def foo_via_force_headers_func(self):
     return with_headers(
         default=False,
         Foo='bar',
     )(via_header(my_ip_address))