On Jul 12, 2006, at 7:38 PM, Adrian Holovaty wrote:
>
> On 7/12/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
>> Is there a better way to do this? More specifically, an atomic way to
>> generate and set the new unique_id? I can't just use the
>> autogenerated
>> 'id' primary key as an unique
On 7/12/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> Is there a better way to do this? More specifically, an atomic way to
> generate and set the new unique_id? I can't just use the autogenerated
> 'id' primary key as an unique identifier, because I have a list of
> legacy unique_id values which I
On 7/12/06, Ian Holsman <[EMAIL PROTECTED]> wrote:
>
> why not use a GUID ?
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/163604
That's pretty neat, but I do need the values to increase by one everytime.
Jay P.
--~--~-~--~~~---~--~~
You received this
why not use a GUID ?
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/163604
On 13/07/2006, at 8:08 AM, Jay Parlar wrote:
>
> On 7/12/06, Don Arbow <[EMAIL PROTECTED]> wrote:
>>
>> On Jul 12, 2006, at 8:56 AM, Jay Parlar wrote:
>>>
>>> Is there a better way to do this? More specifically,
On 7/12/06, Don Arbow <[EMAIL PROTECTED]> wrote:
>
> On Jul 12, 2006, at 8:56 AM, Jay Parlar wrote:
> >
> > Is there a better way to do this? More specifically, an atomic way to
> > generate and set the new unique_id? I can't just use the autogenerated
> > 'id' primary key as an unique
On Jul 12, 2006, at 8:56 AM, Jay Parlar wrote:
>
> Is there a better way to do this? More specifically, an atomic way to
> generate and set the new unique_id? I can't just use the autogenerated
> 'id' primary key as an unique identifier, because I have a list of
> legacy unique_id values which I
I've got a model something like this:
class Product(models.Model)
name = models.CharField(...)
unique_id = models.PostiveIntegerField(unique=True)
Instances of this model are only ever created programatically from a
view. My current (and awful) scheme for getting a new unique_id for a
7 matches
Mail list logo