Beispiel #1
0
from django.urls import path
from home.views import home, polityka_prywatnosci, regulamin, ContactView

app_name = 'home'
urlpatterns = [
    path('', home, name='home'),
    path('contact/', ContactView.as_view(), name='contact'),
    path('polityka_prywatnosci/', polityka_prywatnosci, name='polityka_prywatnosci'),
    path('regulamin/', regulamin, name='regulamin')
]
Beispiel #2
0
from django.conf.urls import patterns, url
from home.views import HomeView, AboutView, ContactView, RegView

urlpatterns = patterns(
    '',
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^contact/$', ContactView.as_view(), name='contact'),
    url(r'^home/$', HomeView.as_view(), name='home'),
    url(r'^reg/$', RegView.as_view(), name='reg'),
)
Beispiel #3
0
from django.conf.urls import patterns, url
from home.views import HomeView,AboutView,ContactView,RegView

urlpatterns = patterns('',
    url(r'^about/$', AboutView.as_view(), name='about'),
    url(r'^contact/$', ContactView.as_view(), name='contact'),
    url(r'^home/$', HomeView.as_view(), name='home'),
    url(r'^reg/$', RegView.as_view(), name='reg'),
)
Beispiel #4
0
"""mypage_back URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.0/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 django.conf.urls.static import static
from django.conf import settings
from home.views import IndexView, ContactView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', IndexView.as_view()),
    path('contact/', ContactView.as_view()),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Beispiel #5
0
"""Urls routes for main site."""
from django.conf.urls import url
from django.views.generic import TemplateView
from home.views import ContactView

urlpatterns = [
    url(r'^about/$',
        TemplateView.as_view(template_name="base/about.html"),
        name="about"),
    url(r'^contact/$', ContactView.as_view(), name="contact"),
    url(r'^services/therapy$',
        TemplateView.as_view(template_name="base/therapy.html"),
        name="therapy"),
    url(r'^$',
        TemplateView.as_view(template_name="base/index.html"),
        name="home"),
]
Beispiel #6
0
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. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from home.views import home,ContactView, aylik_veri
from django.contrib.auth.views import login,logout,password_change,password_change_done

#Admin sayfasi basliklari:
admin.site.site_header = 'hemosurvey ADMIN'

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$',home,name="home"),
    url(r'^login$',login,name="login"),
    url(r'^logout$',logout,{'next_page':'home'},name="logout"),
    url(r'^changepassword$',password_change,{'post_change_redirect':'passwordChanged'},name="changePassword"),
    url(r'^passwordchanged$',password_change_done,name="passwordChanged"),
    url(r'^hasta/',include('hasta.urls')),
    url(r'^iletisim/', ContactView.as_view(), name='contact'),
    url(r'^aylikveri/',aylik_veri,name='aylik_veri'),
    url(r'^gozlem/',include('gozlem.urls')),
]