Opened 8 years ago

Closed 8 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.

Change History (1)

comment:1 Changed 8 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.

Note: See TracTickets for help on using tickets.
Back to Top