Opened 8 years ago

Closed 7 years ago

#4081 closed (fixed)

Allow blank and null content fields for flatpages

Reported by: mrmachine 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 7 years ago.
Allow blank flatpages content
blank-flatpages-with-documentation.diff (1.5 KB) - added by mcroydon 7 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 8 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 8 years ago by Simon G. <dev@…>

  • Summary changed from allow blank and null content fields for flatpages to Allow blank and null content fields for flatpages
  • Triage Stage changed from Unreviewed to Design decision needed

comment:3 Changed 8 years ago by ubernostrum

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 follow-up: Changed 8 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 8 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 8 years ago by jacob

  • Keywords dbchange added
  • Triage Stage changed from Design decision needed to Accepted

Changed 7 years ago by ctrochalakis

Allow blank flatpages content

comment:7 Changed 7 years ago by ctrochalakis

  • Has patch set

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

Changed 7 years ago by mcroydon

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

comment:8 Changed 7 years ago by mcroydon

  • Triage Stage changed from Accepted to Ready for checkin

Marking ready for checkin per jkocherhans.

comment:9 Changed 7 years ago by mtredinnick

  • Resolution set to fixed
  • Status changed from new to closed

(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