Ejemplo n.º 1
0
"""charity URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/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.contrib import admin
from django.urls import path

from main.views import LandingPage, Login, Register, logout_view, AddDonation, confirmation, ProfileView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', LandingPage.as_view(), name="main"),
    path('login/', Login.as_view(), name="login"),
    path('add-donation/', AddDonation.as_view(), name="add-donation"),
    path('add-donation/confirmation/', confirmation, name="confirmation"),
    path('registration/', Register.as_view(), name="registration"),
    path('profile/', ProfileView.as_view(), name="profile"),
    path('logout/', logout_view, name="logout"),
]
Ejemplo n.º 2
0
    LibraryListView,
    LibraryCreate,
    LibraryDetailView,
    BookDetailView,
    BookCreate,
    BookDelete,
    NotificationListView,
    RegisterView,
    LogoutView,
    LoginView,
    BookUpdate,
    LoginRequiredView)

urlpatterns = patterns('',
                       url(r'^$', IndexView.as_view(), name='index'),
                       url(r'^profile/$', ProfileView.as_view(),
                           name='profile'),
                       url(r'^register/$', RegisterView.as_view(),
                           name='register'),
                       url(r'^login/$', LoginView.as_view(), name='login'),
                       url(r'^logout/$', LogoutView.as_view(), name='logout'),
                       url(r'^library/list/$',
                           LibraryListView.as_view(), name='library-list'),
                       url(r'^library/new/$',
                           LibraryCreate.as_view(), name='library-new'),
                       url(r'^library/(?P<pk>\d+)/$',
                           LibraryDetailView.as_view(),
                           name='library-detail'),
                       url(r'^book/(?P<slug>[-\w]+)/$',
                           BookDetailView.as_view(),
                           name='book-detail'),
Ejemplo n.º 3
0
from django.contrib import admin
from django.conf import settings
from django.urls import path, include
from django.conf.urls.static import static

from main.views import IndexPageView, ChangeLanguageView, ProfileView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', IndexPageView.as_view(), name='index'),
    path('i18n/', include('django.conf.urls.i18n')),
    path('language/', ChangeLanguageView.as_view(), name='change_language'),
    path('profile', ProfileView.as_view(), name='profile'),
    path('accounts/', include('accounts.urls')),
    path('credits/', include('payments.urls')),
    path('game/', include('game.urls')),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Ejemplo n.º 4
0
"""main URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/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.contrib import admin
from django.urls import path, include
from main.views import index, ProfileView

urlpatterns = [
    path('accounts/profile/', ProfileView.as_view()),
    path('accounts/', include('allauth.urls')),
    path('admin/', admin.site.urls),
    path('', index)
]