Code

Opened 2 years ago

Closed 19 months ago

#18245 closed Bug (fixed)

Error in documentation of date based generic views

Reported by: aaugustin Owned by: aaugustin
Component: Documentation Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The documentation says:

next_month: A datetime.date object representing the first day of the next month. If the next month is in the future, this will be None.
previous_month: A datetime.date object representing the first day of the previous month. Unlike next_month, this will never be None.

Actually, both values can also be None if allow_empty is False and if there's no object in the future / past.

This problem exists for both month and day views.

Attachments (1)

ticket18245.diff (945 bytes) - added by mateusgondim 22 months ago.
Both descriptions updated.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 2 years ago by jezdez

  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 22 months ago by mateusgondim

  • Owner changed from nobody to mateusgondim

Changed 22 months ago by mateusgondim

Both descriptions updated.

comment:3 Changed 22 months ago by mateusgondim

  • Has patch set

comment:4 Changed 22 months ago by aaugustin

  • Owner changed from mateusgondim to aaugustin

comment:5 Changed 22 months ago by mateusgondim

Hi, sorry, did i do something wrong?

comment:6 Changed 22 months ago by aaugustin

I see you've written a patch. I'm just assigning the ticket to myself in order to review it and commit it!

comment:7 Changed 22 months ago by mateusgondim

Oh ok, thanks!

comment:8 Changed 19 months ago by Aymeric Augustin <aymeric.augustin@…>

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

In [7207327dd313522954da167f9a41396b97354c78]:

Updated docs for dates generic views.

Fixes #18245. Refs #3542.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.