projects
/
cascardo
/
ema.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bad merge
[cascardo/ema.git]
/
urls.py
diff --git
a/urls.py
b/urls.py
index
b625832
..
89b3856
100644
(file)
--- a/
urls.py
+++ b/
urls.py
@@
-19,9
+19,13
@@
from django.conf.urls.defaults import *
from django.conf import settings
from diario.settings import DIARIO_NUM_LATEST
from diario.models import Entry
from django.conf import settings
from diario.settings import DIARIO_NUM_LATEST
from diario.models import Entry
-from contents.models import Menu
+from contents.models import Menu
, Index
from ema.views import get_entry_by_slug
from ema.views import get_entry_by_slug
+from django.contrib import admin
+admin.autodiscover()
+
+
MEDIA = {'document_root': settings.INSTANCE('media')}
# the only difference between info_dict and info_dict_full is that the
MEDIA = {'document_root': settings.INSTANCE('media')}
# the only difference between info_dict and info_dict_full is that the
@@
-29,8
+33,10
@@
MEDIA = {'document_root': settings.INSTANCE('media')}
# without menus.
hasmenu = [x.entry.id for x in Menu.objects.all()]
# without menus.
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=hasmenu),
+ '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()},
}
@@
-42,7
+48,7
@@
info_dict_full = {
}
urlpatterns = patterns('',
}
urlpatterns = patterns('',
- (r'^admin/
', include('django.contrib.admin.urls')
),
+ (r'^admin/
(.*)', admin.site.root
),
url(regex='^$',
view='django.views.generic.list_detail.object_list',
url(regex='^$',
view='django.views.generic.list_detail.object_list',
@@
-55,8
+61,8
@@
urlpatterns = patterns('',
date_field='pub_date'),
name='diario-entry'),
date_field='pub_date'),
name='diario-entry'),
- (r'^([-\w]+)/$', get_entry_by_slug),
(r'^', include('ema.eventos.urls')),
(r'^', include('ema.eventos.urls')),
+ (r'^([-\w]+)/$', get_entry_by_slug),
# static media
(r'^(?P<path>imgs/.*)$', 'django.views.static.serve', MEDIA),
# static media
(r'^(?P<path>imgs/.*)$', 'django.views.static.serve', MEDIA),