Code

Opened 7 years ago

Closed 7 years ago

#4006 closed (duplicate)

Same meaning, different parameters names in newforms.*Field / db.models.*Field

Reported by: tonnzor <tonn81@…> Owned by: adrian
Component: Forms 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 same as a tol of developers I use Django DB model and newforms, but I found them a bit confusing and not as elegant as possible.

They uses different attribute names for defining the same thing:

Moduledb.models.*Fieldnewforms.*Field
Maximum length of fieldmaxlengthmax_length
Whether field can be empty or notblankrequired

(maybe more)

I'm sure that if things have the same meaning, they should have the same name.

Attachments (0)

Change History (1)

comment:1 Changed 7 years ago by Simon G. <dev@…>

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

max_length vs maxlength is being resolved (e.g. #2101 and here). I agree that the blank/null distinction in the models is slightly confusing, but it's quite distinct to the newforms "required" field - which IMO is correctly named.

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.