-
Notifications
You must be signed in to change notification settings - Fork 0
/
urls.py
65 lines (56 loc) · 3.16 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
58
59
60
61
62
63
64
65
"""tlksio URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from django.conf.urls import include
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from tlksio import views as main_views
from talks import views as talk_views
urlpatterns = [
url(r'^$', main_views.index, name='index'),
url(r'^auth/login', main_views.login, name='login'),
url(r'^auth/twitter/callback', main_views.auth_twitter_callback, name='auth_twitter_callback'),
url(r'^auth/twitter', main_views.auth_twitter, name='auth_twitter'),
url(r'^auth/logout', main_views.logout, name='logout'),
url(r'^settings', main_views.settings, name='settings'),
url(r'^profile/(?P<username>[\w-]+)$', main_views.profile, name='profile'),
url(r'^profile/(?P<username>[\w-]+)/page/(?P<page>[0-9]+)$', main_views.profile, name='profile_page'),
url(r'^profile/(?P<username>[\w-]+)/upvoted$', main_views.profile_upvoted, name='profile_upvoted'),
url(r'^profile/(?P<username>[\w-]+)/upvoted/page/(?P<page>[0-9]+)$', main_views.profile_upvoted,
name='profile_upvoted_page'),
url(r'^profile/(?P<username>[\w-]+)/favorited$', main_views.profile_favorited, name='profile_favorited'),
url(r'^profile/(?P<username>[\w-]+)/favorited/page/(?P<page>[0-9]+)$', main_views.profile_favorited,
name='profile_favorited_page'),
url(r'^about', main_views.about, name='about'),
url(r'^faq', main_views.faq, name='faq'),
url(r'^contactus', main_views.contactus, name='contactus'),
url(r'^terms', main_views.terms, name='terms'),
url(r'^privacy', main_views.privacy, name='privacy'),
url(r'^activity', main_views.activity, name='activity'),
url(r'^latest$', talk_views.latest, name='latest'),
url(r'^latest/page/(?P<page>[0-9]+)$', talk_views.latest, name='latest_page'),
url(r'^popular$', talk_views.popular, name='popular'),
url(r'^popular/page/(?P<page>[0-9]+)$', talk_views.popular, name='popular_page'),
url(r'^tag/(?P<tag_slug>[\w-]+)$', talk_views.tag, name='tag'),
url(r'^tag/(?P<tag_slug>[\w-]+)/page/(?P<page>[0-9]+)$', talk_views.tag, name='tag_page'),
url(r'^talk/add$', talk_views.add, name='add'),
url(r'^talk/play/(?P<talk_slug>[\w-]+)', talk_views.play, name='play'),
url(r'^talk/favorite/(?P<talk_id>[0-9]+)', talk_views.favorite, name='favorite'),
url(r'^talk/upvote/(?P<talk_id>[0-9]+)', talk_views.upvote, name='upvote'),
url(r'^talk/(?P<talk_slug>[\w-]+)', talk_views.talk, name='talk'),
url(r'^admin/', admin.site.urls),
url(r'^search/', include('haystack.urls')),
]