harvest-dev team mailing list archive
-
harvest-dev team
-
Mailing list archive
-
Message #00256
[Merge] lp:~dholbach/harvest/582930 into lp:harvest
Daniel Holbach has proposed merging lp:~dholbach/harvest/582930 into lp:harvest.
Requested reviews:
harvest-dev (harvest-dev)
I'd love some help with making this look prettier, not sure how to do that.
--
https://code.launchpad.net/~dholbach/harvest/582930/+merge/33392
Your team harvest-dev is requested to review the proposed merge of lp:~dholbach/harvest/582930 into lp:harvest.
=== modified file 'harvest/common/views.py'
--- harvest/common/views.py 2009-07-08 11:31:32 +0000
+++ harvest/common/views.py 2010-08-23 14:45:57 +0000
@@ -2,10 +2,19 @@
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.contrib.auth import logout
+from django.contrib.auth.models import User
+from opportunities.models import SourcePackage, OpportunityList, Opportunity, Note
def index(request):
- context = { 'pageSection': 'home', }
+ context = {
+ 'pageSection': 'home',
+ 'users': User.objects.count(),
+ 'sourcepackages': SourcePackage.objects.count(),
+ 'opportunitylists': OpportunityList.objects.count(),
+ 'opportunities': Opportunity.objects.count(),
+ 'notes': Note.objects.count(),
+ }
return render_to_response('index.html', context,
context_instance=RequestContext(request))
=== modified file 'harvest/templates/index.html'
--- harvest/templates/index.html 2010-07-03 05:45:47 +0000
+++ harvest/templates/index.html 2010-08-23 14:45:57 +0000
@@ -10,6 +10,13 @@
There is no landing page at the moment :(
+<p>
+{% blocktrans count users as counter %}1 user, {% plural %}{{ counter }} users, {% endblocktrans %}
+{% blocktrans count sourcepackages as counter %}1 source package, {% plural %}{{ counter }} source packages, {% endblocktrans %}
+{% blocktrans count opportunities as counter %}1 opportunity, {% plural %}{{ counter }} opportunities, {% endblocktrans %}
+{% blocktrans count opportunitylists as counter %}1 opportunity list, {% plural %}{{ counter }} opportunity lists, {% endblocktrans %}
+{% blocktrans count notes as counter %}1 note.{% plural %}{{ counter }} notes.{% endblocktrans %}
+</p>
{% if translator_credits %}
<p class="footnote">