Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango-cms Apphook url doesn't load
    primarykey
    data
    text
    <p>I have a django-cms project that contains an app called core. Inside core I created a file "cms_app.py" as follows:</p> <pre><code># -*- coding: utf8 -*- from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class CoreApphook(CMSApp): name = _(u"Core Apphook") urls = ["core.urls"] apphook_pool.register(CoreApphook) </code></pre> <p>In my core/urls.py I have the following code:</p> <pre><code># -*- coding: utf8 -*- from 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&lt;categoria&gt;[\w\d-]+)/$', 'noticia.views.noticias_categoria'), url(r'^noticias/(?P&lt;categoria&gt;[\w\d-]+)/(?P&lt;pagina&gt;\d+)/$', 'noticia.views.noticias_categoria_paginated'), url(r'^noticias/(?P&lt;categoria&gt;[\w\d-]+)/(?P&lt;subcategoria&gt;[\w\d-]+)/(?P&lt;titulo&gt;[\w\d-]+)/$', 'noticia.views.noticia'), url(r'^paginacao/noticias/$', 'noticia.views.noticias_categoria_paginated'), ) </code></pre> <p>I'm trying to reach this view:</p> <pre><code>url(r'^noticias/(?P&lt;categoria&gt;[\w\d-]+)/(?P&lt;subcategoria&gt;[\w\d-]+)/(?P&lt;titulo&gt;[\w\d-]+)/$', 'noticia.views.noticia'), </code></pre> <p>By using this url:</p> <pre><code>http://127.0.0.1:8000/noticias/filmes/acao/lol-e-poka-zuera/ </code></pre> <p>But the file urls.py is not loaded by the Apphook. I've already set the Apphook field in every child page of "Noticias" and "Noticias" as well. The weird thing about it is that I have the same structure in another project which works perfectly. And obviously I've set the app "core" into INSTALLED_APPS. I just can't even imagine what may be causing this issue. I've used a breakpoint into my core/urls.py, but It's not being called by the Apphook.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload