This commit is contained in:
Jędrzej Klepacki 2020-12-10 21:37:21 +01:00
parent e245332681
commit 4158325b85
3 changed files with 12 additions and 0 deletions

View File

@ -41,6 +41,12 @@
{% else %} {% else %}
<h5>Oddam</h5> <h5>Oddam</h5>
{% endif %} {% endif %}
{% if types_o.0.0 == product.offer %}
<h5>Usługa</h5>
{% else %}
<h5>Przedmiot</h5>
{% endif %}
<h6>Z miejscowości: <span>{{ product.place }}</span></h6> <h6>Z miejscowości: <span>{{ product.place }}</span></h6>
<p>{{ product.description }}</p> <p>{{ product.description }}</p>
</div> </div>

View File

@ -120,14 +120,20 @@ def Mojeogloszenia(request):
all_product = Product.objects.filter(user_owner = "jedrzejklepacki@wp.pl") all_product = Product.objects.filter(user_owner = "jedrzejklepacki@wp.pl")
template = loader.get_template('homepage/Mojeogloszenia.html') template = loader.get_template('homepage/Mojeogloszenia.html')
types = TYPE_T types = TYPE_T
types_o = TYPE_O
place_local = "" place_local = ""
oddam_local = "" oddam_local = ""
potrzebuje_local = "" potrzebuje_local = ""
usluga_local = ""
przedmiot_local = ""
context = { context = {
'all_product': all_product, 'all_product': all_product,
'types': types, 'types': types,
'place_local': place_local, 'place_local': place_local,
'oddam_local': oddam_local, 'oddam_local': oddam_local,
'potrzebuje_local': potrzebuje_local, 'potrzebuje_local': potrzebuje_local,
'types_o': types_o,
'usluga_local': usluga_local,
'przedmiot_local': przedmiot_local,
} }
return HttpResponse(template.render(context, request)) return HttpResponse(template.render(context, request))