root/urls.py

Revision b454cb5d7cc1525b3b27eb76340553f9893643b0, 2.5 kB (checked in by Lincoln de Sousa <lincoln@…>, 9 months ago)

Adding a very simple photo gallery that still needs some adjusts!

  • Property mode set to 100644
Line 
1# -*- coding: utf-8 -*-
2# Copyright (C) 2008 Lincoln de Sousa <lincoln@minaslivre.org>
3#
4# This program is free software; you can redistribute it and/or
5# modify it under the terms of the GNU General Public License as
6# published by the Free Software Foundation; either version 2 of the
7# License, or (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12# General Public License for more details.
13#
14# You should have received a copy of the GNU General Public
15# License along with this program; if not, write to the
16# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17# Boston, MA 02111-1307, USA.
18from django.conf.urls.defaults import *
19from django.conf import settings
20from django.contrib import admin
21admin.autodiscover()
22
23from ema.views import get_entry_by_slug
24
25MEDIA = {'document_root': settings.INSTANCE('media')}
26
27urlpatterns = patterns(
28    '',
29
30    (r'^admin/(.*)', admin.site.root),
31
32    url(r'^$', 'ema.views.index',
33        name='index'),
34
35    # static media
36    url(r'^site-media/(.*)', 'django.views.static.serve', MEDIA,
37        name='static-media'),
38
39    # password reset
40    url(r'^password_reset/$', 'django.contrib.auth.views.password_reset',
41        {'template_name': 'userpanel/password_reset_form.html',
42         'email_template_name':'userpanel/password_reset_email.html'},
43        name='password-reset'),
44
45    url(r'^password_reset/done/$', 'django.contrib.auth.views.password_reset_done',
46        {'template_name': 'userpanel/password_reset_done.html'},
47        name='password-reset-done'),
48
49    url(r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
50        'django.contrib.auth.views.password_reset_confirm',
51        {'template_name': 'userpanel/password_reset_confirm.html'},
52        name='password-reset-reset'),
53
54    url(r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete',
55        {'template_name':'userpanel/password_reset_complete.html'},
56        name='password-reset-complete'),
57
58    #i18n support
59    (r'^i18n/', include('django.conf.urls.i18n')),
60
61    # index
62    (r'^', include('ema.events.urls')),
63    (r'^', include('ema.contents.urls')),
64    (r'^', include('ema.theme2009.urls')),
65
66    # blog/content support
67    url(r'^(?P<year>\d{4})/(?P<month>[0-9]{2})/(?P<day>\d{2})/(?P<slug>[-\w]+)/$',
68        'ema.views.get_entry',
69        name='diario-entry'),
70
71    url(r'^([-\w]+)/$', get_entry_by_slug,
72        name='specific-entry'),
73)
Note: See TracBrowser for help on using the browser.