| 1 | # Copyright (c) 2010 by Yaco Sistemas |
|---|
| 2 | # |
|---|
| 3 | # This file is part of Merengue. |
|---|
| 4 | # |
|---|
| 5 | # Merengue is free software: you can redistribute it and/or modify |
|---|
| 6 | # it under the terms of the GNU Lesser General Public License as published by |
|---|
| 7 | # the Free Software Foundation, either version 3 of the License, or |
|---|
| 8 | # (at your option) any later version. |
|---|
| 9 | # |
|---|
| 10 | # Merengue is distributed in the hope that it will be useful, |
|---|
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 13 | # GNU Lesser General Public License for more details. |
|---|
| 14 | # |
|---|
| 15 | # You should have received a copy of the GNU Lesser General Public License |
|---|
| 16 | # along with Merengue. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 17 | |
|---|
| 18 | # -*- coding: utf-8 -*- |
|---|
| 19 | from django.conf import settings |
|---|
| 20 | from django.conf.urls.defaults import * |
|---|
| 21 | from merengue.urlresolvers import merengue_url as url |
|---|
| 22 | |
|---|
| 23 | |
|---|
| 24 | js_info_dict = { |
|---|
| 25 | 'packages': ('django.conf', |
|---|
| 26 | 'django.contrib.admin', |
|---|
| 27 | ), |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | handler404 = 'merengue.perms.defaults.page_not_found' |
|---|
| 31 | |
|---|
| 32 | urlpatterns = patterns('', |
|---|
| 33 | # actions |
|---|
| 34 | url({'en': r'^actions/', |
|---|
| 35 | 'es': r'^acciones/'}, |
|---|
| 36 | include('merengue.action.urls')), |
|---|
| 37 | |
|---|
| 38 | # blocks |
|---|
| 39 | url({'en': r'^blocks/', |
|---|
| 40 | 'es': r'^bloques/'}, |
|---|
| 41 | include('merengue.block.urls')), |
|---|
| 42 | |
|---|
| 43 | # login and logout |
|---|
| 44 | url(r'^login/$', 'merengue.portal.views.login', name="merengue_login"), |
|---|
| 45 | url(r'^logout/$', 'merengue.portal.views.logout', name="merengue_logout"), |
|---|
| 46 | |
|---|
| 47 | url({'en': r'^password/reset/$', |
|---|
| 48 | 'es': r'^contrasena/cambiar/$'}, |
|---|
| 49 | 'merengue.portal.views.password_reset', name="password_reset"), |
|---|
| 50 | url({'en': r'^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', |
|---|
| 51 | 'es': r'^contrasena/cambiar/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$'}, |
|---|
| 52 | 'merengue.portal.views.password_reset_confirm', name="password_reset_confirm"), |
|---|
| 53 | url({'en': r'^password/reset/done/$', |
|---|
| 54 | 'es': r'^contrasena/cambiar/hecho/$'}, |
|---|
| 55 | 'merengue.portal.views.password_reset_complete', name="password_reset_complete"), |
|---|
| 56 | |
|---|
| 57 | # base urls |
|---|
| 58 | (r'^base/', include('merengue.base.urls')), |
|---|
| 59 | |
|---|
| 60 | # section |
|---|
| 61 | url({'en': r'^sections/', |
|---|
| 62 | 'es': r'^secciones/'}, |
|---|
| 63 | include('merengue.section.urls')), |
|---|
| 64 | |
|---|
| 65 | # menu |
|---|
| 66 | url(r'^menu(/[\w\-]+)*/(?P<menu_slug>[\w-]+)/$', 'merengue.section.views.menu_view', name='menu_view'), |
|---|
| 67 | |
|---|
| 68 | # tinyimages |
|---|
| 69 | (r'^tinyimages/', include('tinyimages.urls')), |
|---|
| 70 | |
|---|
| 71 | # i18n applications |
|---|
| 72 | url(r'^transhette/', include('transhette.urls')), |
|---|
| 73 | url(r'^inlinetrans/', include('inlinetrans.urls')), |
|---|
| 74 | (r'^i18n/setlang/$', 'merengue.portal.views.set_language'), |
|---|
| 75 | url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict, name='merengue_jsi18n'), |
|---|
| 76 | |
|---|
| 77 | # collaborative views |
|---|
| 78 | (r'^collab/', include('merengue.collab.urls')), |
|---|
| 79 | |
|---|
| 80 | # searchforms |
|---|
| 81 | url({'en': r'^searchform/', |
|---|
| 82 | 'es': r'^formulario_de_busqueda/'}, |
|---|
| 83 | include('searchform.urls')), |
|---|
| 84 | url({'en': r'^searchform_jsi18n/', |
|---|
| 85 | 'es': r'^formulario_de_busqueda_jsi18n/'}, |
|---|
| 86 | include('searchform.jsi18n_urls')), |
|---|
| 87 | |
|---|
| 88 | # ajax_select |
|---|
| 89 | (r'^ajax_select/', include('ajax_select.urls')), |
|---|
| 90 | |
|---|
| 91 | # genericforeignkey |
|---|
| 92 | (r'^genericforeignkey/', include('genericforeignkey.urls')), |
|---|
| 93 | |
|---|
| 94 | # collections |
|---|
| 95 | url({'en': r'^collection/', |
|---|
| 96 | 'es': r'^coleccion/'}, |
|---|
| 97 | include('merengue.collection.urls')), |
|---|
| 98 | |
|---|
| 99 | # notification |
|---|
| 100 | (r'^notification/', include('notification.urls')), |
|---|
| 101 | |
|---|
| 102 | # announcements |
|---|
| 103 | (r'^announcements/', include('announcements.urls')), |
|---|
| 104 | |
|---|
| 105 | # perms |
|---|
| 106 | url({'en': r'^perms/', |
|---|
| 107 | 'es': r'^permisos/'}, |
|---|
| 108 | include('merengue.perms.urls')), |
|---|
| 109 | |
|---|
| 110 | # other |
|---|
| 111 | (r'^internal-links/', include('merengue.internallinks.urls')), |
|---|
| 112 | (r'^uitools/', include('merengue.uitools.urls')), |
|---|
| 113 | (r'^seo/', include('merengue.seo.urls')), |
|---|
| 114 | (r'^threadedcomments/', include('threadedcomments.urls')), |
|---|
| 115 | url(r'^invalidate/$', 'merengue.portal.views.invalidate_cache', name='invalidate_cache'), |
|---|
| 116 | (r'^inplaceeditform/', include('inplaceeditform.urls')), |
|---|
| 117 | (r'^reports/', include('autoreports.urls')), |
|---|
| 118 | (r'^captcha/', include('captcha.urls')), |
|---|
| 119 | |
|---|
| 120 | # django-su |
|---|
| 121 | (r"^su/", include("django_su.urls")), |
|---|
| 122 | ) |
|---|
| 123 | |
|---|
| 124 | if settings.USE_GIS: |
|---|
| 125 | # places |
|---|
| 126 | urlpatterns += patterns('', (r'^places/', include('merengue.places.urls')), ) |
|---|