-
-
-
-
- {% if all_oceny %}
- {% for ocen_jed in all_oceny %}
-
-
+
+
+ {% if all_oceny %}
+ {% for ocen_jed in all_oceny %}
+
+
+
+ {{ocen_jed.ocena_jedn}}
+
+
+
{{ocen_jed.comm}}
- {{ocen_jed.ocena_jedn}}
+
- {% endfor %}
- {% else %}
-
No polls are available.
- {% endif %}
-
+
+ {% endfor %}
+ {% else %}
+
No polls are available.
+ {% endif %}
-
-
+
-
-
+
+
diff --git a/SocialHelper/enGB/views.py b/SocialHelper/enGB/views.py
index 029c903..cf03e2a 100644
--- a/SocialHelper/enGB/views.py
+++ b/SocialHelper/enGB/views.py
@@ -191,13 +191,13 @@ def enadd_offer(request):
offer_local = request.POST['offer']
if title_local == "":
- messages.error(request,'Musisz podać tytuł!')
+ messages.error(request,'Title cannot be empty!')
return redirect('add_offer')
if script_local == "":
- messages.error(request,'Musisz podać opis!')
+ messages.error(request,'Description cannot be empty!')
return redirect('add_offer')
if place_local == "":
- messages.error(request,'Musisz podać miejscowość!')
+ messages.error(request,'Locality cannot be empty!')
return redirect('add_offer')
product = Product(
@@ -213,7 +213,7 @@ def enadd_offer(request):
keywords = "",
)
product.save()
- messages.success(request, 'Ogłoszenie dodane!')
+ messages.success(request, 'Offer added!')
return redirect(enmy_offer)
context = {
'place_list': place_list,
@@ -226,7 +226,7 @@ def endelete_offer(request, offer_id):
instance = Product.objects.get(id=offer_id)
instance.active = False
instance.save()
- messages.success(request, 'Ogłoszenie usunięte!')
+ messages.success(request, 'Offer removed!')
return redirect(enmy_offer)
@@ -254,13 +254,13 @@ def enedit_offer(request, offer_id):
wol = True
if title_local == "":
- messages.error(request,'Musisz podać tytuł!')
+ messages.error(request,'Title cannot be empty!')
return redirect('add_offer')
if script_local == "":
- messages.error(request,'Musisz podać opis!')
+ messages.error(request,'Description cannot be empty!')
return redirect('add_offer')
if place_local == "":
- messages.error(request,'Musisz podać miejscowość!')
+ messages.error(request,'Locality cannot be empty!')
return redirect('add_offer')
if request.FILES:
@@ -278,7 +278,7 @@ def enedit_offer(request, offer_id):
instance.keywords = ""
instance.save()
- messages.success(request, 'Ogłoszenie edytowane!')
+ messages.success(request, 'Edited offer!')
return redirect(enmy_offer)
return render(request , 'enGB/edycja_ogloszenia.html', context)
@@ -291,31 +291,31 @@ def encreate_user(request):
scales = request.POST['scales']
#walidacja
if scales == "No":
- messages.error(request,'Musisz zaakceptować regulamin!')
+ messages.error(request,'You must accept the Terms of use!')
return redirect('create_user')
if email == "":
- messages.error(request,'Pole email jest puste!')
+ messages.error(request,'The email field is empty!')
return redirect('create_user')
if "@" not in email:
- messages.error(request,'Wprowadzony email jest niepoprawny!')
+ messages.error(request,'The entered email is invalid!')
return redirect('create_user')
if User.objects.filter(email=email).exists():
- messages.error(request,'Ten adres e-mail jest już używany')
+ messages.error(request,'This e-mail address is already in use')
return redirect('create_user')
if password == "":
- messages.error(request,'Pole hasło jest puste!')
+ messages.error(request,'The password field is empty!')
return redirect('create_user')
if password != pow_password:
- messages.error(request,'Podane hasła są różne')
+ messages.error(request,'The passwords provided are different')
return redirect('create_user')
if password == email:
- messages.error(request,'Podane hasła i email muszą byc różne')
+ messages.error(request,'The password and email provided must be different')
return redirect('create_user')
dlugosc = 0
@@ -336,7 +336,7 @@ def encreate_user(request):
dlugosc = 1
if dlugosc+znak+mala+duza+cyfra != 5:
- messages.error(request,'Podane hasło jest nieprawidłowe. Hasło musi zawierać conajmniej: 1 cyfre, 1 duza litere, 1 mala litere, 1 znak specjalny z zakresu !@#$%&*(){}[]<>?, oraz składać sie conajmniej z 8 symboli')
+ messages.error(request,'The password provided is incorrect. The password must contain at least: 1 digit, 1 uppercase letter, 1 lowercase letter, 1 special character from the range! @ # $% & * () {} [] <>?, And must consist of at least 8 symbols')
return redirect('create_user')
else:
@@ -349,7 +349,7 @@ def encreate_user(request):
user.save()
user.set_password(password)
user.save()
- messages.success(request,'Gratulacje, teraz możesz się zalogować!')
+ messages.success(request,'Congratulations, you can login now!')
return redirect(enmy_offer)
return render(request , 'enGB/create_user.html')
@@ -365,7 +365,7 @@ def endelete_user(request):
offer.save()
instant.save()
- messages.success(request,'Konto skasowane!')
+ messages.success(request,'Account deleted!')
return redirect(enindex)
def enedit_user(request):
@@ -378,7 +378,7 @@ def enedit_user(request):
newpassword2 = request.POST['newpassword2']
user = authenticate(request, username=instant.username, password=oldpassword, is_active=True)
if user is None:
- messages.error(request,'Podałeś złe hasło')
+ messages.error(request,'You entered the wrong password')
return redirect('edit_user')
dlugosc = 0
@@ -399,16 +399,16 @@ def enedit_user(request):
dlugosc = 1
if dlugosc+znak+mala+duza+cyfra != 5:
- messages.error(request,'Podane hasło jest nieprawidłowe. Hasło musi zawierać conajmniej: 1 cyfre, 1 duza litere, 1 mala litere, 1 znak specjalny z zakresu !@#$%&*(){}[]<>?, oraz składać sie conajmniej z 8 symboli')
+ messages.error(request,'Podane hasło jest nieprawidłowe. Hasło musi najmniejsze: 1 cyfra, 1 duza litere, 1 mala litere, 1 znak specjalny z zakresu! @ # $% & * () {} [] <> ?, oraz składać sie conajmniej z 8 symboli')
return redirect('edit_user')
if newpassword1 != newpassword2:
- messages.error(request,'Podane nowe hasła są różne')
+ messages.error(request,'The new passwords provided are different')
return redirect('edit_user')
instant.set_password(newpassword1)
instant.save()
- messages.success(request,'Hasło zmienione, nastąpiło wylogowanie!')
+ messages.success(request,'Password changed, you are logged out!')
return redirect('enmy_offer')
return render(request , 'enGB/edit_user.html')
@@ -420,16 +420,16 @@ def enlogin(request):
user = authenticate(request, username=username, password=password, is_active=True)
if user is not None:
auth.login(request,user)
- messages.success(request, 'Jesteś zalogowany!')
+ messages.success(request, 'You are logged in!')
return redirect(enmy_offer)
else:
- messages.error(request,'Nieprawidłowe dane logowania!')
+ messages.error(request,'Invalid login details!')
return redirect(enlogin)
return render(request , 'enGB/enlogin.html')
def enlogout_user(request):
auth.logout(request)
- messages.success(request, 'Zostałeś wylogowany!')
+ messages.success(request, 'You have been logged out!')
return redirect(enindex)
def enuser_profile(request, user_name):
@@ -479,7 +479,7 @@ def enadd_comment(request, user_name):
ocena_jedn = int(volume_local)*2,
)
instant.save()
- messages.success(request, 'Dodano komentarz')
+ messages.success(request, 'Comment added')
return redirect(enuser_profile, user_name)
context = {
diff --git a/SocialHelper/homepage/migrations/0002_auto_20210103_1457.py b/SocialHelper/homepage/migrations/0002_auto_20210103_1457.py
new file mode 100644
index 0000000..ec8f2b7
--- /dev/null
+++ b/SocialHelper/homepage/migrations/0002_auto_20210103_1457.py
@@ -0,0 +1,14 @@
+# Generated by Django 3.1.4 on 2021-01-03 13:57
+from django.contrib.postgres.operations import UnaccentExtension
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('homepage', '0001_initial'),
+ ]
+
+ operations = [
+ UnaccentExtension()
+ ]
diff --git a/SocialHelper/homepage/migrations/__pycache__/0001_initial.cpython-37.pyc b/SocialHelper/homepage/migrations/__pycache__/0001_initial.cpython-37.pyc
index 6af8b47..b18af0e 100644
Binary files a/SocialHelper/homepage/migrations/__pycache__/0001_initial.cpython-37.pyc and b/SocialHelper/homepage/migrations/__pycache__/0001_initial.cpython-37.pyc differ
diff --git a/SocialHelper/homepage/migrations/__pycache__/0002_auto_20210103_1424.cpython-37.pyc b/SocialHelper/homepage/migrations/__pycache__/0002_auto_20210103_1424.cpython-37.pyc
new file mode 100644
index 0000000..b60b880
Binary files /dev/null and b/SocialHelper/homepage/migrations/__pycache__/0002_auto_20210103_1424.cpython-37.pyc differ
diff --git a/SocialHelper/homepage/migrations/__pycache__/0002_auto_20210103_1457.cpython-37.pyc b/SocialHelper/homepage/migrations/__pycache__/0002_auto_20210103_1457.cpython-37.pyc
index 332bbb6..2a5776d 100644
Binary files a/SocialHelper/homepage/migrations/__pycache__/0002_auto_20210103_1457.cpython-37.pyc and b/SocialHelper/homepage/migrations/__pycache__/0002_auto_20210103_1457.cpython-37.pyc differ
diff --git a/SocialHelper/homepage/migrations/__pycache__/__init__.cpython-37.pyc b/SocialHelper/homepage/migrations/__pycache__/__init__.cpython-37.pyc
new file mode 100644
index 0000000..ebb644b
Binary files /dev/null and b/SocialHelper/homepage/migrations/__pycache__/__init__.cpython-37.pyc differ
diff --git a/SocialHelper/homepage/templates/homepage/user_profile.html b/SocialHelper/homepage/templates/homepage/user_profile.html
index 70a5444..3520dd6 100644
--- a/SocialHelper/homepage/templates/homepage/user_profile.html
+++ b/SocialHelper/homepage/templates/homepage/user_profile.html
@@ -3,217 +3,210 @@
{% block content %}
+
-
-
-
-
-
-
Profil użytkownika
-
{{ name }}
-
-
- {% if user.email %}
-
- {% endif %}
-
-
-
-
+
-
+
+
+
+
Profil użytkownika
+
{{ name }}
+
+
+ {% if user.email %}
+
+ {% endif %}
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
- {% if all_product %}
- {% for product in all_product %}
-
-
-
-
-
-
-
-
-
-
{{ product.title }}
- {% if types.0.0 == product.type %}
-
Potrzebuje
- {% else %}
- Oddam
- {% endif %}
- {% if types_o.0.0 == product.offer %}
- Usługa
- {% else %}
- Przedmiot
- {% endif %}
-
Z miejscowości: {{ product.place }}
-
{{ product.description }}
-
-
-
-
- {% endfor %}
- {% else %}
-
No polls are available.
- {% endif %}
+
+
+
+
+
+
+
+
+
+ {% if all_product %}
+ {% for product in all_product %}
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {% if all_oceny %}
- {% for ocen_jed in all_oceny %}
-
-
- {{ocen_jed.comm}}
- {{ocen_jed.ocena_jedn}}
-
-
- {% endfor %}
- {% else %}
-
No polls are available.
- {% endif %}
+
+
+
{{ product.title }}
+ {% if types.0.0 == product.type %}
+
Potrzebuje
+ {% else %}
+ Oddam
+ {% endif %}
+ {% if types_o.0.0 == product.offer %}
+ Usługa
+ {% else %}
+ Przedmiot
+ {% endif %}
+
Z miejscowości: {{ product.place }}
+
{{ product.description }}
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {% if all_oceny %}
+ {% for ocen_jed in all_oceny %}
+
+
+
+ {{ocen_jed.ocena_jedn}}
+
+
+
+ {{ocen_jed.comm}}
+
+
+
+
+ {% endfor %}
+ {% else %}
+
No polls are available.
+ {% endif %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- {% endblock %}
+{% endblock %}