I can't see any provision for this in the django docs, so how do people go about doing this.
My specific case is this.
I have a shopping cart, each cart instance has an invoice number field, however the invoice number is only generated if the cart goes to a paid status, so not all shopping cart instances will have an invoice number. I want all invoice numbers to be sequential with no gaps between them, so the default pk isn't perfect in this case, so I want a class variable that acts as a counter for the invoice numbers, and is accessable by all instances.