noteworthy with thumbnail resize + title as link

This commit is contained in:
Sanj 2011-10-09 02:47:14 +05:30
parent a6f22d1a6b
commit 99dea00d41
2 changed files with 14 additions and 5 deletions

View File

@ -1,4 +1,5 @@
{% extends 'inner.html' %}
{% load thumbnail %}
{% block title %} | Noteworthy {% endblock %}
@ -32,12 +33,17 @@ height:150px;
{% block inner_content %}
<div class="noteworthy">
<br><br><br>
</div><!--NOTEWORTHY CLOSING -->
{% for n in noteworthy %}
<div class="noteworthy">
{% thumbnail n.image "200x150" crop='center' as im %}
<img src="{{ im.url }}" width="200" height="150" alt="" class="imgLinks">
{% endthumbnail %}
<p class="orange"><strong><a href="{{ n.url }}">{{ n.title }}</a></strong></p>
<br>
<p>{{ n.description }}</p>
<br><br><br>
</div><!--NOTEWORTHY CLOSING -->
{% endfor %}

View File

@ -17,6 +17,9 @@ class Project(models.Model):
# end_date = models.DateField(blank=True)
# location = models.CharField(max_length=255, blank=True)
class Meta:
ordering = ['-id']
def get_info(self):
return {
'id': self.id,