Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3871624
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T21:50:30+00:00 2026-05-19T21:50:30+00:00

I am trying to use django-sitetree but I don’t understand how to do step

  • 0

I am trying to use django-sitetree but I don’t understand how to do step 3 which is:

“Go to Django Admin site and add some trees and tree items.”

How to make a sitetree in the admin panel? I believe the first step is to choose an alias for the “Site Tree” you are about to add.

The next step is to add “Site Tree Item”. On this page you have to choose parent, title, url. Considering my app is dynamic with url structure like this localhost:8000/categoryname/entryname how do I choose urls?

By the way I am trying to add breadcrumbs in my templates.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T21:50:30+00:00Added an answer on May 19, 2026 at 9:50 pm

    To create a tree:

    1. Goto site administration panel;
    2. Click +Add near ‘Site Trees’;
    3. Enter alias for your sitetree, e.g. ‘maintree’.
      You’ll address your tree by this alias in template tags;
    4. Push ‘Add Site Tree Item’;
    5. Create first item:

      Parent: As it is root item that would have no parent.
      Title: Let it be ‘My site’.
      URL: This URL is static, so put here ‘/’.

    6. Create second item (that one would handle ‘categoryname’ from your ‘categoryname/entryname’):

      Parent: Choose ‘My site’ item from step 5.
      Title: Put here ‘Category #{{ category.id }}’.
      URL: Put named URL ‘category-detailed category.name’.
      In ‘Additional settings’: check ‘URL as Pattern‘ checkbox.

    7. Create third item (that one would handle ‘entryname’ from your ‘categoryname/entryname’):

      Parent: Choose ‘Category #{{ category.id }}’ item from step 6.
      Title: Put here ‘Entry #{{ entry.id }}’.
      URL: Put named URL ‘entry-detailed category.name entry.name’.
      In ‘Additional settings’: check ‘URL as Pattern‘ checkbox.

    8. Put ‘{% load sitetree %}’ into yor template to have access to sitetree tags.
    9. Put ‘{% sitetree_menu from “maintree” %}’ into your template to render menu.
    10. Put ‘{% sitetree_breadcrumbs from “maintree” %}’ into your template to render breadcrumbs.

    Steps 6 and 7 need some clarifications:

    • In titles we use Django template variables, which would be resolved just like they do in your templates.

      E.g.: You made your view for ‘categoryname’ (let’s call it ‘detailed_category’) to pass category object into template
      as ‘category’ variable. Suppose that category object has ‘id’ property.
      In your template you use ‘{{ category.id }}’ to render id. And we do just
      the same for site tree item in step 6.

    • In URLs we use Django’s named URL patterns (documentation). That is almost idential to usage of Django ‘url‘ tag in templates.

      Your urls configuration for steps 6, 7 supposed to include:

      url(r’^(?P<category_name>\S+)/(?P<entry_name>\S+)/$’, ‘detailed_entry’, name=’entry-detailed‘),
      url(r’^(?P<category_name>\S+)/$’, ‘detailed_category’, name=’category-detailed‘),

      So, putting ‘entry-detailed category.name entry.name’ in step 7 into URL field we tell sitetree to associate that sitetree item with URL named ‘entry-detailed’, passing to it category_name and entry_name parameters.

    I hope this description should fill the documentation gap %)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building a Django site and trying to use the request.is_ajax() function... But it's
I am new to django and trying to use django-messages to add inbox/compose/outbox/trash functionality
I'm trying to use the Django ORM in some standalone screen scraping scripts. I
I'm trying to use fixtures in Django to provide some initial data to one
Well, when I'm trying to use 'inclusion' in Django, I met some confused problems
I'm trying to use Django's annotate feature to add the count of a related
I'm trying to use django-multilingual and setup it properly. But what I found is
I am trying to use the Django admin to allow rudimentary management of page
I was trying to use django-endless-pagination twitter pagination , but Django is throwing and
I've been trying to use Django-appengine to write a small web app, but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.