-
Notifications
You must be signed in to change notification settings - Fork 25
/
urls.py
57 lines (52 loc) · 2.19 KB
/
urls.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# -*- coding: utf-8 -*-
#
# Copyright © 2009-2011 Alexander Kojevnikov <[email protected]>
#
# muspy is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# muspy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with muspy. If not, see <http://www.gnu.org/licenses/>.
from django.conf.urls.defaults import *
from django.contrib.auth.views import login
from django.views.generic.base import RedirectView, TemplateView
from app.forms import SignInForm
urlpatterns = patterns('app.views',
(r'^$', 'index'),
(r'^activate$', 'activate'),
(r'^about$', TemplateView.as_view(template_name='about.html')),
(r'^artist/([0-9a-f\-]+)$', 'artist'),
(r'^artists$', 'artists'),
(r'^artists-add$', 'artists_add'),
(r'^artists-remove$', 'artists_remove'),
(r'^blog$', RedirectView.as_view(url='http://kojevnikov.com/tag/muspy.html')),
(r'^blog/feed$', RedirectView.as_view(url='http://kojevnikov.com/muspy.xml')),
(r'^contact$', TemplateView.as_view(template_name='contact.html')),
(r'^cover$', 'cover'),
(r'^delete$', 'delete'),
(r'^faq$', TemplateView.as_view(template_name='faq.html')),
(r'^feed$', 'feed'),
(r'^feed/(?P<id>\d+)$', RedirectView.as_view(url='/feed?id=%(id)s')),
(r'^ical$', 'ical'),
(r'^import$', 'import_artists'),
(r'^releases$', 'releases'),
(r'^reset$', 'reset'),
(r'^settings$', 'settings'),
(r'^signin$', login, {'authentication_form': SignInForm, 'template_name': 'signin.html'}),
(r'^signout$', 'signout'),
(r'^signup$', 'signup'),
(r'^sitemap.xml$', 'sitemap'),
(r'^star$', 'star'),
(r'^unsubscribe$', 'unsubscribe'),
(r'blog|\.php', 'forbidden'), # Hello, vulnerability scan bots!
)
urlpatterns += patterns('',
(r'^api/1/', include('api.urls')),
)