def test_list_filter_month(self):
     request = self.factory.get('/events/?month=4')
     response = EventList.as_view()(request)
     self.assertEqual(response.status_code, 200)
Esempio 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'),
      	
]
Esempio n. 3
0
"""mondis 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.urls import path

from api.views import AddPerson, AddSlot, EventList

urlpatterns = [
    path('api/person/', AddPerson.as_view()),
    path('api/slot/', AddSlot.as_view()),
    path('api/event/list', EventList.as_view()),
]