pola wolontariat do filtrowania (front)

This commit is contained in:
Alicja Kupczyk 2021-01-02 02:41:40 +01:00
parent 3bb08a79b5
commit 49d1a18d64
13 changed files with 15 additions and 3 deletions

View File

@ -77,7 +77,7 @@ WSGI_APPLICATION = 'SocialHelper.wsgi.application'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'socialhelperdb',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': 'admin',
'HOST': 'localhost'

View File

@ -12,7 +12,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AddField(
model_name='product',
name='Wolontatriat',
name='Wolontariat',
field=models.BooleanField(default=False),
),
]

View File

@ -153,6 +153,17 @@
</ul>
</aside>
<aside class="l_widgest l_menufacture_widget">
<div class="l_w_title">
<h3>Wolontariat</h3>
</div>
<ul>
<label for="Wolontariat">Tak</label>
<p></p>
<label for="scales">Nie</label>
</ul>
</aside>
<input type="submit" class="btn btn-primary update_btn" value="Zastosuj">
</div>
</div>

View File

@ -124,6 +124,7 @@ def filter(request):
usluga_local = request.POST['usluga']
przedmiot_local = request.POST['przedmiot']
if place_local != "":
all_product = all_product.filter(place=place_local)
@ -141,7 +142,7 @@ def filter(request):
if usluga_local != "on" and przedmiot_local == "on":
zmienna = 2
all_product = all_product.filter(type=zmienna)
all_product = all_product.filter(type=zmienna)z
types = TYPE_T