示例#1
0
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from backend.views import MusicView, LandingView, AboutUsView, ContactView, TemplateView

admin.autodiscover()

urlpatterns = [
    url(r'', include('accounts.urls')),
    url(r'^tagauks/', include(admin.site.urls)),
    url(r'^i18n/', include('django.conf.urls.i18n'))
]

urlpatterns += i18n_patterns(
    url(r'^$', LandingView.as_view(), name='home'),
    url(r'^muusika/$', MusicView.as_view(), name='muusika'),
    url(r'^meist/$', AboutUsView.as_view(), name='meist'),
    url(r'^kontakt/$', ContactView.as_view(), name='kontakt'),
    url(r'^lisaleht/$', TemplateView.as_view(template_name='lisaleht.html'), name='lisaleht')
)


urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
示例#2
0
from django_rest_passwordreset.views import reset_password_request_token, reset_password_confirm

from backend.views import PartnerUpdate, RegisterAccount, LoginAccount, CategoryView, ShopView, ProductInfoView, \
    BasketView, \
    AccountDetails, ContactView, OrderView, PartnerState, PartnerOrders, ConfirmAccount

app_name = 'backend'
urlpatterns = [
    path('partner/update', PartnerUpdate.as_view(), name='partner-update'),
    path('partner/state', PartnerState.as_view(), name='partner-state'),
    path('partner/orders1', PartnerOrders.as_view(), name='partner-orders1'),
    path('user/register', RegisterAccount.as_view(), name='user-register'),
    path('user/register/confirm',
         ConfirmAccount.as_view(),
         name='user-register-confirm'),
    path('user/details', AccountDetails.as_view(), name='user-details'),
    path('user/contact', ContactView.as_view(), name='user-contact'),
    path('user/login', LoginAccount.as_view(), name='user-login'),
    path('user/password_reset',
         reset_password_request_token,
         name='password-reset'),
    path('user/password_reset/confirm',
         reset_password_confirm,
         name='password-reset-confirm'),
    path('categories', CategoryView.as_view(), name='categories'),
    path('shops', ShopView.as_view(), name='shops'),
    path('products', ProductInfoView.as_view(), name='shops'),
    path('basket', BasketView.as_view(), name='basket'),
    path('order', OrderView.as_view(), name='order'),
]
示例#3
0
from django.urls import path
from django.views.generic import TemplateView

from backend.views import ContactView, SupportView

urlpatterns = [
    path('contact', ContactView.as_view(), name='contact'),
    path('contact-success',
         TemplateView.as_view(template_name='backend/contact-success.html'),
         name='contact-success'),
    path('support', SupportView.as_view(), name='support'),
    path('support-success',
         TemplateView.as_view(template_name='backend/support-success.html'),
         name='support-success'),
]