Closed chrisjrn closed 8 years ago
In views.py, we have:
views.py
note_id = int(note_id) note = commerce.CreditNote.objects.get(pk=note_id) current_note = CreditNoteController(note)
and
invoice_id = int(invoice_id) inv = get_object_or_404(commerce.Invoice, pk=invoice_id) current_invoice = InvoiceController(inv)
What would be nicer would be to go:
current_invoice = InvoiceController.for_id(invoice_id)
Which would also take care of str->int conversion.
str
int
In
views.py
, we have:and
What would be nicer would be to go:
Which would also take care of
str
->int
conversion.