From 459ce97f7d9e4d421003c4caface680c17c6b13d Mon Sep 17 00:00:00 2001 From: Sanj Date: Sun, 10 Jul 2011 06:45:13 +0530 Subject: [PATCH] remove first_article nonsense --- edgware/main/views.py | 4 ++-- edgware/static/js/browse_publications.js | 1 + edgware/templates/main/browse.html | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/edgware/main/views.py b/edgware/main/views.py index 902899d..afe7f92 100644 --- a/edgware/main/views.py +++ b/edgware/main/views.py @@ -46,8 +46,8 @@ def publish(request): def browse(request): user = request.user themes = ArticleTheme.objects.all() - first_article = Article.objects.all().filter(published=True).exclude(name__istartswith='template')[0].get_list_dict(user) - context = RequestContext(request, {'themes': themes, 'first_article': first_article}) +# first_article = Article.objects.all().filter(published=True).exclude(name__istartswith='template')[0].get_list_dict(user) + context = RequestContext(request, {'themes': themes}) return render_to_response("main/browse.html", context) def faq(request): diff --git a/edgware/static/js/browse_publications.js b/edgware/static/js/browse_publications.js index b198398..4add9c7 100644 --- a/edgware/static/js/browse_publications.js +++ b/edgware/static/js/browse_publications.js @@ -18,6 +18,7 @@ $(function() { var a = articles[i]; var $li = $('
  • ').addClass("articleItem").text(a.title).data("article", a).appendTo($ul); } + $('.articleItem').eq(0).click(); }); }); diff --git a/edgware/templates/main/browse.html b/edgware/templates/main/browse.html index d7d649b..3295b2f 100644 --- a/edgware/templates/main/browse.html +++ b/edgware/templates/main/browse.html @@ -18,11 +18,11 @@ Browse Publications