Esempio n. 1
0
 def render(self, context):
     
     if self.kind == "stable":
         context[self.context_var] = Release.latest_stable()
     elif self.kind == "development":
         context[self.context_var] = Release.latest_development()
     else:
         raise ValueError("Unknown kind in LatestReleaseNode.render")
     
     return u""
 def render(self, context):
     
     latest_releases = [
         Release.latest_stable().id,
     ]
     latest_dev = Release.latest_development()
     if latest_dev:
         latest_releases.append(latest_dev.id)
     older_releases = Release.objects.exclude(id__in=latest_releases)
     context[self.context_var] = older_releases
     
     return u""
Esempio n. 3
0
 def render(self, context):
     latest_releases = []
     latest_stable = Release.latest_stable()
     latest_dev = Release.latest_development()
     
     if latest_stable:
         latest_releases.append(latest_stable.id)
     if latest_dev:
         latest_releases.append(latest_dev.id)
     
     older_releases = Release.objects.filter(
         stable=True
     ).exclude(id__in=latest_releases)
     context[self.context_var] = older_releases
     
     return u""