from django.conf.urls import url from app.views import UserCreateView, UserDetailView, TaskCreateView, TaskDetailView urlpatterns = [ url(r'^user/$', UserCreateView.as_view(), name='user'), url(r'^user/(?P<pk>[0-9]+)$', UserDetailView.as_view(), name='detail'), url(r'^user_task/$', TaskCreateView.as_view(), name='task'), url(r'^user_task/(?P<pk>[0-9]+)$', TaskDetailView.as_view(), name='task_detail'), url(r'^(?P<fk>[0-9]+)/user_task/$', TaskDetailView.as_view(), name='task_detail'), ]
from django.conf.urls import url, include from django.contrib import admin from app.views import UserCreateView, LinkListView, LinkCreateView, LinkView, \ LinkUpdateView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', include('django.contrib.auth.urls')), url(r'^create_user/$', UserCreateView.as_view(), name="user_create_view"), url(r'^$', LinkListView.as_view(), name="link_list_view"), url(r'^newlink$', LinkCreateView.as_view(), name="link_create_view"), url(r'^pass/(?P<short_url>\w+)$', LinkView.as_view(), name="pass_through_view"), url(r'^link/(?P<pk>\d+)/update$', LinkUpdateView.as_view(), name="link_update_view"), ]
from django.conf.urls import url from app.views import UserListView, UserCreateView, UserDeleteView, UserEditView, UserDetailView, \ UserExportView urlpatterns = [ url(r'^users/$', UserListView.as_view(), name='user_list'), url(r'^users/export/$', UserExportView.as_view(), name='user_export'), url(r'^users/create/$', UserCreateView.as_view(), name='user_create'), url(r'^users/(?P<pk>[0-9]+)/$', UserDetailView.as_view(), name='user_detail'), url(r'^users/(?P<pk>[0-9]+)/edit/$', UserEditView.as_view(), name='user_edit'), url(r'^users/(?P<pk>[0-9]+)/delete/$', UserDeleteView.as_view(), name='user_delete'), ]
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.core.urlresolvers import reverse_lazy from django.contrib import admin from django.conf.urls.static import static from django.conf import settings from app.views import IndexView, UserCreateView, ProfileUpdateView, CheckInCreateView, FootballLocationListView, BasketballLocationListView, FootballCheckInListView, BasketballCheckInListView, FootballCheckInDetailsListView, BasketballCheckInDetailsListView, AllLocationsListView, get_places_view from django.views.generic import RedirectView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', include('django.contrib.auth.urls')), url(r'^$', AllLocationsListView.as_view(), name="all_locations_list_view"), url(r'^user_create/$', UserCreateView.as_view(), name='user_create_view'), url(r'^accounts/profile/$', ProfileUpdateView.as_view(), name='profile_update_view'), url(r'^choose_place/$', get_places_view, name='get_places_view'), url(r'^checkin/$', CheckInCreateView.as_view(), name='check_in_create_view'), url(r'^football_hot_spots/$', FootballLocationListView.as_view(), name='football_location_list_view'), url(r'^basketball_hot_spots/$', BasketballLocationListView.as_view(), name="basketball_location_list_view"), url(r'^football_location/(?P<pk>\d+)/checkins/$', FootballCheckInListView.as_view(), name='football_checkin_list_view'), url(r'^basketball_location/(?P<pk>\d+)/checkins/$', BasketballCheckInListView.as_view(), name='basketball_checkin_list_view'), url(r'^football_location/(?P<pk>\d+)/checkins/checkin_details/$', FootballCheckInDetailsListView.as_view(), name='football_checkin_details_list_view'), url(r'^basketball_location/(?P<pk>\d+)/checkins/checkin_details/$', BasketballCheckInDetailsListView.as_view(), name='basketball_checkin_details_list_view'), url(r'^all_locations/$', AllLocationsListView.as_view(), name='all_locations_list_view') ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
schema_view = get_swagger_view(title='GetIN Django API') urlpatterns = [ url(r'^$', schema_view), path('admin/', admin.site.urls), path(r'auth/', include('djoser.urls.base')), path(r'auth/', include('djoser.urls.authtoken')), path(r'api/v1/girls', GirlView.as_view(), name='girls'), path(r'api/v1/mapping_encounters', MappingEncounterView.as_view(), name='mapping-encounters'), path(r'api/v1/girls/(?P<pk>[-\w]+)', GirlDetailsView.as_view(), name='girls-details'), path(r'api/v1/users', UserCreateView.as_view(), name='users'), path(r'api/v1/districts', DistrictView.as_view(), name='districts'), path(r'api/v1/counties', CountyView.as_view(), name='counties'), path(r'api/v1/subcounties', SubCountyView.as_view(), name='subcounties'), path(r'api/v1/parishes', ParishView.as_view(), name='parishes'), path(r'api/v1/villages', VillageView.as_view(), name='villages'), path(r'api/v1/healthfacilities', HealthFacilityView.as_view(), name='health_facilities'), path(r'api/v1/mapping_encounter_webhook', csrf_exempt(ODKWebhook.as_view()), name='mapping_encounter_webhook'), path(r'api/v1/followups', FollowUpView.as_view(), name='followups'), path(r'api/v1/deliveries', DeliveriesView.as_view(), name='deliveries'), path(r'api/v1/appointments', AppointmentView.as_view(),
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 app.views import BookmarkView, BookmarkCreateView, redirect_view, UserCreateView, \ BookmarkUpdateView, BookmarkDeleteView, ProfileView urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', include('django.contrib.auth.urls')), url(r'^$', BookmarkView.as_view(), name="bookmark_view"), url(r'^profile/$', ProfileView.as_view(), name="profile_view"), url(r'^bookmarks/create_user/$', UserCreateView.as_view(), name="user_create_view"), url(r'^profile/create/$', BookmarkCreateView.as_view(), name="bookmark_create_view"), url(r'^profile/update/(?P<pk>\d+)/$', BookmarkUpdateView.as_view(), name="bookmark_update_view"), url(r'^profile/delete/(?P<pk>\d+)/$', BookmarkDeleteView.as_view(), name="bookmark_delete_view"), url(r'^bookmarks/(?P<short_url>\w+)/$', redirect_view, name="redirect_view"), ]
from django.conf.urls import patterns, include, url from app.views import PlatosListView, PlatoDetailView, UserCreateView, InicioView urlpatterns = patterns('', url(r'^$', InicioView.as_view(), name="incio"), url(r'^platos/$', PlatosListView.as_view(), name="platos"), url(r'^plato/(?P<pk>\d+)$', PlatoDetailView.as_view(), name="plato"), url(r'^register/$', UserCreateView.as_view(), name="register"), url(r'^create/$', 'app.views.add_plato', name="create"), url(r'^signup/$', 'app.views.signup', name="signup"), url(r'^signin/$', 'app.views.signin', name="signin"), url(r'^logout/$', 'app.views.salir', name="logout"), url(r'^profile/$', 'app.views.profile', name="profile"), url(r'^search/$', 'app.views.search', name="search"), url(r'^plato/precio/$', 'app.views.obtener_precio', name="precio"), url(r'^plato/guardar/comentario/$', 'app.views.guardar_comentario', name="comentario"), )
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 app.views import IndexView, UserCreateView, ProfileUpdateView, OrderCreateView, MenuItemCreateView, OrderListView, MenuItemListView, OrderUpdateView, OrderDetailView, CompleteFormView from django.conf import settings from django.conf.urls.static import static from django.views.decorators.http import require_POST urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^', include('django.contrib.auth.urls')), url(r'^$', IndexView.as_view(), name="index_view"), url(r'^user_create/$', UserCreateView.as_view(), name="user_create_view"), url(r'^accounts/profile/$', ProfileUpdateView.as_view(), name="profile_update_view"), url(r'^accounts/profile/order_create/$', OrderCreateView.as_view(), name="order_create_view"), url(r'^accounts/profile/order_update/(?P<pk>\d+)/$', OrderUpdateView.as_view(), name="order_update_view"), url(r'^accounts/profile/order_detail/(?P<pk>\d+)/$', OrderDetailView.as_view(), name="order_detail_view"), url(r'^accounts/profile/order_detail/(?P<pk>\d+)/complete_form/$', require_POST(CompleteFormView.as_view()), name="complete_form_view"), url(r'^menu_item_create/$', MenuItemCreateView.as_view(), name="menu_item_create_view"), url(r'^accounts/profile/order_list/$', OrderListView.as_view(), name="order_list_view"), url(r'^menu_item_list/$', MenuItemListView.as_view(), name="menu_item_list_view") ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from app.views import SentView from app.views import SpecialVacanciesView from app.views import UserCreateView from app.views import VacanciesView from app.views import VacancyView from django.contrib.auth.views import LogoutView handler404 = custom_handler404 handler500 = custom_handler500 urlpatterns = [ path('admin/', admin.site.urls), path('', HomeView.as_view(), name='index'), path('vacancies/', VacanciesView.as_view(), name='vacancies'), path('vacancies/cat/<str:specialty_title_str>/', SpecialVacanciesView.as_view()), path('companies/<int:company_id>/', CompanyCardView.as_view()), path('vacancies/<int:vacancy_id>/', VacancyView.as_view()), path('login/', MyLoginView.as_view(), name='login'), path('register/', UserCreateView.as_view(), name='register'), path('mycompany/', MyCompanyView.as_view(), name='company'), path('mycompany/vacancies/', MyCompanyVacanciesView.as_view()), path('mycompany/vacancies/<int:vacancy_id>/', OneVacanciesView.as_view()), path('vacancies/<int:vacancy_id>/send/', SentView.as_view()), path('logout/', LogoutView.as_view(), name='logout'), ] if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)