Opened 18 years ago

Closed 16 years ago

#4081 closed (fixed)

Allow blank and null content fields for flatpages

Reported by: Tai Lee Owned by: nobody
Component: Contrib apps Version: dev
Severity: Keywords: flatpages blank null content dbchange
Cc: real.human@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

some flatpages not not need any actual content pulled from the database if they are using a custom template (depending on the design of the page). allowing blank/null content fields would avoid having to put irrelevent content into the database just to circumvent the validation.

Attachments (2)

blank-flatpages.diff (899 bytes ) - added by ctrochalakis 17 years ago.
Allow blank flatpages content
blank-flatpages-with-documentation.diff (1.5 KB ) - added by mcroydon 17 years ago.
Added note about new functionality in the documentation; also swapped out chicagocrime link for everyblock link

Download all attachments as: .zip

Change History (11)

comment:1 by mrmachine <real dot human at mrmachine dot net>, 18 years ago

Cc: real.human@… added

comment:2 by Simon G. <dev@…>, 18 years ago

Summary: allow blank and null content fields for flatpagesAllow blank and null content fields for flatpages
Triage Stage: UnreviewedDesign decision needed

comment:3 by James Bennett, 17 years ago

This would be backwards-incompatible, and if all you want is a custom template at a given URL the direct_to_template generic view is probably a better option, so I'd be -1 on this.

comment:4 by Tai Lee <real.human@…>, 17 years ago

direct_to_template would required urls.py to be changed and the server restarted each time a new page is added. Flatpages allows staff admin users to create and delete pages without changing urls.py or restarting the server. Where's the harm in allowing blank content? How is that even backwards incompatible? As long as null=False stays, no existing sites should break by adding blank=True...?

in reply to:  4 comment:5 by irlkersten@…, 17 years ago

This ticket has been open since 7 months. Who can make design decisions such as these? Is there anything I could do to help in such a case?

comment:6 by Jacob, 17 years ago

Keywords: dbchange added
Triage Stage: Design decision neededAccepted

by ctrochalakis, 17 years ago

Attachment: blank-flatpages.diff added

Allow blank flatpages content

comment:7 by ctrochalakis, 17 years ago

Has patch: set

I have tested it with content set to blank and seems to work as expected.

by mcroydon, 17 years ago

Added note about new functionality in the documentation; also swapped out chicagocrime link for everyblock link

comment:8 by mcroydon, 17 years ago

Triage Stage: AcceptedReady for checkin

Marking ready for checkin per jkocherhans.

comment:9 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [7807]) Fixed #4081 -- Allow empty content in flatpages.
Patch from ctrochalakis and Matt Croydon.

Note: See TracTickets for help on using tickets.
Back to Top