From baa58a13fae264432bdc4c0edb00e36015d0286e Mon Sep 17 00:00:00 2001 From: skpptf Date: Mon, 7 Jun 2021 23:17:41 +0300 Subject: [PATCH 1/2] Empty commit From 34c9f860fd18cd58839c4851b6de12e00fd1b309 Mon Sep 17 00:00:00 2001 From: skpptf Date: Mon, 16 Aug 2021 12:01:06 +0300 Subject: [PATCH 2/2] add login required for add --- api/views.py | 5 ++++- db.sqlite3 | Bin 18251776 -> 18251776 bytes 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/api/views.py b/api/views.py index 2901f40..849eb6b 100644 --- a/api/views.py +++ b/api/views.py @@ -111,7 +111,7 @@ def get_all_places_ids_in_location_area_by_id(request): # else: # responce.append({'id':location.id, 'name':str(location)}) return Response(responce) - +@login_required def all_locations_with_full_name(request): all_locations = Place.objects.filter(is_location=True) response = '

Все населенные пункты

' @@ -121,6 +121,7 @@ def all_locations_with_full_name(request): response += "

The end

" return HttpResponse(response) +@login_required def all_locations_without_area(request): all_locations = Place.objects.filter(is_location=True) response = '

Все населенные пункты без районов

' @@ -131,6 +132,7 @@ def all_locations_without_area(request): response += "

The end

" return HttpResponse(response) +@login_required def all_locations_without_region(request): all_locations = Place.objects.filter(is_location=True) response = '

Все населенные пункты без районов

' @@ -141,6 +143,7 @@ def all_locations_without_region(request): response += "

The end

" return HttpResponse(response) +@login_required def all_locations_have_child(request): all_locations = Place.objects.all() response = '

Все локации имеющие наследников

' diff --git a/db.sqlite3 b/db.sqlite3 index 8da4545636f0c2f15792871da3e72bd4a2c27eeb..09d0252b78d553d4f0fb7f0491d85cc6a5c56247 100644 GIT binary patch delta 1359 zcmZwHS3u2C0LStFzyEFBTm4HRib7<|-f0+_3E5k+O4+NpBrDV{Tq_ybqq43oviDwD zW$(R5zQ;=*Jbb=y=XajY(d%zn>5{#mcs@B@v1uNwRT;{Qzf^d%BHQR<&xPq^JRs8m0`o zADgBaL-S;BjhZXD8GKzd#T8#U>Cm#G({u7X_$@~n2A}4!)(mKT*M;*1|%X0^DrL^V8lW!!eT7JQY2#;Qm`B= zuoA0~iq%+ywOEJs*no}Lgw5E3G^8T~Td@t>u>(6{!Y=H_9_+0}Yl7-@dEv{{ZR^oh%jasH6}fWXS-oUU zQprebab*4ko5OB$+Ou=>?H048Fruh1(~@N?o>(+F(wOBwR#}^t8=I()iXCn-S#6Ut z&5nWsOUjr;TULBb{D|ZM$@YXaXS&gxXU$F@m=oq0onkTSjfOCNWSGIMGa91I5m5$X zxZYqgnGIT{N#&))sgxWgPN`F>QuSKN+V-ILk7(8IxSE81p>mS+e+QPuL+*{0x{}74 zy2cu*&rrV>wsfeJdS$Irs(1qOqDS4oe%qH7sP;HorRd&0Wvlex*OA4vd&{csbDCQv zs3F4(8ni=uc%uWf@PRM<;12~I5r9tUj6ghq2hjyx(G6msAOxcadLjfmJcM58jZi#{ zN6-g-(GQQ}F+7eigrh(7Fu;fim|#XE2Ec-Wh{6*Xgu#f$5DbMCF^I*J7>3~(fjGn? z0f~4DNq8E`NI@!|!ALxdQ5cOecn)bu$MbjrFXAP@afXOJt6ih`CrlAnCD9oUIo*o{5di+$LS1NaF);~);< zFpl6Te!;J3KqH#)8;;>PPM{erIEhm@jon z{Ds@NgTL_)?&4px&g0uJgNRy07V#3%h_n-FFXAoIK}0L!BjPLKC*m)nh;$SQ5a}e+ OStL-}#6Lj_aoqzA@0-8?