From a03e3128241c2043e05b8a20c52118e81f8cecc3 Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 1 Nov 2011 01:47:14 +0000 Subject: [PATCH] front image fields: DB change --- itf/frontpage/admin.py | 2 +- itf/frontpage/models.py | 2 ++ itf/templates/noel/index.html | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/itf/frontpage/admin.py b/itf/frontpage/admin.py index 46951d8..97ea1da 100755 --- a/itf/frontpage/admin.py +++ b/itf/frontpage/admin.py @@ -18,7 +18,7 @@ class MenuHeadingAdmin(admin.ModelAdmin): class FrontImageAdmin(admin.ModelAdmin): - pass + list_editable = ['order'] admin.site.register(MenuHeading, MenuHeadingAdmin) admin.site.register(SliderBox, SliderBoxAdmin) diff --git a/itf/frontpage/models.py b/itf/frontpage/models.py index adeca12..8941116 100755 --- a/itf/frontpage/models.py +++ b/itf/frontpage/models.py @@ -3,6 +3,8 @@ from django.db import models class FrontImage(models.Model): image = models.ImageField(upload_to='upload/frontImages/') caption = models.TextField(blank=True) + is_active = models.BooleanField(default=True) + order = models.IntegerField(default=1) def __unicode__(self): return self.image.url diff --git a/itf/templates/noel/index.html b/itf/templates/noel/index.html index 0be00fb..7965fb5 100755 --- a/itf/templates/noel/index.html +++ b/itf/templates/noel/index.html @@ -18,13 +18,13 @@
- +

A place where you can come and get, give, share, exchange all sorts of information, ideas, resources and more.

-
-
-
+
+
+