diff --git a/SocialHelper/SocialHelper/static/add.png b/SocialHelper/SocialHelper/static/add.png new file mode 100644 index 0000000..a597564 Binary files /dev/null and b/SocialHelper/SocialHelper/static/add.png differ diff --git a/SocialHelper/SocialHelper/static/plus.png b/SocialHelper/SocialHelper/static/plus.png new file mode 100644 index 0000000..ea76c31 Binary files /dev/null and b/SocialHelper/SocialHelper/static/plus.png differ diff --git a/SocialHelper/homepage/__pycache__/urls.cpython-38.pyc b/SocialHelper/homepage/__pycache__/urls.cpython-38.pyc index f7f1c70..59e70a5 100644 Binary files a/SocialHelper/homepage/__pycache__/urls.cpython-38.pyc and b/SocialHelper/homepage/__pycache__/urls.cpython-38.pyc differ diff --git a/SocialHelper/homepage/__pycache__/views.cpython-38.pyc b/SocialHelper/homepage/__pycache__/views.cpython-38.pyc index 01a9cc4..773647a 100644 Binary files a/SocialHelper/homepage/__pycache__/views.cpython-38.pyc and b/SocialHelper/homepage/__pycache__/views.cpython-38.pyc differ diff --git a/SocialHelper/homepage/templates/base.html b/SocialHelper/homepage/templates/base.html index f54026d..fd31dca 100644 --- a/SocialHelper/homepage/templates/base.html +++ b/SocialHelper/homepage/templates/base.html @@ -23,8 +23,7 @@ - - + {% include 'navbar.html' %} {% block content %} {% endblock %} diff --git a/SocialHelper/homepage/templates/homepage/Dodawanie.html b/SocialHelper/homepage/templates/homepage/Dodawanie.html index 5569388..5eafb6e 100644 --- a/SocialHelper/homepage/templates/homepage/Dodawanie.html +++ b/SocialHelper/homepage/templates/homepage/Dodawanie.html @@ -4,33 +4,6 @@ - -
@@ -64,8 +37,8 @@
- Wybierz zdjęcia - + Wybierz zdjęcie +
diff --git a/SocialHelper/homepage/templates/homepage/Mojeogloszenia.html b/SocialHelper/homepage/templates/homepage/Mojeogloszenia.html new file mode 100644 index 0000000..2e98fa4 --- /dev/null +++ b/SocialHelper/homepage/templates/homepage/Mojeogloszenia.html @@ -0,0 +1,160 @@ +{% extends 'base.html' %} +{% load static %} +{% block content %} + + + + + +
+
+
+

Moje ogłoszenia

+
+
+
+ + + +
+
+
+
+
+ + +
+ {% if all_product %} + {% for product in all_product %} +
+
+
+
+ +
+
+
+
+

{{ product.title }}

+ {% if types.0.0 == product.type %} +
Potrzebuje
+ {% else %} +
Oddam
+ {% endif %} +
Z miejscowości: {{ product.place }}
+

{{ product.description }}

+
+
+
+
+ {% endfor %} + {% else %} +

No polls are available.

+ {% endif %} +
+
+ +
+ {% csrf_token %} + + + + + + +
+ + +
+
+
+
+ + + + + + + + {% endblock %} diff --git a/SocialHelper/homepage/templates/homepage/index.html b/SocialHelper/homepage/templates/homepage/index.html index 2e90399..26e3d7d 100644 --- a/SocialHelper/homepage/templates/homepage/index.html +++ b/SocialHelper/homepage/templates/homepage/index.html @@ -6,33 +6,6 @@ - - diff --git a/SocialHelper/homepage/templates/navbar.html b/SocialHelper/homepage/templates/navbar.html new file mode 100644 index 0000000..9066c2f --- /dev/null +++ b/SocialHelper/homepage/templates/navbar.html @@ -0,0 +1,34 @@ +{% load static %} + + + + + + + + diff --git a/SocialHelper/homepage/urls.py b/SocialHelper/homepage/urls.py index 66d41a3..903f398 100644 --- a/SocialHelper/homepage/urls.py +++ b/SocialHelper/homepage/urls.py @@ -4,5 +4,6 @@ from . import views urlpatterns = [ path('', views.index, name='index'), path('filter', views.filter, name='filter'), - path('Dodawanie', views.Dodawanie, name='Dodawanie'), + path('Dodawanie', views.Dodawanie, name='Dodawanie'), + path('Mojeogloszenia', views.Mojeogloszenia, name='Mojeogloszenia'), ] diff --git a/SocialHelper/homepage/views.py b/SocialHelper/homepage/views.py index c1028dd..3f1de00 100644 --- a/SocialHelper/homepage/views.py +++ b/SocialHelper/homepage/views.py @@ -54,3 +54,19 @@ def filter(request): def Dodawanie(request): return render(request , 'homepage/Dodawanie.html') + +def Mojeogloszenia(request): + all_product = Product.objects.all + template = loader.get_template('homepage/Mojeogloszenia.html') + types = TYPE_T + place_local = "" + oddam_local = "" + potrzebuje_local = "" + context = { + 'all_product': all_product, + 'types': types, + 'place_local': place_local, + 'oddam_local': oddam_local, + 'potrzebuje_local': potrzebuje_local, + } + return HttpResponse(template.render(context, request)) diff --git a/SocialHelper/static/add.png b/SocialHelper/static/add.png new file mode 100644 index 0000000..a597564 Binary files /dev/null and b/SocialHelper/static/add.png differ diff --git a/SocialHelper/static/img/add.png b/SocialHelper/static/img/add.png new file mode 100644 index 0000000..7fece2f Binary files /dev/null and b/SocialHelper/static/img/add.png differ