From 981b39b2fb289d09a5837010a6de71c834bd3d9c Mon Sep 17 00:00:00 2001 From: Alicja Kupczyk Date: Sat, 2 Jan 2021 17:05:39 +0100 Subject: [PATCH] filtrowanie ogloszen wolontariat --- .../__pycache__/__init__.cpython-38.pyc | Bin 222 -> 222 bytes .../__pycache__/settings.cpython-38.pyc | Bin 2610 -> 2627 bytes .../__pycache__/urls.cpython-38.pyc | Bin 571 -> 571 bytes .../__pycache__/wsgi.cpython-38.pyc | Bin 635 -> 635 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 218 -> 218 bytes .../homepage/__pycache__/admin.cpython-38.pyc | Bin 393 -> 393 bytes .../homepage/__pycache__/apps.cpython-38.pyc | Bin 442 -> 442 bytes .../__pycache__/models.cpython-38.pyc | Bin 1618 -> 1618 bytes .../homepage/__pycache__/urls.cpython-38.pyc | Bin 1272 -> 1272 bytes .../homepage/__pycache__/views.cpython-38.pyc | Bin 9842 -> 10066 bytes .../homepage/migrations/0001_initial.py | 20 +++++++++++++- .../migrations/0002_product_wolontatriat.py | 18 ------------- .../homepage/migrations/0003_places.py | 21 --------------- .../homepage/migrations/0004_ocena.py | 25 ------------------ .../__pycache__/0001_initial.cpython-38.pyc | Bin 1446 -> 1721 bytes .../0002_product_wolontatriat.cpython-38.pyc | Bin 660 -> 661 bytes .../__pycache__/0003_places.cpython-38.pyc | Bin 789 -> 789 bytes .../__pycache__/0004_ocena.cpython-38.pyc | Bin 1028 -> 1028 bytes .../0005_auto_20210102_1308.cpython-38.pyc | Bin 0 -> 715 bytes .../__pycache__/__init__.cpython-38.pyc | Bin 229 -> 229 bytes .../homepage/templates/homepage/index.html | 9 ++++--- SocialHelper/homepage/views.py | 5 ++++ 22 files changed, 30 insertions(+), 68 deletions(-) delete mode 100644 SocialHelper/homepage/migrations/0002_product_wolontatriat.py delete mode 100644 SocialHelper/homepage/migrations/0003_places.py delete mode 100644 SocialHelper/homepage/migrations/0004_ocena.py create mode 100644 SocialHelper/homepage/migrations/__pycache__/0005_auto_20210102_1308.cpython-38.pyc diff --git a/SocialHelper/SocialHelper/__pycache__/__init__.cpython-38.pyc b/SocialHelper/SocialHelper/__pycache__/__init__.cpython-38.pyc index 68a52698af9d41069581485ea07af239319a8c17..c1d440b6e56ae04ae0b8ad480a2ef2bc0cff9f6b 100644 GIT binary patch delta 19 Zcmcb|c#n}gl$V!_0SM#^K1}4k3;-{&1u*~s delta 19 Zcmcb|c#n}gl$V!_0SF#GzB-ZnG5|IZ21@_{ diff --git a/SocialHelper/SocialHelper/__pycache__/settings.cpython-38.pyc b/SocialHelper/SocialHelper/__pycache__/settings.cpython-38.pyc index 4395923e728c5ac957c8014f1a1920040eade175..e60502717a3b1a05caf2b2e982a24afd5c7ef019 100644 GIT binary patch delta 176 zcmdlaa#(~nl$V!_0SLSsKg7FCyV#k4>?l`TbkAybqDoTmfiNv7yVNx?<* z7BZzXMoFhI1v6;sCmJ#`FmSnKZ8l*1%_6{GoS&STn3Iv3Q;=Gel4P`5i;aT?0A9B( A5&!@I delta 159 zcmX>svPpzDl$V!_0SK<9K90AY$h)LoE=4{?Aw_WxYbIk9e~MCyawa2?Q~{H!U{WoU zF`Xq!AVob&FhwIuD1{|T7>GrHSTsd5N-UKzi)n#)DqD)yLZ&DQI8PhMlT6Wxl7frq jE@Vn)jFL`a3TDvMOEhF;VBm7e+HAo1n`N^N8#@aCvOgzR diff --git a/SocialHelper/SocialHelper/__pycache__/urls.cpython-38.pyc b/SocialHelper/SocialHelper/__pycache__/urls.cpython-38.pyc index ed2bd050f0b1de2884bb00814e252f9453b385d2..ab730d386c1e2028e98f353fdc3ab1d60454c015 100644 GIT binary patch delta 35 ocmdnZvYUlFl$V!_0SM#^K1}3(#27X4-2yf~Ais!j@)XA90HlQp-2eap delta 35 pcmdnZvYUlFl$V!_0SJD@Uz^DNi1F6McMI6~f&3!=$x|4Y0|2{u3l9JQ diff --git a/SocialHelper/SocialHelper/__pycache__/wsgi.cpython-38.pyc b/SocialHelper/SocialHelper/__pycache__/wsgi.cpython-38.pyc index 7b342decccbc4ab326e0792cd79bcd61eab23b51..a8ed10dc9e1028c86d3f79c9ab5fdd4f3b6de373 100644 GIT binary patch delta 20 acmey(@|%S_l$V!_0SM#^K5XPJU;+R+SOqWu delta 20 acmey(@|%S_l$V!_0SF#GzPgdSfC&IV(FRHY diff --git a/SocialHelper/homepage/__pycache__/__init__.cpython-38.pyc b/SocialHelper/homepage/__pycache__/__init__.cpython-38.pyc index 307dc2f9b574d297247ad9f6ca2af0e83dfe9b13..056faa20136fb39855f9c55b132338f2d8731852 100644 GIT binary patch delta 19 Zcmcb`c#Dxcl$V!_0SM#^K1}334*)M61tkCg delta 19 Zcmcb`c#Dxcl$V!_0SF#GzB-ZnJODL(20s7* diff --git a/SocialHelper/homepage/__pycache__/admin.cpython-38.pyc b/SocialHelper/homepage/__pycache__/admin.cpython-38.pyc index 16c544c2dc70e51a668334d1068795044c3d56af..13e3b82174748418c50e68e2c3a24589042f0735 100644 GIT binary patch delta 20 ZcmeBV?quc;<>lpK00Q}f4;#7b7y&3_1Xln6 delta 20 acmeBV?quc;<>lpK0D`hL?>BPSF#-TACj{vL diff --git a/SocialHelper/homepage/__pycache__/apps.cpython-38.pyc b/SocialHelper/homepage/__pycache__/apps.cpython-38.pyc index 00392ff0f7eb359c4eb2f3eea37ab769acfba968..5692f5ce296a7b03d9b86daec57b660678030270 100644 GIT binary patch delta 20 acmdnRyo;GTl$V!_0SM#^K5XP(&jit delta 20 acmcb_bBTvLl$V!_0SL<0yx+*}&ISNC*acev diff --git a/SocialHelper/homepage/__pycache__/urls.cpython-38.pyc b/SocialHelper/homepage/__pycache__/urls.cpython-38.pyc index 429b07badd4330c5ea7ece8b0ada9c907b6db360..c2046939cf3d0f0f69e0a996e357a42db9817ec3 100644 GIT binary patch delta 20 acmeyt`Gb=?l$V!_0SM#^K5XQE%K`v8mIbo_ delta 20 acmeyt`Gb=?l$V!_0SL<0yx++EmIVMlS_VY` diff --git a/SocialHelper/homepage/__pycache__/views.cpython-38.pyc b/SocialHelper/homepage/__pycache__/views.cpython-38.pyc index 1fb90673828eec05c8846864d925017e443217c6..c6fbc6c8300224674e720fa2412f47b024d0dbec 100644 GIT binary patch delta 1278 zcmZvcOKcNI7{~Y9U2n#_>qp{LsuLiMW6~HxQb?j!6r_qrc{?dFk3@judaXimY&2Pk zs+uL0IB=p6O+-N;H5`%JL+ji?J@j6wLY#a86%bMnv=u$K^Isr9=&t6s-^@4PQ#1Sb z{=513p;*k;)Kk3rXYsEsKgO4$@tB%M)!44a>?iWKXpecBxGn#Q4$W!PmS?B6fCVZ zelAoz3peQe*;@e^93WYQ^~h^QSidE(eHJ)=RM_W+HSDG^=+Xq zI>Hs&P5nHLYq?auz~5CZ;2jE0b8K|H(3F(zSAFY!|)xzWicsOcVgzT> zUlyENEXLQtb~UhG&a;$!YS?yESr)7Ha;Yl+a5j$YS6WSvlTEG~%dg4E)stlYFYU%Y zcdOpX_rUYVz-C}Kun8EI-^ahCy>e}0k|yNWiNO|*IDAarN$iY_EAf`Jl4Tl~)5&j~ zB2;l;N*b*@>3(BR>pbNru(Afo05}T#01(E>LmCCffFXrX3%nEZK>$H`0XPJFCi_yA z!;=vA0-?7s=5b6-;23Zi2n#y_>9v|LJp$|ijsjukQ}XvzE*oaskHs#a1bhyZffv<( z(B4N+8WZgYBJYG*;F!OjioBhEuN_XC?rg;`o+-`Fo~?6F_2p^0N~;>jI?mA>?RwOC zkjjmZR{f$6y(%jLuUmi>1qN6<2fRppLsyY_<6>8V23D9Su*+KZF$F1X(l$uPWuki% zeJ8hdU!o~_w|jtokd%2yx8&o@jkbMiOVh5GE45N_y5iON3Axadqo(}1r)MT6VkJEl42>NTn^+s(|tljhL7qAEHpc%7=Wo)@~Dlwbf}OnoRM) zg_x+(rw|P!5)YEd#jJmU7dRPX;-yF9ftyATUNkyyQ9J7MKGPNORtgAo1HMW1x9qxW%1$pcGAS^-F5e+p!t!)w zN}zMh!T)wTr@OPFWfyhzuiZ{pEW1Egbk7dE(~4hb`Bwb;f9-a9>Uop;$fzF*yJaNof*-Ib|qiq>`CfhEDL=gwZDuXApIW zF8He6ARS5{}A_frSh;1iBbr8{l7(!T;YY_B?gI2YNanXmkh=?IBA>xP#T=O0vAIvA- zE=RFdg&UW*l>*=Q?DOKLIVGLQXjfzD^mK~qye~&e4N_t*mClfV+7&AABje`H^49|I z`AOgI(yh~Eaqk(#?<$i%jTq(|UzF5rwZMT69)uIIc?&369ce~s40fWG^W$>oeGgCt>#Kt*nFaoV6@8TUgM5wE11v)6RH{re>>|TzY}+*3-CGA WT~sR`6GgE>Y!^LZwWx{?vFsNlX5qX5 diff --git a/SocialHelper/homepage/migrations/0001_initial.py b/SocialHelper/homepage/migrations/0001_initial.py index c7ffa2c..f117fdc 100644 --- a/SocialHelper/homepage/migrations/0001_initial.py +++ b/SocialHelper/homepage/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.1.4 on 2020-12-20 16:51 +# Generated by Django 3.1.4 on 2021-01-02 14:27 import datetime from django.conf import settings @@ -15,11 +15,20 @@ class Migration(migrations.Migration): ] operations = [ + migrations.CreateModel( + name='Places', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('city', models.TextField(default='', max_length=40)), + ('woj_city', models.TextField(default='', max_length=40)), + ], + ), migrations.CreateModel( name='Product', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('active', models.BooleanField(default=True)), + ('Wolontatriat', models.BooleanField(default=False)), ('picture', models.ImageField(blank=True, null=True, upload_to='images/')), ('create_date', models.DateField(default=datetime.date.today, verbose_name='Date')), ('type', models.IntegerField(choices=[(1, 'Potrzebuje'), (2, 'Oddam')], default='')), @@ -31,4 +40,13 @@ class Migration(migrations.Migration): ('user_iden', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), + migrations.CreateModel( + name='Ocena', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('comm', models.TextField(default='', max_length=40)), + ('ocena_jedn', models.FloatField(default='', max_length=40)), + ('user_iden', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), ] diff --git a/SocialHelper/homepage/migrations/0002_product_wolontatriat.py b/SocialHelper/homepage/migrations/0002_product_wolontatriat.py deleted file mode 100644 index cbeedca..0000000 --- a/SocialHelper/homepage/migrations/0002_product_wolontatriat.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.1.4 on 2020-12-30 21:12 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('homepage', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='product', - name='Wolontatriat', - field=models.BooleanField(default=False), - ), - ] diff --git a/SocialHelper/homepage/migrations/0003_places.py b/SocialHelper/homepage/migrations/0003_places.py deleted file mode 100644 index b262776..0000000 --- a/SocialHelper/homepage/migrations/0003_places.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 3.1.4 on 2020-12-31 12:59 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('homepage', '0002_product_wolontatriat'), - ] - - operations = [ - migrations.CreateModel( - name='Places', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('city', models.TextField(default='', max_length=40)), - ('woj_city', models.TextField(default='', max_length=40)), - ], - ), - ] diff --git a/SocialHelper/homepage/migrations/0004_ocena.py b/SocialHelper/homepage/migrations/0004_ocena.py deleted file mode 100644 index 7c702d6..0000000 --- a/SocialHelper/homepage/migrations/0004_ocena.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 3.1.4 on 2021-01-01 16:53 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('homepage', '0003_places'), - ] - - operations = [ - migrations.CreateModel( - name='Ocena', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('comm', models.TextField(default='', max_length=40)), - ('ocena_jedn', models.FloatField(default='', max_length=40)), - ('user_iden', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - ] diff --git a/SocialHelper/homepage/migrations/__pycache__/0001_initial.cpython-38.pyc b/SocialHelper/homepage/migrations/__pycache__/0001_initial.cpython-38.pyc index d0d8b48b34ad10715d435804a4e7d707b363d46d..86e6702f4e5e06fc64c7aa24909d7c79bbfcb0ff 100644 GIT binary patch delta 808 zcmZ`$%Wl&^6wQpsN$ezUUTu@Kw3KHoA+bj)ASy*=0Yqvm9zu$Y@5Hs`*vOecVH2q< zgp@_)btP6v`~VUgb}aaXVUJ+Pf+er(BnnjozOpsv+~afZ%)HLMD;Rr)f}X;Q&d7^jP+%xj1=rwky+qHujG|s5thb@%UmCN6{tbop%~m4lPf5!z$%8Vl-Hv;?vX7H|F|h=K5z5SNWp1YeY~GhN{z$GqVzw)u$<)^-UW-X(26)#R z_(JME>!9QFz!Cd0`!w`Ai4FxUuzFmkyDs;kFEi~Zgn=z&+OmcFgqtKPqLIws4gD|> zmWW&{uF)-0j33g=TS-g6ogP* zsR~#4JpMwjtxENd%>zp^JM8tO9wwmUaR_dkEAbWOrK;`n0};Ph+Hsv-T5tKGC0fbE zsC~>Q2ho3%incK#+K%tB_NZ>BOrX_XX7@hAPovJ+$wgOo{iT-X^`<2&|C iGc{@aK>RsU(aO}K&A6$y8aI-NgqeoTRyX4p>e?S*FVi^y delta 514 zcmZ9IJ!{)g6oz%LzGAtOEq~i>lcqz6rj~|Iq0}YNAt9kqd+B0?&y_6USm8N_<)ya^B~>yd3UN^J~%So2DV**~u;kKh$&U zqG+S);*I}E=d)KI39LU??cCE@>4z)*=yu*;fye(D)=}43J#2(V*bG}t3w797MEON{GNnHG z(1y+TlJhhx90opjlOUS(GW{KoARQ)RLc6x+4wK-NIV978d2TuuWqFTSq9;Flo=FbP z^x-H9hAie5en+N8p2xUDc>`6dQ6>#eJ8gs5`6aqONA#%$szBk@~) zUBx_Q;vTb1^8z-8_{iyqP35zgDf?=n$IcS*S9wv5PS|qS_?yJL7{|NfK)u-6!gh@+ xvN2awg-}`}7O9Y0US+bZ&Ncm~%(=Q)qQGB@UF~gWcM-85tFXK7jrgLi-vE{Dfph=> diff --git a/SocialHelper/homepage/migrations/__pycache__/0002_product_wolontatriat.cpython-38.pyc b/SocialHelper/homepage/migrations/__pycache__/0002_product_wolontatriat.cpython-38.pyc index ef50b8c5518bb318b802011033bfd3c1e3e41b53..c096e559ff5da96a0aac6588629f4556493aa327 100644 GIT binary patch delta 67 zcmbQjI+c|-l$V!_0SMY_KEyXn52L*@S^IMZ%MN7#|8im|#AL K5Sd)dBmn@6@DZp0 diff --git a/SocialHelper/homepage/migrations/__pycache__/0003_places.cpython-38.pyc b/SocialHelper/homepage/migrations/__pycache__/0003_places.cpython-38.pyc index e1307a743f2dd02de7d8f3d88694241551e4c3e3..a3998bd9ca4ffd95b65a64cbad6a94cc59e4bd5c 100644 GIT binary patch delta 57 zcmbQrHkFM#l$V!_0SM#^K1}5P%y?_#e?dkzIiNt1++;DP>jDram=7Z4C;w%V004`z B4J7~o delta 57 zcmbQrHkFM#l$V!_0SL<0yr0PZnK5ePe?dkzS)f3X>|`;f>jDram=7Z4CjVuU005Ds B4KV-! diff --git a/SocialHelper/homepage/migrations/__pycache__/0004_ocena.cpython-38.pyc b/SocialHelper/homepage/migrations/__pycache__/0004_ocena.cpython-38.pyc index 85bf53a4946f8cb9d15de030685a4ead6fd84add..a686e6bd4ace05c8ee6ff9ae2ec7ea42f6e7079f 100644 GIT binary patch delta 70 zcmZqSXyM=v<>lpK00Q}f4;#5H7#X8ByD&C0vS|W^iZnN$WnyHMQUS49!2+m+*5nt= FG62^64DtW~ delta 70 zcmZqSXyM=v<>lpK0D`hL?>BN=Ff!iS?84a0$fgApD$?3~mWh#3N)^Or1q+}O+LK=} G%K!inat;ds diff --git a/SocialHelper/homepage/migrations/__pycache__/0005_auto_20210102_1308.cpython-38.pyc b/SocialHelper/homepage/migrations/__pycache__/0005_auto_20210102_1308.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..38d3617ffc52e66f4116ed0a990303ba1a42b855 GIT binary patch literal 715 zcmY*XO^?$s5Vhm9O|xBz14tZuLh5CcmPOhFLR++2xUfQ02q_oKWTxFzjvX8a)L!A* zAHYxGFXhS!ap4T&!%la#i=}y)$xPY{VNBdPu72?El#s7JxP3wwoI0x?H~<1v zl9Fb$46=ZdX9NOZp9nCdYxa?448jGO^uD=TG6~waELKL?LaVy%ml{ykxli3b0~ee+ zt4|yt$taL40J@?X!*Jd61Q6~5=l7l8!@)X&J`8pgq8(cW*${?~GH!=2uDKj>bg4_M z#0s-GP19qpb5x=oR7OLS+w94N1VTFg!CPK1X!U0RC$5534DWtS6J%zc<$S@ z(Hx-j4D-3sQ>`TmwNJ*n!Yd`e5Odd$;Nj=z#BZ7iS>$VxoawwNQQ10~EB9(E#>KcY zTeKg9*$P$Q7=+s7m&v?%d6q0TwZ(EXF4R(+QrJztRhTSvUI_Udr6c@5xYjhexz)s} z`-qFiYCcP6({!57`1E0Va#U@M|8x4z>iZ5N7W@r+Aq{BoCk(qMjem!~x~hvw*bZSW i)Jh-0+fJHJgD!cq?B2WQy0y{cy~t0zRJGUg4*Lh2pv2Pv literal 0 HcmV?d00001 diff --git a/SocialHelper/homepage/migrations/__pycache__/__init__.cpython-38.pyc b/SocialHelper/homepage/migrations/__pycache__/__init__.cpython-38.pyc index b32870eb761b05cade2f6600abaec10e3c1f36f9..76955f6ad5b08623df069519d818efd1fe82415e 100644 GIT binary patch delta 19 ZcmaFL_>_@5l$V!_0SM#^K1}4k1pqL#1x5e> delta 19 ZcmaFL_>_@5l$V!_0SF#GzB-Zn763OB24DaH diff --git a/SocialHelper/homepage/templates/homepage/index.html b/SocialHelper/homepage/templates/homepage/index.html index 9cb1efc..2e7a5e6 100644 --- a/SocialHelper/homepage/templates/homepage/index.html +++ b/SocialHelper/homepage/templates/homepage/index.html @@ -159,9 +159,12 @@

Wolontariat

    - -

    - + {% if wol_local%} + + {% else %} + + {% endif %} +
diff --git a/SocialHelper/homepage/views.py b/SocialHelper/homepage/views.py index 09735ad..fbb5d66 100644 --- a/SocialHelper/homepage/views.py +++ b/SocialHelper/homepage/views.py @@ -123,6 +123,8 @@ def filter(request): potrzebuje_local = request.POST['Potrzebuje'] usluga_local = request.POST['usluga'] przedmiot_local = request.POST['przedmiot'] + wol_local = request.POST['wolontariat'] + if place_local != "": @@ -143,6 +145,9 @@ def filter(request): if usluga_local != "on" and przedmiot_local == "on": zmienna = 2 all_product = all_product.filter(type=zmienna) + + if wol_local == "on": + all_product = all_product.filter(Wolontatriat=True) types = TYPE_T