From dcd567f9795858ddaef6ede07e00c91e277a7e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=99drzej=20Klepacki?= Date: Sun, 3 Jan 2021 15:10:42 +0100 Subject: [PATCH] fixy --- .../__pycache__/settings.cpython-37.pyc | Bin 2538 -> 2567 bytes SocialHelper/SocialHelper/settings.py | 1 + .../enGB/__pycache__/urls.cpython-37.pyc | Bin 1327 -> 1319 bytes .../enGB/__pycache__/views.cpython-37.pyc | Bin 10870 -> 10937 bytes .../enGB/templates/enGB/add_comment.html | 2 +- .../enGB/templates/enGB/add_offer.html | 2 +- .../enGB/templates/enGB/create_user.html | 2 +- .../enGB/templates/enGB/edit_user.html | 2 +- .../templates/enGB/edycja_ogloszenia.html | 2 +- SocialHelper/enGB/templates/enGB/index.html | 2 +- .../enGB/templates/enGB/my_offer.html | 2 +- .../enGB/templates/enGB/user_profile.html | 4 +- SocialHelper/enGB/templates/ennavbar.html | 4 +- SocialHelper/enGB/urls.py | 38 +++++++++--------- SocialHelper/enGB/views.py | 9 +++-- .../homepage/__pycache__/views.cpython-37.pyc | Bin 10850 -> 10922 bytes .../migrations/0002_auto_20210103_1457.py | 14 +++++++ .../0002_auto_20210103_1457.cpython-37.pyc | Bin 0 -> 515 bytes .../templates/homepage/user_profile.html | 2 + SocialHelper/homepage/views.py | 7 +++- 20 files changed, 58 insertions(+), 35 deletions(-) create mode 100644 SocialHelper/homepage/migrations/0002_auto_20210103_1457.py create mode 100644 SocialHelper/homepage/migrations/__pycache__/0002_auto_20210103_1457.cpython-37.pyc diff --git a/SocialHelper/SocialHelper/__pycache__/settings.cpython-37.pyc b/SocialHelper/SocialHelper/__pycache__/settings.cpython-37.pyc index e2a7a8e0627a4978b015a8957ad4404999006460..4584a4dd4dd97b359b0be842e6d99d35197d2575 100644 GIT binary patch delta 293 zcmX|+y-veG5QOh8hZ6_vB(@VfKm3!J@MEB+K{Px74cZ0)V@^&Hqc}Y!HKa{J8eSj; z4?*67j*gy!BN7>DM*FQ+8ts?+PpdefTFiUm)sGDvP6P!DiZs=6M2*Gfcp`Lp6XKF} zPo^FI#seR{o4!h;yR<(XB)8E+nhn(;&ZZyY-Ei*pqf!)dt-Q=hAq~MtFXq)RBIHFU delta 253 zcmX|)J5NGE5Jq=5D+0P);9lP16TRTOwKFy*wszCl9J0B#{s2pALraV_HkKrI{uwPy z>};)EN#sk;mpPM3W|Vxz>4kGe6%xIC-@H4eKK|rC`7oRZ?tUK9%X^=fB90OfWhzvO z{j#i($SO6ju+(YLq($4?Ow*ZIuf?$@CAzG$!6sX5vol%Bv_$mS4Ocz(=AF*FpJ{KU z%s?vaOBE||APLksJCOQN-09_UtX;%nVGkXTpFjOVV5Pl0#UZ#<(F+OmO=FOh zN|7{3OJzuL$V%l%3DBkTq$Cuiilh`6QYBIv_NB_C43woRq%2fH@_?9wn$)2j+-$8* z(xD;8nxs6mq}rqcbXemI1~D)#(rLiaQqes(B{;tHbWYr7Z%^Gr;eL5_BaUJs0Pp(? z%LHd=ul?p|gw{GnfOey124J^p~wDN8=Ix N`dWc5tLuLFoIk=Xr49f9 delta 633 zcmX}qJ5Iwu5C-5lPD0{f=N%^@ycHfL6%`F9K%(0wvNDq>$XO#}BdDmLiv-#OP*Ncz z4uCiUb$SkfxB#>E1WT6v&5mdPmHcA8S^HECiI3l}}Q*I;{|bu*$5JLj3hUG-?37N~q*l+~Vjq`=&yjtBFY{Apg^i4~N|exkxJ%Q(Vb7Lw_rgpy;3GRprTqKGn$ zqRanbgoSc;n+6aL(m8#MkiCkM<9T#oz0oK{kCx*r48son61v8p=$fV!;35K~VSV7^7e|Lm8?2+eh diff --git a/SocialHelper/enGB/__pycache__/views.cpython-37.pyc b/SocialHelper/enGB/__pycache__/views.cpython-37.pyc index 97f424ec03961977ac325c85a6d6c03597c49303..82b5a6333f7d1a4d253c9b550a30632bd390ab38 100644 GIT binary patch delta 1310 zcmZ9M%WoT16o==G$9BdUKjOHQI(3^gaT+%vJW>{=DXAj$rIM7iHjg|y7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M*K5ueGw-{x))JZk(x_gPAL@F>5CJfs5u+H^B?1_O;C%WchBI$yikyg*|0+i0}q zJB-Wij-oXJM!7B4r+zP*TnX>?SjYI6*vO)ZsV2}2qTnPL2K#_~$SJf`Fa~}AGW^qM zeH1ym#{pj4Iss&;S+w>7uOJ<^de9y$!U@n0Hh~OCfjBq|#=(!Eo(Z(hfjoCLMEP#Z z6iwEQ*4Ju_4BWufN71tp?~Eaib-h}&a~JZ}>g9@MirfvvJ3~`gT>?Mxbo@WM%KaN( zlFe<2#3y+kNVL!#k0s90bv9btYR?jXl3)JWX1iniwhFe`4laOM!F;6ao9>=us;@V_ z;AY47?LS~yn5)*-IyO>pJuowut4vH3Eq>Ga<>EC=eaO5I-G1;{4K8Es3iyy)nO38o z);UZqf#1Ll@H^NA=D`ARfD3*Gw1{Nht#wfpZremx7609w5oa>qo!BaiDNlo} zs5~5du!9Ujtp_0kpW;IIUzBCN=j`H|SYazmitBMaB`SFwGHIDsysL`qwN;Fm9>-hq znciiOtJ;3K27PszT%X;r5-@$M7L4@oP6?nX8pmQxl`A;}a{qrLY#Nry($Wc717d4Q_?AlXmX_*HVthD%7oVZnN^QYe=5xl++ATc^1z zl@upuI5iQ#@leQ5wZ|zUI?7MBm_47BJ%&x>y^__Hwa@aw-krU&u8i&VOO@%1GsWC= zrI4Sl-ws)Cd2N!SjIDa!G;@W@%uKOtKd=4MYf}3WY+L~6!6di}uJiuBdFpr%?@|cD diff --git a/SocialHelper/enGB/templates/enGB/add_comment.html b/SocialHelper/enGB/templates/enGB/add_comment.html index 27677d6..f9137c2 100644 --- a/SocialHelper/enGB/templates/enGB/add_comment.html +++ b/SocialHelper/enGB/templates/enGB/add_comment.html @@ -17,7 +17,7 @@ -
+ {% csrf_token %} {{ form.media }} {{ form.as_p }} diff --git a/SocialHelper/enGB/templates/enGB/add_offer.html b/SocialHelper/enGB/templates/enGB/add_offer.html index 5ccb5f4..b5596e0 100644 --- a/SocialHelper/enGB/templates/enGB/add_offer.html +++ b/SocialHelper/enGB/templates/enGB/add_offer.html @@ -18,7 +18,7 @@ - + {% csrf_token %} {{ form.media }} {{ form.as_p }} diff --git a/SocialHelper/enGB/templates/enGB/create_user.html b/SocialHelper/enGB/templates/enGB/create_user.html index b7a7a96..9e4b7b3 100644 --- a/SocialHelper/enGB/templates/enGB/create_user.html +++ b/SocialHelper/enGB/templates/enGB/create_user.html @@ -102,7 +102,7 @@ body {font-family: Arial, Helvetica, sans-serif;} - + {% csrf_token %} {{ form.media }} {{ form.as_p }} diff --git a/SocialHelper/enGB/templates/enGB/edit_user.html b/SocialHelper/enGB/templates/enGB/edit_user.html index acc8a9c..3d3be4a 100644 --- a/SocialHelper/enGB/templates/enGB/edit_user.html +++ b/SocialHelper/enGB/templates/enGB/edit_user.html @@ -16,7 +16,7 @@ - + {% csrf_token %} {{ form.media }} {{ form.as_p }} diff --git a/SocialHelper/enGB/templates/enGB/edycja_ogloszenia.html b/SocialHelper/enGB/templates/enGB/edycja_ogloszenia.html index 54c4929..a3e85c1 100644 --- a/SocialHelper/enGB/templates/enGB/edycja_ogloszenia.html +++ b/SocialHelper/enGB/templates/enGB/edycja_ogloszenia.html @@ -16,7 +16,7 @@ - + {% csrf_token %} {{ form.media }} {{ form.as_p }} diff --git a/SocialHelper/enGB/templates/enGB/index.html b/SocialHelper/enGB/templates/enGB/index.html index 8f2c1e6..5002754 100644 --- a/SocialHelper/enGB/templates/enGB/index.html +++ b/SocialHelper/enGB/templates/enGB/index.html @@ -85,7 +85,7 @@ - + {% csrf_token %} diff --git a/SocialHelper/enGB/templates/enGB/my_offer.html b/SocialHelper/enGB/templates/enGB/my_offer.html index 94100bd..e403f12 100644 --- a/SocialHelper/enGB/templates/enGB/my_offer.html +++ b/SocialHelper/enGB/templates/enGB/my_offer.html @@ -67,7 +67,7 @@ - + {% csrf_token %} diff --git a/SocialHelper/enGB/templates/enGB/user_profile.html b/SocialHelper/enGB/templates/enGB/user_profile.html index 19e26e9..235db81 100644 --- a/SocialHelper/enGB/templates/enGB/user_profile.html +++ b/SocialHelper/enGB/templates/enGB/user_profile.html @@ -80,7 +80,7 @@ - + {% csrf_token %} @@ -113,7 +113,7 @@ - + {% csrf_token %} diff --git a/SocialHelper/enGB/templates/ennavbar.html b/SocialHelper/enGB/templates/ennavbar.html index 7f11164..e820520 100644 --- a/SocialHelper/enGB/templates/ennavbar.html +++ b/SocialHelper/enGB/templates/ennavbar.html @@ -15,7 +15,7 @@ diff --git a/SocialHelper/homepage/views.py b/SocialHelper/homepage/views.py index 854a730..c3083d1 100644 --- a/SocialHelper/homepage/views.py +++ b/SocialHelper/homepage/views.py @@ -128,7 +128,7 @@ def filter(request): if place_local != "": - all_product = all_product.filter(place=place_local) + all_product = all_product.filter(place__unaccent__icontains=place_local) if oddam_local == "on" and potrzebuje_local != "on": zmienna = 2 @@ -434,7 +434,10 @@ def logout_user(request): def user_profile(request, user_name): User = get_user_model() - user_prof = User.objects.filter(username=user_name).first() + if User.objects.filter(username=user_name).exists(): + user_prof = User.objects.filter(username=user_name).first() + else: + user_prof = User.objects.filter(email=user_name).first() all_product = Product.objects.filter(active = True, user_iden = user_prof.id) oceny = Ocena.objects.filter(user_iden = user_prof.id)