from django.contrib.auth.views import LogoutView from django.urls import path from vacancies.views import MainView, VacanciesAllView, VacancyView, \ CompanyView, SpecialitiesView, CompaniesAllView, \ MyCompanylVacancyListView, MyCompanyVacancyEditView, MyCompanyView, VacancySendApplicationView, \ about_view, CustomLoginView, RegisterView urlpatterns = [ path('', MainView.as_view(), name='main'), path('vacancies/', VacanciesAllView.as_view(), name='all_vacancies'), path('vacancies/cat/<str:spec_code>/', SpecialitiesView.as_view(), name='specialty'), path('companies/<int:company_id>/', CompanyView.as_view(), name='company_card'), path('vacancies/<int:vacancy_id>/', VacancyView.as_view(), name='vacancy'), path('companies/', CompaniesAllView.as_view(), name='all_companies'), path('about/', about_view, name='about'), path('vacancies/<int:vacancy_id>/send/', VacancySendApplicationView.as_view(), name='vacancy_send'), path('mycompany/', MyCompanyView.as_view(), name='mycompany'), path('mycompany/vacancies/', MyCompanylVacancyListView.as_view(), name='mycompany_vacancy_list'), path('mycompany/vacancies/<int:vacancy_id>/', MyCompanyVacancyEditView.as_view(), name='mycompany_vacancy'), path('login/', CustomLoginView.as_view(), name='login'), path('logout/', LogoutView.as_view(), name='logout'),
from django.conf.urls.static import static from vacancies.views import custom_handler404 from django.contrib.auth.views import LogoutView from vacancies.views import MainView, VacanciesView,\ SpecializationView, CompanyView, VacancyView,\ MySignupView, VacanciesSendView, MyCompanyEditView,\ MyVacanciesView, MyVacancyEditView, MyLoginView,\ MyCompanyCreateView, MyVacanciesСreateView handler404 = custom_handler404 urlpatterns = [ path('admin/', admin.site.urls), path('', MainView.as_view()), path('vacancies/', VacanciesView.as_view()), path('vacancies/cat/<str:specialty>', SpecializationView.as_view()), path('companies/<int:id>', CompanyView.as_view()), path('vacancies/<int:id>', VacancyView.as_view()), path('vacancies/<vacancy_id>/send', VacanciesSendView.as_view()), path('mycompany/edit', MyCompanyEditView.as_view(), name='my_company'), path('mycompany/create', MyCompanyCreateView.as_view(), name='my_company_cr'), path('mycompany/vacancies', MyVacanciesView.as_view(), name='mycompany_vac'), path('mycompany/vacancies/create', MyVacanciesСreateView.as_view(), name='my_vacancy_cr'),
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.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.contrib import admin from django.urls import path from vacancies.views import MainView, AllPositionsView, \ CompanyView, SpecialtyPositionsView, \ PositionView urlpatterns = [ path('admin/', admin.site.urls), path("", MainView.as_view()), path("company/<str:company>/", CompanyView.as_view()), path("vacancies/", AllPositionsView.as_view()), path("vacancy/<int:pk>/", PositionView.as_view()), path("vacancy/cat/<str:specialty>", SpecialtyPositionsView.as_view()), ]
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 import settings from django.conf.urls.static import static from django.contrib import admin from django.urls import path from vacancies.views import MainView, VacancyCatView, CompaniesView, VacancyView urlpatterns = [ path('admin/', admin.site.urls), path('', MainView.as_view(), name='home'), path('vacancies/cat/<str:specialty_code>', VacancyCatView.as_view(), name='vacancies_cat'), path('vacancy/<int:vacancy_id>', VacancyView.as_view(), name='vacancy'), #path('vacancies/', VacanciesView.as_view(), name='vacancies'), path('companies/<str:company_name>', CompaniesView.as_view(), name='company'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) #if settings.DEBUG: # urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.urls import path from vacancies.views import MainView, VacancyCatView, VacancyListView, CompanyView, VacancyInfoView urlpatterns = [ path('', MainView.as_view(), name='main_page'), path('vacancies/', VacancyListView.as_view(), name='vacancies_page'), path('vacancies/cat/<str:category_name>', VacancyCatView.as_view(), name='category_page'), path('companies/<int:id>', CompanyView.as_view(), name='company_page'), path('vacancies/<int:id>', VacancyInfoView.as_view(), name='vacancy_info'), ]
from django.urls import path from django.contrib.auth.decorators import login_required from vacancies.views import MainView, CompanyView, CompaniesView, \ VacancyView, VacanciesView, VacancyBySpecialisationView, \ MyLoginView, MyLogoutView, SignupView, \ MyCompanyUpdateView, MyCompanyCreateView, MyCompanyPlugView, \ MyVacancyUpdateView, MyVacanciesView, MyVacancyCreateView, MyVacancyApplicatiosView,\ MyResumeUpdateView, MyResumeCreateView, MyResumePlugView, SearchView urlpatterns = [ path('', MainView.as_view(), name='index'), path('vacancies/', VacanciesView.as_view(), name='vacancies'), path('vacancies/<int:pk>/', VacancyView.as_view(), name='vacancy'), path('companies/<int:pk>/', CompanyView.as_view(), name='company'), path('companies/', CompaniesView.as_view()), path('vacancies/cat/<str:specialisation>/', VacancyBySpecialisationView.as_view(), name='vacancy_specialisation'), path('login/', MyLoginView.as_view(), name='login'), path('logout/', MyLogoutView.as_view(), name='logout'), path('signup/', SignupView.as_view(), name='signup'), path('mycompany/', login_required(MyCompanyUpdateView.as_view()), name='mycompany'), path('mycompany/plug/', login_required(MyCompanyPlugView.as_view()), name='mycompany_plug'), path('mycompany/create/', login_required(MyCompanyCreateView.as_view()), name='mycompany_create'), path('myresume/', login_required(MyResumeUpdateView.as_view()), name='myresume'), path('myresume/plug/', login_required(MyResumePlugView.as_view()), name='myresume_plug'), path('myresume/create/', login_required(MyResumeCreateView.as_view()), name='myresume_create'), path('myvacancy/<int:pk>', login_required(MyVacancyUpdateView.as_view()), name='myvacancy_update'), path('myvacancy/create/', login_required(MyVacancyCreateView.as_view()), name='myvacancy_create'), path('myvacancies/', login_required(MyVacanciesView.as_view()), name='myvacancies'), path('myvacancy/<int:pk>/applications/',
from django.conf import settings from django.urls import include, path, re_path from vacancies.views import CompanyView, MainView, VacanciesView, VacancyView, custom_500 handler500 = custom_500 urlpatterns = [ path("", MainView.as_view(), name="main"), re_path(r"^vacancies/(?:cat/(?P<slug>\w+))?$", VacanciesView.as_view(), name="vacancies"), path("vacancies/<int:pk>", VacancyView.as_view(), name="vacancy"), path("companies/<int:pk>", CompanyView.as_view(), name="company"), ] if settings.DEBUG: import debug_toolbar urlpatterns += [path("__debug__/", include(debug_toolbar.urls))]
from django.contrib import admin from django.urls import include from django.urls import path from django.urls import re_path from vacancies.views import CompanyView from vacancies.views import VacanciesBySpecialtyView from vacancies.views import MainView from vacancies.views import VacanciesView from vacancies.views import VacancyView urlpatterns = [ path( '', MainView.as_view(), name='main'), path( 'vacancies/', VacanciesView.as_view(), name='vacancies'), path( 'jobs/cat/<str:cat_id>/', VacanciesBySpecialtyView.as_view(), name='vacancies_by_specialty'), path( 'companies/<int:company_id>/', CompanyView.as_view(), name='company'), path( 'jobs/<int:job_id>/',