From eeb9febc967942529b8ef47c8a14f11962dc9748 Mon Sep 17 00:00:00 2001 From: Norbert Date: Sat, 20 Jun 2020 07:48:31 +0200 Subject: [PATCH] add some colors --- .../__pycache__/urls.cpython-38.pyc | Bin 623 -> 692 bytes .../__pycache__/views.cpython-38.pyc | Bin 3349 -> 3599 bytes .../imguploader/templates/change.html | 67 ++++++++++- .../imguploader/templates/changeid.html | 110 +++++++++++++++--- .../imguploader/templates/failed.html | 51 ++++++++ .../imguploader/templates/index.html | 25 +++- .../imguploader/templates/search.html | 32 ++++- .../imguploader/templates/sukces.html | 49 ++++++++ .../imguploader/templates/upload.html | 33 +++++- bibrecognition/imguploader/urls.py | 2 + bibrecognition/imguploader/views.py | 10 ++ 11 files changed, 358 insertions(+), 21 deletions(-) create mode 100644 bibrecognition/imguploader/templates/failed.html create mode 100644 bibrecognition/imguploader/templates/sukces.html diff --git a/bibrecognition/imguploader/__pycache__/urls.cpython-38.pyc b/bibrecognition/imguploader/__pycache__/urls.cpython-38.pyc index c51b4beb8e6d09c53d3058a6ef60b6011186309a..21cf05c6cee4df135416ae245c203d855573b782 100644 GIT binary patch delta 220 zcmaFQvV~PUl$V!_0SI~*y^Tv|Vqka-;vfTVAjbiSi`PxmuCz*JOyNsq&*DwtPvPig z2J!@eJiZh`5HFoQia(VX1q{$cUZyUpg-hiszV>@>UR-C=f*v-Gyb&p(=$d0OEzKMjkQ*lwrs=_<)ucDPRJJU z{RBZIH(RO%(R|UioPg(LyYEGM60Ptn*yO*B4Do@LuMy6-x53C;UwIA@+l+yI*^yUiXmb<^;)BCl)X z%xy7ab@I5aX1vbFSvj`GbeGrJ0$u0&ks5?ahBa#PuItzh*{ zxg|S@lq@$ZPa{^ztCZaoDjS1!LuKK>NXRpQL4cZrvtXgvV0#DxQ8d+P$a64ZQfNr- ztv?2(`&D$Jx*kI0FyI2<1VNyysd%6cEF7P3hTuzLO9kut6wdH2S)9}UWW2wLCq=V} z@dm9y=t5>zp2Y`v4I2s!^|hJeFW#HxfvC*L^JJDg06Ph8%58-6sqn)^Q;GFQrgUV& zsGu6{?G$n@0hD%ap>}Z?RH>*_v5Rgf7tLjj1`|G|7vu|c)3Pns3ZjlHiLQ>l3jR`d|6HVQUO5b&~+FzobzYV|mrf89ict!`GSc==-8|Ct!6 zjgccqlfL$Vqc0qcgTr*`7MQ#)=q{z|EuKlZ;-!Qxd;Rap-O>HA-LdFz-;@?7 delta 1150 zcmZvb&rcIU6vyZ7Zg=~GLd%buRzO4%R*;}kKt&2#B}OGiB*q#{8g_w|?GI+RB$C!f zdo?jQ;SNX6cohE#Z|=p52QPXuF)_wCZx*GA_VDeS_vX#K`MkHUI=52I^U-LS@L&4* zm&aR)&E`&cyE(Y8%n?1g`SW{=4xUEMwX*5ByM)G>Bt3w(y{z;QAj#gykD#5!l(V-| z`~=#>#Z#Qzx=CAbeH7PnncB1&mv{}8x#$rZL%WZQrz{rpB`>gK*{0*c6766wmHtQ^ z<3d{5J0%UHd%qNb?sjx{U|OJ1&YP4bxUEYxiT+;Jr5+zSiRK9uJYJ8}Q)p`_B3nl* zigFrdkQLPaNDrD=E={p*^~k{A^5`%+$GBvJIorNbbc;?_v+~RH)OL8SAJs%-t*^Bi zm||I}Yghq7D&z?ZA$>8Q}`}8G2;a ze>;-%k%2(A3$%y3HX@5Fxx%tJyyE6{)0eD#fHAgypcLN;I>#9~y%iKE>0-S*z9$7~(f3U6w(|G3OeJpw{723!y_?6>v(n<@%ub{MGmXVoZ=i zaGq+Iw&|K)z;UTn@&|hew+LnetAKe1eS)nZ`VY)=7{?lXX4la|gdP+GK)=!fQR;aN zHhgio?clM3;mynomTH>TZu7vbo?t`K^@%pj8AX{w$)I4o;he*U1Sj%Eqima#{G%XF K5BnVLg}&cok?5cR diff --git a/bibrecognition/imguploader/templates/change.html b/bibrecognition/imguploader/templates/change.html index 1cc9000..9f9aa68 100644 --- a/bibrecognition/imguploader/templates/change.html +++ b/bibrecognition/imguploader/templates/change.html @@ -6,13 +6,76 @@ Search Photos + {% if form %}
{% csrf_token %} {{ form }} - +
{% endif %} {% if meta %} @@ -23,6 +86,8 @@ {% for nr in n.1 %}

{{ nr }}

{% endfor %} + Zmień + {% endfor %} diff --git a/bibrecognition/imguploader/templates/changeid.html b/bibrecognition/imguploader/templates/changeid.html index 7456b8a..0633c4a 100644 --- a/bibrecognition/imguploader/templates/changeid.html +++ b/bibrecognition/imguploader/templates/changeid.html @@ -6,24 +6,108 @@ Search Photos + {% if foto %} - -

Znalezione wartości:

- - {% for n in numery %} - {{ n }}, - {% endfor %} -

Nowe wartości (po przecinku):

-
- {% csrf_token %} - {{ form }} - -
+
+ + +

Znalezione wartości:

+ + {% for n in numery %} + {{ n }}, + {% endfor %} + +

Nowe wartości (po przecinku):

+
+ {% csrf_token %} + {{ form }} + +
+
-
{% endif %} diff --git a/bibrecognition/imguploader/templates/failed.html b/bibrecognition/imguploader/templates/failed.html new file mode 100644 index 0000000..34a9a59 --- /dev/null +++ b/bibrecognition/imguploader/templates/failed.html @@ -0,0 +1,51 @@ + + + + + + + Search Photos + + + + +
+

Bład

+ Wróć do głównej +
+ + + \ No newline at end of file diff --git a/bibrecognition/imguploader/templates/index.html b/bibrecognition/imguploader/templates/index.html index 94131d0..c6819f4 100644 --- a/bibrecognition/imguploader/templates/index.html +++ b/bibrecognition/imguploader/templates/index.html @@ -5,12 +5,27 @@ RunPhoto - + + {% if user.is_authenticated %} - Zalogowany 😎
- Załaduj zdjęcia
- Przeszukaj bazę
- Koryguj +

Zalogowany 😎


+ + {% else %} Gość 🏃‍♀️
Przeszukaj bazę diff --git a/bibrecognition/imguploader/templates/search.html b/bibrecognition/imguploader/templates/search.html index f119c11..b92a386 100644 --- a/bibrecognition/imguploader/templates/search.html +++ b/bibrecognition/imguploader/templates/search.html @@ -6,13 +6,43 @@ Search Photos + {% if form %}
{% csrf_token %} {{ form }} - +
{% endif %} {% if foto %} diff --git a/bibrecognition/imguploader/templates/sukces.html b/bibrecognition/imguploader/templates/sukces.html new file mode 100644 index 0000000..268125f --- /dev/null +++ b/bibrecognition/imguploader/templates/sukces.html @@ -0,0 +1,49 @@ + + + + + + + Search Photos + + + + +
+

Sukces

+ Wróć do głównej +
+ + + \ No newline at end of file diff --git a/bibrecognition/imguploader/templates/upload.html b/bibrecognition/imguploader/templates/upload.html index ad8c1ce..5244c77 100644 --- a/bibrecognition/imguploader/templates/upload.html +++ b/bibrecognition/imguploader/templates/upload.html @@ -5,11 +5,42 @@ Upload Photos +
{% csrf_token %} {{ form }} - +
\ No newline at end of file diff --git a/bibrecognition/imguploader/urls.py b/bibrecognition/imguploader/urls.py index fe7f252..919266a 100644 --- a/bibrecognition/imguploader/urls.py +++ b/bibrecognition/imguploader/urls.py @@ -10,6 +10,8 @@ urlpatterns = [ path('search', views.searchPhotos, name="search"), path('change', views.changePhotos, name="change"), path('change/', views.changePhotoID, name="changeid"), + path('success/', views.ss, name="ss"), + path('failed/', views.ff, name="ff"), diff --git a/bibrecognition/imguploader/views.py b/bibrecognition/imguploader/views.py index dd0f308..15ed393 100644 --- a/bibrecognition/imguploader/views.py +++ b/bibrecognition/imguploader/views.py @@ -112,6 +112,7 @@ def changePhotos(request): for numer in pm: numery.append(numer.meta_value) meta.append(numery) + meta.append(zdjecie.id) imgMeta.append(meta) return render(request, 'change.html', {'meta': imgMeta}) @@ -160,3 +161,12 @@ def changePhotoID(request, photo): return HttpResponseRedirect('/failed/') return render(request, 'changeid.html', {'photoid':photo,'foto': foto, 'numery': numery, 'form': form}) + +def ss(request): + + return render(request, 'sukces.html') + + +def ff(request): + + return render(request, 'failed.html')