Exemplo n.º 1
0
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from api.views import (CreateLesson, FetchLessonsAndUsers, DeleteClass,
                       SaveClassName, SaveClassDescription, CreateClass,
                       FetchClasses, FetchHistory, FetchCustomerHistory,
                       ChangeOrderStatus, FetchOrders, PlaceOrder,
                       FetchBranches, UserCreateAPIView, UserLoginAPIView,
                       FetchItems, AddItem, DeleteItem, SaveInventory,
                       SaveName, FetchWorkers)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('login/', UserLoginAPIView.as_view()),
    path('signup/', UserCreateAPIView.as_view()),
    # path('fetch_items/', FetchItems.as_view()),
    # path('add_item/', AddItem.as_view()),
    # path('delete_item/', DeleteItem.as_view()),
    # path('save_inventory/', SaveInventory.as_view()),
    # path('save_name/', SaveName.as_view()),
    # path('fetch_workers/', FetchWorkers.as_view()),
    # path('fetch_branches/', FetchBranches.as_view()),
    # path('place_order/', PlaceOrder.as_view()),
    # path('fetch_orders/', FetchOrders.as_view()),
    # path('change_order_status/', ChangeOrderStatus.as_view()),
    # path('fetch_history/', FetchHistory.as_view()),
    # path('fetch_customer_history/', FetchCustomerHistory.as_view()),
    path('fetch_classes/', FetchClasses.as_view()),
    path('create_class/', CreateClass.as_view()),
    path('save_name/', SaveClassName.as_view()),
Exemplo n.º 2
0
    path('login/', Login.as_view(), name='login'),
    path('logout/', Logout.as_view(), name='logout'),
    path('dashboard/', dashboard, name='dashboard'),
	path('event/create/', event_create, name='event-create'),
	path('event/list/', event_list, name='event-list'),
	path('event/detail/<int:event_id>', event_detail, name='event-detail'),
    path('event/update/<int:event_id>', event_update, name='event-update'),

	path('event/delete/<int:event_id>', event_delete, name='event-delete'),
	path('ticket/add/<int:event_id>', add_Ticket, name='ticket-create'),
	
	path('profile/edit', profile_edit, name='profile-edit'),
	path('profile/', profile, name='profile'),

	path('organizer/<int:added_by>/', organizer_profile, name='organizer-profile'),
	path('follow/<int:added_by>/', following, name='following'),


	path('api/', EventList.as_view(), name='api-list'),
	path('api/<int:event_id>/', EventDetail.as_view(), name='api-detail'),
	path('api/<int:event_id>/update/', EventUpdate.as_view(), name='api-update'),
	path('api/<int:event_id>/delete/', EventDelete.as_view(), name='api-delete'),
	path('api/add/', EventCreate.as_view(), name='api-create'),
	path('api/signup/', UserCreateAPIView.as_view(), name='api-signup'),
	path('api/signin/', UserLoginAPIView.as_view(), name='api-signin'),
	path('api/following/', Following.as_view(), name='api-following'),
	path('api/ticketList/<int:event_id>/', TicketList.as_view(), name='api-ticketList'),
	path('api/ticket/add/<int:event_id>/', TicketCreate.as_view(), name='api-ticket-create'),
      	
]
Exemplo n.º 3
0
"""mysubirsc URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/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 django.contrib import admin
from django.urls import path
from django.conf.urls import url
from django.contrib import admin

from api.views import (UserCreateAPIView, UserLoginAPIView, liveserver)

urlpatterns = [
    path('admin/', admin.site.urls),
    url(r'^ping/$', liveserver, name='ping'),
    url(r'^login/$', UserLoginAPIView.as_view(), name='login'),
    url('', UserCreateAPIView.as_view(), name='register'),
]
Exemplo n.º 4
0
from django.urls import path
from .views import UserCreateAPIView
from rest_framework_jwt.views import obtain_jwt_token
from api.views import (UserCreateAPIView, UserUpdateView, UserDetailView,
                       ItemListView, ItemDetailView, CheckOutView,
                       OrderControlAPIView, CartDeleteView, CartListView,
                       CartDetailView, OrderDetailView)

urlpatterns = [
    path('login/', obtain_jwt_token, name='login'),
    path('register/', UserCreateAPIView.as_view(), name='register'),
    path('userupdate/<int:user_id>',
         UserUpdateView.as_view(),
         name='userupdate'),
    path('profile/<int:user_id>', UserDetailView.as_view(), name='userupdate'),
    path('list/', ItemListView.as_view(), name='api-list'),
    path('details/<int:item_id>', ItemDetailView.as_view(), name='api-detail'),
    path('checkout/<int:order_id>',
         CheckOutView.as_view(),
         name='api-checkout'),
    path('cart/<int:user_id>', CartListView.as_view(), name='api-cart'),
    path('cartitems/<int:order_id>/',
         CartDetailView.as_view(),
         name='api-cartdetail'),
    path('deletecart/<int:cart_id>',
         CartDeleteView.as_view(),
         name='api-deletecart'),
    path('ctrl_order/<int:item_id>',
         OrderControlAPIView.as_view(),
         name='api-ctrl-order'),
    path('order/<int:order_id>', OrderDetailView.as_view(), name='api-order'),
Exemplo n.º 5
0
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 import settings
from django.conf.urls.static import static
from api.views import BookListAPIView, BookRatingCreateView, BookDetailAPIView, BookCreateAPIView, PageCreateAPIView, UserCreateAPIView, LoginAPIView

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/list/', BookListAPIView.as_view()),
    path('api/detail/<int:page_id>/',
         BookDetailAPIView.as_view(),
         name="api_detail"),
    path('api/create/', BookCreateAPIView.as_view()),
    path('api/page_create/', PageCreateAPIView.as_view()),
    path('api/register/', UserCreateAPIView.as_view(), name='api_register'),
    path('api/login/', LoginAPIView.as_view(), name='api_login'),
    path('api/rating/<int:page_id>/',
         BookRatingCreateView.as_view(),
         name="api_rating"),
]
Exemplo n.º 6
0
from django.contrib import admin
from django.urls import path

# from rest_framework_jwt.views import obtain_jwt_token
from django.conf.urls.static import static
from django.conf import settings
from api.views import (
    UserCreateAPIView,
    UserLoginAPIView,
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('signup/', UserCreateAPIView.as_view(), name="signup"),
    path('signin/', UserLoginAPIView.as_view(), name="signin"),
]

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 7
0
from django.urls import path
from api.views import (PostListAPIView, PostDetailAPIView, PostCreateAPIView,
                       UserCreateAPIView)
from rest_framework_jwt.views import obtain_jwt_token, refresh_jwt_token, verify_jwt_token

urlpatterns = [
    path('api/token-verify/', verify_jwt_token),
    path('api/token-refresh/', refresh_jwt_token),
    path('api/token-auth/', obtain_jwt_token),
    path('api/u/create/', UserCreateAPIView.as_view(), name='api_user_create'),
    path('api/posts/create/',
         PostCreateAPIView.as_view(),
         name='api_post_create'),
    path('api/posts/<slug>/',
         PostDetailAPIView.as_view(),
         name='api_post_detail'),
    path('api/posts/', PostListAPIView.as_view(), name='api_posts'),
]