Opened 9 years ago

Closed 8 years ago

#4081 closed (fixed)

Allow blank and null content fields for flatpages

Reported by: Tai Lee Owned by: nobody
Component: Contrib apps Version: master
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: UI/UX:

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 9 years ago.
Allow blank flatpages content
blank-flatpages-with-documentation.diff (1.5 KB) - added by mcroydon 9 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 Changed 9 years ago by mrmachine <real dot human at mrmachine dot net>

Cc: real.human@… added
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 9 years ago by Simon G. <dev@…>

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

comment:3 Changed 9 years ago by James Bennett

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 Changed 9 years ago by Tai Lee <real.human@…>

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...?

comment:5 in reply to:  4 Changed 9 years ago by irlkersten@…

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 Changed 9 years ago by Jacob

Keywords: dbchange added
Triage Stage: Design decision neededAccepted

Changed 9 years ago by ctrochalakis

Attachment: blank-flatpages.diff added

Allow blank flatpages content

comment:7 Changed 9 years ago by ctrochalakis

Has patch: set

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

Changed 9 years ago by mcroydon

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

comment:8 Changed 9 years ago by mcroydon

Triage Stage: AcceptedReady for checkin

Marking ready for checkin per jkocherhans.

comment:9 Changed 8 years ago by Malcolm Tredinnick

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