Login

Snippets by pizte

Snippet List

Number generator to autofill a field

**Number format:** number/year **Purpose:** When the user adds a new bill, the "number" field will be automatically filled with the appropriate number. * The snippet automatically increments the bill number based in the highest number available. This is because in the use case, the user could start by *any* number, and we couldn't use the PK number (p.e. if the user first object number is 324/10, using the PK will convert it to 1/10) **NOTE:** bill_type is a Boolean value to mark if the bill is outgoing or ingoing. Since we only need to mark the outgoing ones, we filter through this field.

  • django-admin
  • number-generator
  • autofill
Read More

pizte has posted 1 snippet.