Django

Code

Ticket #3703 (closed: fixed)

Opened 1 year ago

Last modified 1 year ago

[patch] Add 'pk' property to models.Model

Reported by: Collin Grady <cgrady@the-magi.us> Assigned to: nobody
Milestone: Component: Core framework
Version: SVN Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

Provides obj.pk as a property for the primary key, similar to how you can use .filter(pk=foo) to search based on the primary key.

Attachments

pk_property.patch (0.5 kB) - added by Collin Grady <cgrady@the-magi.us> on 03/11/07 04:47:54.
pk_property_with_tests.diff (1.6 kB) - added by jeromie@gmail.com on 09/14/07 15:12:18.
Patch including tests and documentation

Change History

03/11/07 04:47:54 changed by Collin Grady <cgrady@the-magi.us>

  • attachment pk_property.patch added.

03/11/07 05:10:56 changed by Simon G. <dev@simon.net.nz>

  • stage changed from Unreviewed to Ready for checkin.

03/15/07 02:51:53 changed by russellm

  • needs_docs set to 1.
  • component changed from Database wrapper to Core framework.
  • needs_tests set to 1.
  • stage changed from Ready for checkin to Accepted.

09/14/07 11:20:59 changed by anonymous

  • owner changed from nobody to jeromie.

09/14/07 15:12:18 changed by jeromie@gmail.com

  • attachment pk_property_with_tests.diff added.

Patch including tests and documentation

09/14/07 15:13:59 changed by jeromie

  • owner changed from jeromie to nobody.
  • needs_docs deleted.
  • needs_tests deleted.
  • stage changed from Accepted to Ready for checkin.

09/15/07 20:57:25 changed by mtredinnick

  • status changed from new to closed.
  • resolution set to fixed.

(In [6346]) Fixed #3703 -- Added pk property to models. Thanks, Collin Grady and jeromie@gmail.com.


Add/Change #3703 ([patch] Add 'pk' property to models.Model)




Change Properties
Action