Ejemplo n.º 1
0
        # single entry
        url(string_concat(r'^', t.slug, r'/(?P<slug>[^/]+)/$'),
            'migdal.views.entry', {'type_db': t.db},
            name='migdal_entry_%s' % t.db),
    ]


urlpatterns = i18n_patterns(
    '',
    # main page
    url(r'^$', 'migdal.views.main', name='migdal_main'),
    url(r'^rss.xml$', feeds.EntriesFeed(), name='migdal_main_feed'),
    # submit new entry
    url(string_concat(r'^', _('submit'), r'/$'), 'migdal.views.submit', name='migdal_submit'),
    url(string_concat(r'^', _('submit'), r'/', _('thanks'), r'$'), 'migdal.views.submit_thanks',
        name='migdal_submit_thanks'),
    # category
    url(string_concat(r'^', _('categories'), r'/(?P<category_slug>[^/]*)/$'),
        'migdal.views.entry_list', name='migdal_category'),
    url(string_concat(r'^', _('categories'), r'/(?P<category_slug>[^/]*)/rss.xml$'),
        feeds.EntriesFeed(), name='migdal_category_feed'),
    url(string_concat(r'^', _('search')), SearchPublishedView(), name='search'),
    # type-specific views
    *pats
)


if 'django.contrib.sitemaps' in settings.INSTALLED_APPS:
    from .sitemap import sitemaps
    urlpatterns += patterns(
        '',
        url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {
Ejemplo n.º 2
0
from django.conf.urls import url
from fnpdjango.utils.urls import i18n_patterns
from . import views


urlpatterns = [
    url(r'^ip/$', views.ip),
] + i18n_patterns(
    url(r'^$', views.get_lang),
)