Note that there are some explanatory texts on larger screens.

plurals
  1. POdjango-sitetree (0.9.4) won't render some menu and breadcrumbs elements
    primarykey
    data
    text
    <p>I have a problem with URL Patterns in SiteTree configuration. I have read the manual: <a href="https://django-sitetree.readthedocs.org/ru/latest/quickstart.html" rel="nofollow">https://django-sitetree.readthedocs.org/ru/latest/quickstart.html</a></p> <p>So I'm trying to make my tree with named URLs:</p> <ol> <li><p>app/urls.py:</p> <pre><code>urlpatterns = patterns('', ..... url('^dict/persons/(?P&lt;person_id&gt;\d+)/$', persondetail, name = 'persondetail'), ..... ) </code></pre></li> <li><p>SiteTree Item config:</p> <pre><code>Title: 'Person detail' URL: 'app:persondetail person.id' </code></pre></li> <li><p>URL as Pattern (checked)</p></li> </ol> <p>The result is bad - SiteTree menu does not work propetly - it doesn't render menu elements and breadscrumbs. On other pages it works. </p> <p>Also I have tried to write URl pattern like:</p> <pre><code> - 'app:persondetail person.id' - 'app:persondetail person_id' - 'app:persondetail Person.id' - 'app:persondetail Person_id' - 'app:persondetail {{person.id}}' - 'app:persondetail {{Person.id}}' - 'app:persondetail #person.id' - 'app:persondetail #Person.id' - with quotes and without </code></pre> <p>But it doesn't still work. </p> <p>Structure of my project is:</p> <pre><code>- project |___main_app | |___urls.py: | from django.conf.urls import patterns, include, url | from django.contrib import admin | admin.autodiscover() | | urlpatterns = patterns('', | url(r'^', include('app.urls', namespace="app")), | url(r'^admin/', include(admin.site.urls)), | ) | |___app |___urls.py: | from django.conf.urls import patterns, include, url | from jdevtool.views import * | | urlpatterns = patterns('', | ..... | url('^dict/persons/(?P&lt;person_id&gt;\d+)/$', persondetail, name = 'persondetail'), | ..... | | ) | |___views.py: ..... def persondetail(request, person_id): pers = get_object_or_404(Person, pk=person_id) return render(request, 'app/persDetail.html', {'pers': pers}) ..... </code></pre>
    singulars
    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.
 

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