Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 27 lines (21 sloc) 1.064 kb
7c99d20a » gw0
2011-09-15 Added configurable plugin options for filtering listed pages.
1 # -*- coding: utf-8 -*-
2 from django.db import models
3 from django.utils.translation import ugettext_lazy as _
4
5 from cms.models import CMSPlugin
6
7
8 class HtmlSitemap(CMSPlugin):
9 """Model for HTML Sitemap CMS plugin."""
10
11 level_min = models.PositiveSmallIntegerField(_('starting level'), default=0)
12 level_max = models.PositiveSmallIntegerField(_('deepest level'), default=100)
13 in_navigation = models.NullBooleanField(_('is in navigation'), default=None)
14 match_created_by = models.CharField(_('exact match on created by'), blank=True,
15 max_length=70)
16 match_title = models.CharField(_('match title containing substring'), blank=True,
17 max_length=255)
18 match_url = models.CharField(_('URL match with regular expression'), blank=True,
19 max_length=100)
20
21 class Meta:
22 verbose_name = _('HTML Sitemap plugin')
23 verbose_name_plural = _('HTML Sitemap plugins')
24 ordering = ('level_min', 'level_max')
25
26 def __unicode__(self):
27 return u'HTML Sitemap {0}-{1}'.format(self.level_min, self.level_max)
Something went wrong with that request. Please try again.