Added documentation to the from_post method of TransactionFrom in the accounting application.
This commit is contained in:
parent
790e8da908
commit
759e7262fb
@ -237,6 +237,16 @@ class TransactionForm(forms.Form):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def from_post(post: Dict[str, str], txn_type: str, txn: Model):
|
def from_post(post: Dict[str, str], txn_type: str, txn: Model):
|
||||||
|
"""Constructs a transaction form from the POST data.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
post: The post data.
|
||||||
|
txn_type: The transaction type.
|
||||||
|
txn: The transaction data model.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
The transaction form.
|
||||||
|
"""
|
||||||
TransactionForm._sort_post_txn_records(post)
|
TransactionForm._sort_post_txn_records(post)
|
||||||
form = TransactionForm(post)
|
form = TransactionForm(post)
|
||||||
form.txn_type = txn_type
|
form.txn_type = txn_type
|
||||||
|
Loading…
Reference in New Issue
Block a user