python - Django-cms Apphook url doesn't load -


i have django-cms project contains app called core. inside core created file "cms_app.py" follows:

# -*- coding: utf8 -*- cms.app_base import cmsapp cms.apphook_pool import apphook_pool django.utils.translation import ugettext_lazy _  class coreapphook(cmsapp):     name = _(u"core apphook")     urls = ["core.urls"]  apphook_pool.register(coreapphook) 

in core/urls.py have following code:

# -*- coding: utf8 -*- django.conf.urls.defaults import patterns, include, url  urlpatterns = patterns('',          # urls refrentes ao apphook coreapphook         url(r'^$', 'noticia.views.ultimas_noticias'),         url(r'^noticias/$', 'noticia.views.ultimas_noticias'),         url(r'^noticias/(?p<categoria>[\w\d-]+)/$', 'noticia.views.noticias_categoria'),         url(r'^noticias/(?p<categoria>[\w\d-]+)/(?p<pagina>\d+)/$', 'noticia.views.noticias_categoria_paginated'),         url(r'^noticias/(?p<categoria>[\w\d-]+)/(?p<subcategoria>[\w\d-]+)/(?p<titulo>[\w\d-]+)/$', 'noticia.views.noticia'),         url(r'^paginacao/noticias/$', 'noticia.views.noticias_categoria_paginated'),     ) 

i'm trying reach view:

url(r'^noticias/(?p<categoria>[\w\d-]+)/(?p<subcategoria>[\w\d-]+)/(?p<titulo>[\w\d-]+)/$', 'noticia.views.noticia'), 

by using url:

http://127.0.0.1:8000/noticias/filmes/acao/lol-e-poka-zuera/ 

but file urls.py not loaded apphook. i've set apphook field in every child page of "noticias" , "noticias" well. weird thing have same structure in project works perfectly. , i've set app "core" installed_apps. can't imagine may causing issue. i've used breakpoint core/urls.py, it's not being called apphook.

urlpatterns = patterns('',      # urls refrentes ao apphook coreapphook     url(r'^$', 'noticia.views.ultimas_noticias', name='app_ultimas_noticias'),     url(r'^noticias/$', 'noticia.views.ultimas_noticias', name='app_ultimas_noticias1'), ) 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -