1. Sergio Berlotto
  2. berlotto.net

Source

berlotto.net / urls.py

from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib.sitemaps import FlatPageSitemap, GenericSitemap
from berlottonet.django_yaba.models import Article
from berlottonet.django_yaba.views import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

info_dict = {
    'queryset': Article.objects.all(),
    'date_field': 'modified',
}

sitemaps = {
    'flatpages': FlatPageSitemap,
    'blog': GenericSitemap(info_dict, priority=0.6),
}

urlpatterns = patterns('',

    (r'^u/', include('encurtador.urls')),
    (r'^imagem/', include('imagens.urls')),
    (r'^comments/', include('django.contrib.comments.urls')),
    (r'^paste/', include('dpaste.urls')), 
    (r'^blog/', include('django_yaba.urls')),
    (r'^admin/filebrowser/', include('filebrowser.urls')),
    (r'^grappelli/', include('grappelli.urls')),
    (r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
    (r'^', include('berlottonet.website.urls')),

    url(r'^galeria/(?P<slug>[-\w]+)/$', gallery, name='blog-gallery'),
    url(r'^galeria/detail/(?P<id>[-\w]+)/$', photo_detail, name='photo_detail'),
    url(r'^galeria/$', gallery_list, name="blog-gallery-list"),


    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),
)

if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    )
    
handler500 = 'website.views.error_view'
handler404 = 'website.views.error_view'