diff -r 6641e941ef1e -r ff1a9aa48cfd app/django/contrib/flatpages/models.py --- a/app/django/contrib/flatpages/models.py Tue Oct 14 12:36:55 2008 +0000 +++ b/app/django/contrib/flatpages/models.py Tue Oct 14 16:00:59 2008 +0000 @@ -1,14 +1,12 @@ -from django.core import validators from django.db import models from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ class FlatPage(models.Model): - url = models.CharField(_('URL'), max_length=100, validator_list=[validators.isAlphaNumericURL], db_index=True, - help_text=_("Example: '/about/contact/'. Make sure to have leading and trailing slashes.")) + url = models.CharField(_('URL'), max_length=100, db_index=True) title = models.CharField(_('title'), max_length=200) - content = models.TextField(_('content')) + content = models.TextField(_('content'), blank=True) enable_comments = models.BooleanField(_('enable comments')) template_name = models.CharField(_('template name'), max_length=70, blank=True, help_text=_("Example: 'flatpages/contact_page.html'. If this isn't provided, the system will use 'flatpages/default.html'.")) @@ -21,14 +19,6 @@ verbose_name_plural = _('flat pages') ordering = ('url',) - class Admin: - fields = ( - (None, {'fields': ('url', 'title', 'content', 'sites')}), - (_('Advanced options'), {'classes': 'collapse', 'fields': ('enable_comments', 'registration_required', 'template_name')}), - ) - list_filter = ('sites',) - search_fields = ('url', 'title') - def __unicode__(self): return u"%s -- %s" % (self.url, self.title)