fixing another ridiculous bug =/
[cascardo/ema.git] / urls.py
diff --git a/urls.py b/urls.py
index 03c46cd..8db2b3f 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.
 
-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 = {
-    '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()},
 }
@@ -57,8 +57,8 @@ urlpatterns = patterns('',
                     date_field='pub_date'),
         name='diario-entry'),
 
-    (r'^([-\w]+)/$', get_entry_by_slug),
     (r'^', include('ema.eventos.urls')),
+    (r'^([-\w]+)/$', get_entry_by_slug),
 
     # static media
     (r'^(?P<path>imgs/.*)$', 'django.views.static.serve', MEDIA),