Code

Opened 3 years ago

Closed 3 years ago

#15332 closed (wontfix)

Model Field "default" attribute: clarify relationship with blank and null attributes

Reported by: ijstokes Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

The documentation needs a short note stating under what conditions the specified "default" value is applied to a ModelField. My best guess would be if the field is blank *or* null then the default will be applied and stored in the DB. Also, knowing how this default value relates to "unique" and any "choices" list would be nice.

Ian

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

Erm... the default is the value that is used for a field when a value hasn't been provided. That's what "default" means. The interaction with blank, null, unique and choices is exactly the same as it would be if you had a user-provided value.

Closing wontfix, because I can't see what is unclear in all this, without getting into dictionary level definitions of terms. Feel free to reopen if you can clarify exactly what you see as unclear.

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.