Exemplo n.º 1
0
"""django_6_forms 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 main.views import Main, AboutViews, SuperAboutView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', Main.as_view(), name="main"),
    path('post/', Main.as_view(), name="post"),
    path('about/', AboutViews.as_view(), name="about"),
    path('super_about/', SuperAboutView.as_view(), name="super_about"),
]
Exemplo n.º 2
0
from main.views import Main
urlpatterns = Main().getRoutes()
Exemplo n.º 3
0
    https://docs.djangoproject.com/en/1.9/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. Add an import:  from blog import urls as blog_urls
    2. Import the include() function: from django.conf.urls import url, include
    3. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import url, include
from django.contrib import admin
from main.views import Main
from django.conf import settings
from django.conf.urls.static import static
from portfolio.views import ListViews
from contacts.views import contact
from calculator.views import add

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', Main.as_view(), name='main'),
    url(r'^portfolio/$', ListViews.as_view(), name='portfolio'),
    url(r'^news/', include('news.urls')),
    url(r'^contact/$', contact, name="contact"),
    url(r'^calc/$', add, name="add"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 4
0
"""unit_test URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/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, include
from django.contrib import admin
from api import urls as api_urls
from main.views import Main
from api.views import Obtain_auth_token

urlpatterns = [
    url(r'^$', Main.as_view()),
    url(r'^admin/', admin.site.urls),
    url(r'^api/', include(api_urls)),
    url(r'^api-token-auth/', Obtain_auth_token.as_view()),
]
Exemplo n.º 5
0
"""firstdev URL Configuration

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

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', Main.as_view(), name='index'),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 6
0
from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.auth.decorators import login_required
from main.views import Main, DeleteEmail, Profile, SetPrimaryEmail, DeleteUser
from django.views.generic import TemplateView

urlpatterns = patterns('',
    url(r'^$', Main.as_view(), {}, 'main'),
    url(r'^profile/$', login_required(Profile.as_view(), login_url='/'),
        name='profile'),
    url(r'^mail/', include('multimail.urls')),
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page':'/'},
        name='logout'),
    url(r'^delete-email/(\d+)', DeleteEmail.as_view(), name='delete-email'),
    url(r'^delete-user/([^/]+)', DeleteUser.as_view(), name='delete-user'),
    url(r'^set-primary/(\d+)', SetPrimaryEmail.as_view(), name='set-primary'),
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
"""django_seventh 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 main.views import Main, main, AboutView, SuperAboutView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', Main.as_view(), name='big_main'),
    path('main/', main, name='small_main'),
    path('about/', AboutView.as_view(), name='about'),
    path('super_about/', SuperAboutView.as_view(), name='super_about'),
]
Exemplo n.º 8
0
from django.conf import settings
from django.conf.urls import patterns, url, include
from django.conf.urls.static import static
from django.contrib.auth.decorators import login_required
from main.views import Main, DeleteEmail, Profile, SetPrimaryEmail, DeleteUser
from django.views.generic import TemplateView

urlpatterns = patterns(
    "",
    url(r"^$", Main.as_view(), {}, "main"),
    url(r"^profile/$", login_required(Profile.as_view(), login_url="/"), name="profile"),
    url(r"^mail/", include("multimail.urls")),
    url(r"^logout/$", "django.contrib.auth.views.logout", {"next_page": "/"}, name="logout"),
    url(r"^delete-email/(\d+)", DeleteEmail.as_view(), name="delete-email"),
    url(r"^delete-user/([^/]+)", DeleteUser.as_view(), name="delete-user"),
    url(r"^set-primary/(\d+)", SetPrimaryEmail.as_view(), name="set-primary"),
) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Exemplo n.º 9
0
# coding=utf-8
from django.urls import path
from main.views import Main, Contact

urlpatterns = [
    path("", Main.as_view(), name="main"),
    path("contact/", Contact.as_view(), name="contact"),
]