Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#24376 closed Cleanup/optimization (fixed)

UUIDField doesn't take a verbose_name positional arg

Reported by: Michael Angeletti Owned by: nobody
Component: Database layer (models, ORM) Version: 1.8alpha1
Severity: Normal Keywords: 1.8-beta
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Looking at https://github.com/django/django/blob/master/django/db/models/fields/__init__.py#L2372, UUIDField doesn't take a positional argument, which is inconsistent with the behavior of other fields (the exception being relationship fields). Since UUIDField will surely be used for more than just a primary key replacement in some cases, it might be worth preserving this consistency. If you core devs are ok with this, I'll make a patch.

Thoughts?

Change History (9)

comment:1 by Claude Paroz, 10 years ago

Triage Stage: UnreviewedAccepted
Type: UncategorizedCleanup/optimization

Sure!

comment:2 by Tim Graham, 10 years ago

Keywords: 1.8-beta added

comment:3 by Michael Angeletti, 10 years ago

Last edited 10 years ago by Michael Angeletti (previous) (diff)

comment:4 by Michael Angeletti, 10 years ago

Has patch: set

comment:5 by Claude Paroz, 10 years ago

Needs tests: set

Could you please complement the existing test for verbose names: tests/model_fields/tests.py, BasicFieldTests.test_field_verbose_name?

comment:6 by Tim Graham, 10 years ago

Would be nice to verify support for DurationField as well.

comment:7 by Tim Graham, 10 years ago

Needs tests: unset
Triage Stage: AcceptedReady for checkin

comment:8 by Michael Angeletti <michael@…>, 10 years ago

Resolution: fixed
Status: newclosed

In ea3168dc6ced391d848c511a14cfcecfeac9d401:

Fixed #24376 -- added verbose_name arg to UUIDField

comment:9 by Tim Graham <timograham@…>, 10 years ago

In 1feeefe918e0f6ea6d633855549310dd149baed5:

[1.8.x] Fixed #24376 -- added verbose_name arg to UUIDField

Backport of ea3168dc6ced391d848c511a14cfcecfeac9d401 from master

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