forked from pythonprobr/pythonpro-website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathurls.py
More file actions
84 lines (78 loc) · 3.53 KB
/
urls.py
File metadata and controls
84 lines (78 loc) · 3.53 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
"""pythonpro URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/dev/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.auth.views import (
LoginView, LogoutView, PasswordResetCompleteView, PasswordResetConfirmView,
PasswordResetDoneView,
PasswordResetView,
)
from django.urls import include, path, reverse_lazy
from django.views.generic.base import RedirectView
from pythonpro.payments import views as payments_views
from pythonpro.checkout import views as checkout_views
urlpatterns = [
path('admin/', admin.site.urls),
path('conta/login/', LoginView.as_view(), name='login'),
path('conta/logout/', LogoutView.as_view(), name='logout'),
path('conta/reiniciar_senha', PasswordResetView.as_view(), name='password_reset'),
path('conta/reiniciar_senha/ok', PasswordResetDoneView.as_view(), name='password_reset_done'),
path('conta/reiniciar/<uidb64>/<token>/', PasswordResetConfirmView.as_view(),
name='password_reset_confirm'),
path('conta/reiniciar/ok', PasswordResetCompleteView.as_view(), name='password_reset_complete'),
path('discourse/', include('pythonpro.discourse.urls')),
path('modulos/', include('pythonpro.modules.module_urls')),
path('secoes/', include('pythonpro.modules.sections_urls')),
path('capitulos/', include('pythonpro.modules.chapters_urls')),
path('topicos/', include('pythonpro.modules.topics_urls')),
path('pagamento/', include('pythonpro.payments.urls')),
path('turmas/', include('pythonpro.cohorts.urls')),
path('dashboard/', include('pythonpro.dashboard.urls')),
path('', include('pythonpro.launch.urls')),
path('', include('pythonpro.core.urls')),
path('', include('pythonpro.checkout.urls')),
path('r/', include('pythonpro.redirector.urls')),
path('p/', include('pythonpro.pages.urls')),
path('checkout/', include('django_pagarme.urls')),
path('inscricao', payments_views.member_landing_page, name='member_landing_page'),
path('pre-inscricao', payments_views.meteoric_landing_page, name='meteoric_landing_page'),
path(
'curso-desenvolvimento-web-django-oto',
checkout_views.webdev_landing_page_oto,
name='webdev_landing_page_oto'
),
# unused pages
path(
'curso-de-python-intermediario-oto',
RedirectView.as_view(url=reverse_lazy('member_landing_page')),
name='client_landing_page_oto'
),
path(
'curso-de-python-intermediario-do',
RedirectView.as_view(url=reverse_lazy('member_landing_page')),
name='client_landing_page_do'
),
path(
'curso-de-python-intermediario',
RedirectView.as_view(url=reverse_lazy('member_landing_page')),
name='client_landing_page'
),
]
if not settings.AWS_ACCESS_KEY_ID:
urlpatterns.extend(static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT))
if settings.DEBUG:
import debug_toolbar
urlpatterns.append(path('__debug__/', include(debug_toolbar.urls)))