fixing a ridiculous bug =/
authorLincoln de Sousa <lincoln@alfaiati.net>
Wed, 8 Oct 2008 18:56:02 +0000 (15:56 -0300)
committerLincoln de Sousa <lincoln@alfaiati.net>
Wed, 8 Oct 2008 18:56:02 +0000 (15:56 -0300)
urls.py

diff --git a/urls.py b/urls.py
index 03c46cd..3a46f2d 100644 (file)
--- a/urls.py
+++ b/urls.py
@@ -28,11 +28,11 @@ MEDIA = {'document_root': settings.INSTANCE('media')}
 # full version contains all entries and the other has just entries
 # without menus.
 
 # full version contains all entries and the other has just entries
 # without menus.
 
-hasmenuorindex = [x.entry.id for x in Menu.objects.all()]
-hasmenuorindex.extend([x.entry.id for x in Index.objects.all()])
+hasmenu = [x.entry.id for x in Menu.objects.all()]
+inindex = [x.entry.id for x in Index.objects.all()]
 
 info_dict = {
 
 info_dict = {
-    'queryset': Entry.published_on_site.exclude(id__in=hasmenuorindex),
+    'queryset': Entry.published_on_site.exclude(id__in=hasmenu).filter(id__in=inindex),
     'template_object_name': 'entry',
     'extra_context': {'menus': Menu.objects.all()},
 }
     'template_object_name': 'entry',
     'extra_context': {'menus': Menu.objects.all()},
 }