From ad9ff6ea74d6e349848ff6557d0e3c2dfa0319ed Mon Sep 17 00:00:00 2001 From: Sanjay B Date: Mon, 17 Jun 2013 13:58:09 -0700 Subject: [PATCH] fix info_dict param issues --- itf/bestpractices/models.py | 8 ++++---- itf/festival/models.py | 10 +++++----- itf/frontpage/views.py | 2 +- itf/scriptbank/models.py | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/itf/bestpractices/models.py b/itf/bestpractices/models.py index c335c6b..8f69f70 100755 --- a/itf/bestpractices/models.py +++ b/itf/bestpractices/models.py @@ -35,7 +35,7 @@ class BestPractice(ItfModel): - def info_dict(self): + def info_dict(self, request=None): return { 'id': self.id, 'title': self.title, @@ -134,7 +134,7 @@ class BestPracticeFAQ(ItfModel): 'answer': self.answer, } - def info_dict(self): + def info_dict(self, request=None): return { 'id': self.id, 'question': self.question, @@ -211,7 +211,7 @@ class Guideline(ItfModel): 'title': self.title, } - def info_dict(self): + def info_dict(self, request=None): return { 'id': self.id, 'title': self.title, @@ -241,7 +241,7 @@ class Glossary(ItfModel): 'definition': self.definition } - def info_dict(self): + def info_dict(self, request=None): return self.list_dict() def __unicode__(self): diff --git a/itf/festival/models.py b/itf/festival/models.py index b79c196..b74d0c8 100755 --- a/itf/festival/models.py +++ b/itf/festival/models.py @@ -60,7 +60,7 @@ class Meeting(ItfModel): else: return None - def info_dict(self): + def info_dict(self, request): meeting_data = {} meeting_data['meeting'] = self meeting_id = self.id @@ -116,7 +116,7 @@ class Participant(ItfModel): 'title': self.name } - def info_dict(self): + def info_dict(self, request): return { 'id': self.id, 'name': self.name, @@ -276,7 +276,7 @@ class DocumentSubject(ItfModel): 'title': self.title } - def info_dict(self): + def info_dict(self, request): return { 'id': self.id, 'title': self.title, @@ -312,7 +312,7 @@ class Document(ItfModel): 'title': self.title } - def info_dict(self): + def info_dict(self, request): return self.preview_dict() def __unicode__(self): @@ -341,7 +341,7 @@ class Project(ItfModel): 'intro': self.intro } - def info_dict(self): + def info_dict(self, request): return self.preview_dict() def list_dict(self): diff --git a/itf/frontpage/views.py b/itf/frontpage/views.py index 6764c83..8337fb4 100755 --- a/itf/frontpage/views.py +++ b/itf/frontpage/views.py @@ -40,7 +40,7 @@ def index(request): statuses = tApi.GetUserTimeline(TWITTER_ID)[0:3] except: statuses = [] - boxes = SliderBox.objects.all() + boxes = SliderBox.objects.filter(is_displayed=True) front_images = FrontImage.objects.filter(is_active=True)[0:3] return render_to_response("noel/index.html", RequestContext(request, { 'tweets': [urlize(s.text) for s in statuses], diff --git a/itf/scriptbank/models.py b/itf/scriptbank/models.py index 2e9fbba..5721153 100755 --- a/itf/scriptbank/models.py +++ b/itf/scriptbank/models.py @@ -138,7 +138,7 @@ class License(ItfModel): 'title': self.name } - def info_dict(self): + def info_dict(self, request=None): return { 'id': self.id, 'letter': self.letter,