Module Expr Str ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr attr Return AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call NameLoad decorator_list
N/A N/A 
A way of retrieving unique, increasing values for use elsewhere in the system.

Based upon

    http://code.flickr.com/blog/2010/02/08/ticket-servers-distributed-unique- primary-keys-on-the-cheap/

but using insert + delete so that it works for databases without MySQL's
REPLACE functionality (thus, this version is somewhat less efficient than
Flick's, but out write load is significantly less as well).
 django.db models Manager N/A N/A models Manager N/A new N/A N/A self N/A N/A N/A obj N/A N/A self create N/A N/A N/A N/A N/A self filter counter__lt N/A obj counter delete N/A N/A obj counter N/A N/A Ticket N/A N/A models Model N/A N/A 
    A persistent counter. There will only ever be one of these in the database
    at a time.
     N/A counter N/A N/A models AutoField primary_key True N/A objects N/A Manager N/A