Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

If a user is logged in, display associated images on the homepage.

  • Loading branch information...
commit ba4769145fb875551b6c1a99f96be4edf1515767 1 parent 9fba9e8
@lukeman lukeman authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 mimesis_project/templates/homepage.html
View
11 mimesis_project/templates/homepage.html
@@ -1,6 +1,7 @@
{% extends "site_base.html" %}
{% load i18n %}
+{% load mimesis_tags %}
{% block head_title %}{% trans "Welcome" %}{% endblock %}
@@ -10,6 +11,16 @@
<h1>{% trans "Welcome to Pinax" %}</h1>
+ {% if request.user.is_authenticated %}
+ {% get_image_count for request.user as image_count %}
+ {% get_image_list for request.user as images %}
+ <h4># of Images: {{ image_count }}</h4>
+
+ {% for image in images %}
+ <img src="{{ MEDIA_URL }}{{ image.image.image }}" />
+ {% endfor %}
+ {% endif %}
+
<p>
{% blocktrans %}
<b>Pinax</b> is a <a href="http://djangoproject.com/">Django</a>
Please sign in to comment.
Something went wrong with that request. Please try again.