Skip to content
Reusable application for Django introducing site tree, menu and breadcrumbs navigation elements.
Python HTML CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo Demo now uses Django 3. Dec 5, 2019
docs Python 2 mention removed from docs. Dec 5, 2019
sitetree Release v1.14.0 Dec 5, 2019
.codeclimate.yml Switched to pytest-djangoapp. Jun 16, 2018
.coveragerc Switch to pytest started. Nov 18, 2016
.gitignore Ignore docs/build Apr 28, 2015
.travis.yml Add Django 3 support (#268) Dec 5, 2019
AUTHORS
CHANGELOG Release v1.14.0 Dec 5, 2019
CONTRIBUTING Docs updated. Feb 7, 2018
INSTALL Added INSTALL file. Aug 28, 2016
LICENSE Years updated. Jan 13, 2019
MANIFEST.in South directory removed from manifest. Feb 7, 2018
README.rst Landscape badge removed. Oct 19, 2019
pytest.ini Satisfy recent pytest. Apr 4, 2019
setup.cfg
setup.py Fixed a regression in Admin not filtering Parent item choices (see #266) Nov 23, 2019
tox.ini Add Django 3 support (#268) Dec 5, 2019

README.rst

django-sitetree

http://github.com/idlesign/django-sitetree

LBC Python 2

release lic ci coverage

What's that

django-sitetree is a reusable application for Django, introducing site tree, menu and breadcrumbs navigation elements.

Site structure in django-sitetree is described through Django admin interface in a so called site trees. Every item of such a tree describes a page or a set of pages through the relation of URI or URL to human-friendly title. Eg. using site tree editor in Django admin:

URI             Title
  /             - Site Root
  |_users/      - Site Users
    |_users/13/ - Definite User

Alas the example above makes a little sense if you have more than just a few users, that's why django-sitetree supports Django template tags in item titles and Django named URLs in item URIs. If we define a named URL for user personal page in urls.py, for example, 'users-personal', we could change a scheme in the following way:

URI                           Title
  /                           - Site Root
  |_users/                    - Site Users
    |_users-personal user.id  - User Called {{ user.first_name }}

After setting up site structure as a sitetree you should be able to use convenient and highly customizable site navigation means (menus, breadcrumbs and full site trees).

User access to certain sitetree items can be restricted to authenticated users or more accurately with the help of Django permissions system (Auth contrib package).

Sitetree also allows you to define dynamic trees in your code instead of Admin interface. And even more: you can combine those two types of trees in more sophisticated ways.

Documentation

http://django-sitetree.readthedocs.org/

You can’t perform that action at this time.