Commit Graph

671 Commits

Author SHA1 Message Date
依瑪貓
790e8da908 Moved the make_txn_form_from_model utility to the from_model method in the TransactionForm in the accounting application. 2020-08-19 13:43:27 +08:00
依瑪貓
6f019d23c0 Moved the sort_post_txn_records utility and the logic to create the form to TransactionForm in the accounting application. 2020-08-19 13:38:05 +08:00
依瑪貓
8770770b66 Applied the modified RedirectView from the Mia core application to the accounting application. 2020-08-19 10:04:27 +08:00
依瑪貓
54f6ad3d3b Added the modified RedirectView with current_app to the current namespace in the Mia core application. 2020-08-19 10:03:45 +08:00
724be9f9bb Moved the regular payments from the accounting application to the site-specific JavaScript. 2020-08-19 00:12:51 +08:00
e697227658 Removed the manually-set database table names from the data models in the accounting application. 2020-08-18 23:25:49 +08:00
2af34f40e0 Added the missing record sorting to the make_form_from_post() method of the transaction form view in the accounting application. 2020-08-18 23:23:16 +08:00
dddc27402e Changed the sample data from Chinese to English in the accounting application. 2020-08-18 22:50:36 +08:00
依瑪貓
ea9d4601ef Added back the current user of the object in the fill_model_from_form method in TransactionFormView in the accounting application, since it did not call the parent method to set it. 2020-08-18 13:33:01 +08:00
依瑪貓
d1a64f86c3 Revised the code order in the dispatch and get_form methods in the Mia core application. 2020-08-18 10:33:22 +08:00
依瑪貓
60bcbde9b1 Removed the unnecessary initialization of the current user property in the transaction data model in the accounting application. 2020-08-18 10:10:17 +08:00
依瑪貓
31c1c7c35a Removed the unnecessary setting the current usr in the TransactionFormView and AccountFormView in the accounting application. 2020-08-18 10:02:53 +08:00
依瑪貓
321165a50f Added to set the current user of the data model if the model is our BaseModel in the fill_model_from_form() method in FormView in the Mia core application. 2020-08-18 10:01:45 +08:00
依瑪貓
a6fc865b3e Replaced the type hint of the object of FormView from Optional[BaseModel] to Optional[Model] in the Mia core application. 2020-08-18 09:59:46 +08:00
依瑪貓
71989f424c Replaced the _set_object() method, the _get_object() method, and the _object property with the object property in FormView, and applied the object in the get_success_url(). 2020-08-18 09:35:29 +08:00
依瑪貓
c72d550cd4 Applied the base model from the Mia core application to the models in the accounting application. 2020-08-18 09:27:58 +08:00
依瑪貓
216979dcf4 Added the abstract base model in the Mia core application. 2020-08-18 09:27:26 +08:00
05f164579b Replaced the per-view based login_required decorators with decorator_include, removing the dependency of the accounting application to the site-specific configuration. 2020-08-18 03:16:59 +08:00
1f14e0deea Removed the dependency in the accounting_sample command to the user data model in the accounting application. 2020-08-18 03:05:47 +08:00
d4961f9e25 Moved the local part of the application from the Mia core application to the Mia Womb local application. 2020-08-18 00:37:04 +08:00
edeaaef00c Revisd the translation in the accounting application. 2020-08-18 00:11:32 +08:00
bd7b49feda Removed an unused import from the models in the Mia core application. 2020-08-17 23:26:50 +08:00
165768deee Revised the code in the get_success_url method in TransactionSortFormView in the accounting application. 2020-08-17 23:23:41 +08:00
dec6233d4e Added the current_app parameters to the uses of reverse() to enable different namespaces in the accounting application. 2020-08-17 23:05:01 +08:00
062f4422d1 Added namespace to the url_period tag in the Mia core application. 2020-08-17 22:51:47 +08:00
24db1af175 Renamed the templates of the transactions in the Mia core application. 2020-08-17 22:49:37 +08:00
6ff9d0d4ff Replaced tuples with lists in the arguments for reverse() in the accounting application. 2020-08-17 22:49:28 +08:00
d1cb5cb0d0 Added get_success_url() to TransactionSortFormView to utilize the namespace in the accounting application. 2020-08-17 22:44:43 +08:00
c400d65f91 Replaced the get_absolute_url() method in the user data model with the get_success_url() method in the user and my account form model, and added the current application to the arguments to enable multiple instances of the application in the accounting application. 2020-08-17 22:41:37 +08:00
8cadb02d2d Added the namespace to the get_success_url method of the MyAccountFormView in the Mia core application. 2020-08-17 22:39:32 +08:00
b3e18d547d Replaced the get_absolute_url() method in the account data model with the get_success_url() method in the account form model, and added the current application to the arguments to enable multiple instances of the application in the accounting application. 2020-08-17 22:27:54 +08:00
64769440a7 Replaced the get_absolute_url() method in the transaction data model with the get_success_url() method in the transaction form model, and added the current application to the arguments to enable multiple instances of the application in the accounting application. 2020-08-17 22:23:30 +08:00
5898a48fe9 Fixed the documentation of the txn_type @property in TransactionFormView in the accounting application. 2020-08-17 22:18:40 +08:00
c3fc2a5093 Renamed the templates of the transactions in the accounting application. 2020-08-17 20:51:47 +08:00
依瑪貓
5e321ad420 Added to catch ProgrammingError when checking whether a user is in use in the Mia core application. 2020-08-17 09:29:03 +08:00
35b246077c Moved the form creating logic from the post() method to the get_form() method, and applied get_form() to the post() method in FormView in the Mia core application. 2020-08-17 07:48:46 +08:00
8f6c8f3497 Replaced the function-based txn_sort view with the class-based TransactionSortView in the accounting application. 2020-08-16 22:38:35 +08:00
b829002c61 Revised the documentation in FormView in the Mia core application. 2020-08-16 19:10:38 +08:00
eba94c2b96 Added type hints to the parameters in the form_invalid and form_valid methods in FormView in the Mia core application. 2020-08-16 19:00:47 +08:00
4f9c3e89c3 Reordered the methods in FormView in the Mia core application. 2020-08-16 18:58:25 +08:00
9c98cb70f4 Split the post() method into form_valid() and form_invalid() in the FormView in the Mia core application. 2020-08-16 18:31:02 +08:00
15594c4349 Added type hint to the return types of the get_context_data and get_form methods in FormView in the Mia core application. 2020-08-16 18:15:28 +08:00
499b7897ef Simplified the get_object method in the UserFormView in the Mia core application. 2020-08-16 13:44:41 +08:00
12a27ba01e Simplified the get_object method in the AccountFormView in the accounting application. 2020-08-16 13:43:35 +08:00
b52733775c Replaced the request.resolver_match.kwargs.account with form.account in the account form in the accounting application. 2020-08-16 13:42:40 +08:00
0d38cdd403 Replaced the function-based txn_form and txn_store view with the class-based TransactionFormView in the accounting application. 2020-08-16 13:27:31 +08:00
60b3dfa33c Split the get() method into get_context_data() and get_form() from FormValue in the Mia core application. 2020-08-16 13:20:18 +08:00
a7bb5d456a Added the cleaned_data argument to the get_not_modified_message and get_success_message methods in the FormView in the Mia core application. 2020-08-16 10:46:59 +08:00
3794735df9 Added the documentation to the get_form_class() method in the FormView in the Mia core application. 2020-08-16 10:40:31 +08:00
38df53d73a Renamed the do_get() method to get(), and do_post() method to post(), and accepts the parameters as dispatch() in the FormView in the Mia core application. 2020-08-16 10:39:20 +08:00