Beispiel #1
0
"""djapi 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'))


No olvidar el .as_view() xq es una vista basada en clase
"""
from django.contrib import admin
from django.urls import path
from api.api import UserAPI

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/1.0/create_user/', UserAPI.as_view(), name='api_create_user'),
]
Beispiel #2
0
from django.urls import path
from api.views import PublicationList
from api.api import UserAPI

urlpatterns = [
    path('create_user/', UserAPI.as_view(), name="api_create_user"),
    path('publications/', PublicationList.as_view(), name='publication_list'),
]
Beispiel #3
0
"""Rest 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
from api.api import UserAPI

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/create_user', UserAPI.as_view(), name="api_create_user")
]
Beispiel #4
0
    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 soa9b.views import hello_world
from services import views as serv_views
from api.api import UserAPI
from api.api import ProductsListAPI

urlpatterns = [
    path('admin/', admin.site.urls),
    path('hello/', hello_world),
    # path('services/', serv_views.showTemplate),
    path('games/create/', serv_views.createSubject),
    path('games/lista/', serv_views.listaGames),
    path('games/venta/', serv_views.venta),
    path('index/', serv_views.index),
    # path('services/', serv_views.showTemplate,name='index'),
    # path('services/create', serv_views.createSubject,name='create_services'),
    path('api/user/create', UserAPI.as_view()),
    path('api/products', ProductsListAPI.as_view(), name='api_products_list'),
]
Beispiel #5
0
from django.contrib import admin
from django.urls import path, include

from rest_framework import routers
from api.api import UserAPI, ProductAPI, OrderAPI, UserCreateAPI

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('store.urls')),

    #EndPoints
    path('api/users', UserAPI.as_view()),
    path('api/users/create', UserCreateAPI.as_view()),
    path('api/products', ProductAPI.as_view()),
    path('api/orders', OrderAPI.as_view()),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Beispiel #6
0
"""

from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth import login, logout
from registro import views
from django.conf.urls import url, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from api.api import UserAPI
from django.views.generic import TemplateView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    #  url(r'^login/', views.Login, name= 'login'),
    url(r'^$', views.inicio, name='index'),
    # url(r'^logout/', views.logout_request, name= 'logout'),
    # url(r'^login/', views.login_request, name= 'login'),
    url(r'^servicios/', views.servicios, name='servicios'),
    url(r'^artistas/', views.artistas, name='artistas'),
    url(r'^dref/', views.dref, name='dref'),
    url(r'^chriz/', views.Chriz, name='chriz'),
    url(r'^post/', views.PoztMalone, name='post'),
    url(r'^api/1.0/create_user/', UserAPI.as_view(), name="api_create_user"),
    url(r'^accounts/', include('allauth.urls')),
    url('', TemplateView.as_view(template_name="login/index.html")),
    url(r'^zerv/', views.zervicioz, name='zervicioz'),
    url(r'^princi/', views.princi, name='princi'),
]

urlpatterns += staticfiles_urlpatterns()