Hi Jian,
Apologies for the delay in responding.
On Thu, May 8, 2014 at 9:44 AM, Jian Li wrote:
> Hi Russ,
>
> Thanks for the feedback!
>
> I believe the proposed code already addresses points 1-4.
>
> 1) The implementation does in fact return the correct natural key,
> `(self.username,)`, for
Hi Russ,
Thanks for the feedback!
I believe the proposed code already addresses points 1-4.
1) The implementation does in fact return the correct natural key,
`(self.username,)`, for the User model.
2) When multiple fields have `unique=True`, the implementation does not
choose from among them;
On Wed, May 7, 2014 at 10:20 AM, Jian Li wrote:
> Hi!
>
> In the course of implementing `natural_key` for many different models,
> I've noticed that the implementation is fairly predictable; it tends to use
> the fields already marked as unique. To avoid writing a separate
> implementation for ea
Hi!
In the course of implementing `natural_key` for many different models, I've
noticed that the implementation is fairly predictable; it tends to use the
fields already marked as unique. To avoid writing a separate implementation
for each model, I've written a patch that implements the relevant l