Ticket #18331: patch

File patch, 1.2 KB (added by yarula, 12 years ago)

local patch which allows to store template files of maximum length

  • django/contrib/flatpages/models.py

    diff --git a/django/contrib/flatpages/models.py b/django/contrib/flatpages/models.py
    index 85873ac..8d8a9d4 100644
    a b  
    11from django.db import models
    22from django.contrib.sites.models import Site
    33from django.utils.translation import ugettext_lazy as _
    4 
     4import os
    55
    66class FlatPage(models.Model):
    77    url = models.CharField(_('URL'), max_length=100, db_index=True)
    88    title = models.CharField(_('title'), max_length=200)
    99    content = models.TextField(_('content'), blank=True)
    1010    enable_comments = models.BooleanField(_('enable comments'))
    11     template_name = models.CharField(_('template name'), max_length=70, blank=True,
     11    template_name = models.CharField(_('template name'), max_length=os.pathconf('/', 'PC_PATH_MAX'), blank=True,
    1212        help_text=_("Example: 'flatpages/contact_page.html'. If this isn't provided, the system will use 'flatpages/default.html'."))
    1313    registration_required = models.BooleanField(_('registration required'), help_text=_("If this is checked, only logged-in users will be able to view the page."))
    1414    sites = models.ManyToManyField(Site)
Back to Top