fix
This commit is contained in:
parent
2454ab21ae
commit
35b36b3300
Binary file not shown.
@ -79,7 +79,7 @@ WSGI_APPLICATION = 'SocialHelper.wsgi.application'
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'NAME': 'socialhelperdb2',
|
||||
'NAME': 'socialhelperdb',
|
||||
'USER': 'postgres',
|
||||
'PASSWORD': 'admin',
|
||||
'HOST': 'localhost'
|
||||
|
Binary file not shown.
@ -6,7 +6,19 @@
|
||||
|
||||
<body>
|
||||
|
||||
<style>
|
||||
a:link {
|
||||
color: black;
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: blue;
|
||||
background-color: transparent;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--================Categories Product Area =================-->
|
||||
<section class="categories_product_main p_80">
|
||||
|
@ -14,6 +14,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<style>
|
||||
a:link {
|
||||
color: black;
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: blue;
|
||||
background-color: transparent;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
<!--================End Categories Banner Area =================-->
|
||||
|
||||
<!--================Categories Product Area =================-->
|
||||
@ -40,7 +53,7 @@
|
||||
</div>
|
||||
<div class="col-lg-8 col-md-6">
|
||||
<div class="c_product_text">
|
||||
<h1>{{ product.title }}</h1>
|
||||
<a href="/homepage/offer_details/{{ product.id }}"><h1>{{ product.title }}</h1></a>
|
||||
{% if types.0.0 == product.type %}
|
||||
<h5>Potrzebuje
|
||||
{% else %}
|
||||
|
@ -4,6 +4,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<body>
|
||||
<style>
|
||||
a:link {
|
||||
color: black;
|
||||
background-color: transparent;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: blue;
|
||||
background-color: transparent;
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!--================Categories Banner Area =================-->
|
||||
|
||||
@ -12,7 +25,6 @@
|
||||
<div class="solid_banner_inner">
|
||||
<h3>Profil użytkownika</h3>
|
||||
<h5>{{ name }}</h5><p><br></p>
|
||||
<p><SPAN STYLE="font-size:16.0pt">Ilość ocen: <strong>{{suma_ocen}}</SPAN></strong></p>
|
||||
<p><SPAN STYLE="font-size:16.0pt">Średnia Ocena: <strong>{{ocena_2}}</SPAN></strong></p>
|
||||
<strong> 1
|
||||
<img src="{% static "color\ff0000.png"%}" height="20" width="30"/>
|
||||
@ -81,10 +93,10 @@
|
||||
<div class="container">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" href="#1zakladka" role="tab" data-toggle="tab">Produkty</a>
|
||||
<a class="nav-link active" href="#1zakladka" role="tab" data-toggle="tab">Produkty ({{suma_prod}})</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#2zakladka" role="tab" data-toggle="tab">Oceny</a>
|
||||
<a class="nav-link" href="#2zakladka" role="tab" data-toggle="tab">Oceny ({{suma_oc}})</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
@ -108,7 +120,7 @@
|
||||
</div>
|
||||
<div class="col-lg-8 col-md-6">
|
||||
<div class="c_product_text">
|
||||
<h1>{{ product.title }}</h1>
|
||||
<a href="/homepage/offer_details/{{ product.id }}"><h1>{{ product.title }}</h1></a>
|
||||
{% if types.0.0 == product.type %}
|
||||
<h5>Potrzebuje
|
||||
{% else %}
|
||||
|
@ -441,6 +441,7 @@ def user_profile(request, user_name):
|
||||
user_prof = User.objects.filter(email=user_name).first()
|
||||
|
||||
all_product = Product.objects.filter(active = True, user_iden = user_prof.id)
|
||||
suma_prod = all_product.count()
|
||||
oceny = Ocena.objects.filter(user_iden = user_prof.id)
|
||||
template = loader.get_template('homepage/user_profile.html')
|
||||
|
||||
@ -458,6 +459,7 @@ def user_profile(request, user_name):
|
||||
ocena = int (ocena)
|
||||
else:
|
||||
ocena = 50
|
||||
suma_oc = 0
|
||||
ocena_2 = ocena/10
|
||||
context = {
|
||||
'all_product': all_product,
|
||||
@ -465,7 +467,8 @@ def user_profile(request, user_name):
|
||||
'ocena': ocena,
|
||||
'name': user_prof.email,
|
||||
'ocena_2': ocena_2,
|
||||
'suma_ocen': suma, #suma wszystkich ocen uzytkownika
|
||||
'suma_oc': suma, #suma wszystkich ocen uzytkownika
|
||||
'suma_prod': suma_prod,
|
||||
}
|
||||
return HttpResponse(template.render(context, request))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user