chrisjrn / registrasion

A conference registration app, built on top of the Symposion conference management system
Apache License 2.0
18 stars 14 forks source link

Getting a controller object should be much easier #38

Closed chrisjrn closed 8 years ago

chrisjrn commented 8 years ago

In views.py, we have:

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.