Ejemplo n.º 1
0
from django.conf.urls import patterns, include, url
from django.contrib import admin

from shelf.views import MainPageView  # przy 2 sposobie nie trzeba tego bo w shelf/views jest to; index_view = MainPageView.as_view()
from contact.views import MessageAddView

urlpatterns = patterns(
    '',
    # Examples:
    # url(r'^$', 'oki.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^shelf/', include('shelf.urls', namespace='shelf')),
    url(r'^contact/$', MessageAddView.as_view()),
    url(r'^$', MainPageView.as_view(), name='main-page'
        ),  # 2 sposob: url(r'^$',shelf.views.index_view',name='main-page')
    url(r'^accounts/', include('allauth.urls')),
)
Ejemplo n.º 2
0
    https://docs.djangoproject.com/en/1.8/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. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from contact.views import MessageAddView
from django.conf.urls.static import static
from django.conf import settings
from .api import router


urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^shelf/', include('shelf.urls', namespace='shelf')),
    url(r'^rental/', include('rental.urls', namespace='rental')),
    url(r'^contact/$', MessageAddView.as_view()),
    url(r'^$', 'shelf.views.index_view', name='main-page'),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^api/', include(router.urls)),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Ejemplo n.º 3
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/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. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from contact.views import MessageAddView
from storage.views import CopiesListView, IndexView
from django.conf.urls.static import static
from django.conf import settings
from buy.views import CarBuyView

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^storage/', include('storage.urls', namespace='storage')),
    url(r'^contact/$', MessageAddView.as_view(), name='contact'),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^buy/', include('buy.urls', namespace='buy')),

] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Ejemplo n.º 4
0
from django.conf.urls import url
from . import views
from contact.views import MessageAddView

app_name = 'contact'

urlpatterns = [
    url(r'^blog/contact/$', MessageAddView.as_view(), name='blog_message'),
]
Ejemplo n.º 5
0
from django.conf.urls import patterns, include, url
from django.contrib import admin


from shelf.views import (
    MainPageView,
)  # przy 2 sposobie nie trzeba tego bo w shelf/views jest to; index_view = MainPageView.as_view()
from contact.views import MessageAddView


urlpatterns = patterns(
    "",
    # Examples:
    # url(r'^$', 'oki.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),
    url(r"^admin/", include(admin.site.urls)),
    url(r"^shelf/", include("shelf.urls", namespace="shelf")),
    url(r"^contact/$", MessageAddView.as_view()),
    url(
        r"^$", MainPageView.as_view(), name="main-page"
    ),  # 2 sposob: url(r'^$',shelf.views.index_view',name='main-page')
    url(r"^accounts/", include("allauth.urls")),
)
Ejemplo n.º 6
0
"""biblio 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.conf.urls import url, include, patterns
from django.urls import path, include
from django.contrib import admin
from contact.views import MessageAddView

urlpatterns = [
    path('admin/', admin.site.urls),
    path(
        'shelf/', include('shelf.urls', namespace='shelf')
    ),  #załącza plik shelf.urls z dodatkowymi urlsami oraz namespace (name) do grupy widoków (żeby jakaś inna aplikacja nie postawiła takich samych nazw)
    path('contact/', MessageAddView.as_view(), name='message-form')
]
Ejemplo n.º 7
0
"""biblio URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.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, include
from contact.views import MessageAddView
from shelf.views import MainPageView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('shelf/', include('shelf.urls')),
    path('contact/', MessageAddView.as_view()),
    path('', MainPageView.as_view(), name="home")
]