diff --git a/config/photoapp/templates/photoapp/create.html b/config/photoapp/templates/photoapp/create.html index e69de29..101f342 100644 --- a/config/photoapp/templates/photoapp/create.html +++ b/config/photoapp/templates/photoapp/create.html @@ -0,0 +1,15 @@ +{% extends 'base.html' %} +{% load crispy_forms_tags %} + +{% block body %} +
+

Add photo

+
+
+
+ {% csrf_token %} + {{ form|crispy }} + +
+
+{% endblock body %} diff --git a/config/photoapp/templates/photoapp/delete.html b/config/photoapp/templates/photoapp/delete.html index e69de29..4b34237 100644 --- a/config/photoapp/templates/photoapp/delete.html +++ b/config/photoapp/templates/photoapp/delete.html @@ -0,0 +1,32 @@ +{% extends 'base.html' %} {% block body %} +
+

+ You are going to delete: "{{ photo }} + " +

+

Are you sure, you want to delete the photo ?

+
+
+ {% csrf_token %} +
+
+ Cancel +
+
+ +
+
+

This action is irreversible

+
+
+
+ +{% endblock body %} diff --git a/config/photoapp/templates/photoapp/detail.html b/config/photoapp/templates/photoapp/detail.html index e69de29..3411b2d 100644 --- a/config/photoapp/templates/photoapp/detail.html +++ b/config/photoapp/templates/photoapp/detail.html @@ -0,0 +1,29 @@ +{% extends 'base.html' %} + +{% block body %} +
+

{{ photo.title }}

+

Uploaded on: {{photo.created}}
By {{photo.submitter.username}}

+ {% if user == photo.submitter %} +

+ Update + Delete +

+ {% endif %} +
+
+
+ +
+
+

More about this photo:

+ +

{{ photo.description }}

+
+
+ +{% endblock body %} diff --git a/config/photoapp/templates/photoapp/list.html b/config/photoapp/templates/photoapp/list.html index d7c5b6c..bc37761 100644 --- a/config/photoapp/templates/photoapp/list.html +++ b/config/photoapp/templates/photoapp/list.html @@ -1,7 +1,15 @@ -{% extends 'base.html' %} +{% extends 'base.html' %} {% block body %} - - -{% endblock body %} \ No newline at end of file +
+ {% for photo in photos %} +
+ + {{photo.title}} + +
+ {% endfor %} +
+ +{% endblock body %} diff --git a/config/photoapp/templates/photoapp/taglist.html b/config/photoapp/templates/photoapp/taglist.html index e69de29..50771c1 100644 --- a/config/photoapp/templates/photoapp/taglist.html +++ b/config/photoapp/templates/photoapp/taglist.html @@ -0,0 +1,11 @@ +{% extends 'photoapp/list.html' %} + +{% block body %} + +
+

Photos with the tag {{tag}}

+
+ +{{ block.super }} + +{% endblock body %} \ No newline at end of file diff --git a/config/photoapp/templates/photoapp/update.html b/config/photoapp/templates/photoapp/update.html new file mode 100644 index 0000000..10f00c8 --- /dev/null +++ b/config/photoapp/templates/photoapp/update.html @@ -0,0 +1,15 @@ +{% extends 'base.html' %} +{% load crispy_forms_tags %} + +{% block body %} +
+

Edit photo {{photo}}

+
+
+
+ {% csrf_token %} + {{ form|crispy }} + +
+
+{% endblock body %}