arrobalytics / django-ledger

Django Ledger is a double entry accounting system built on the Django Web Framework.
https://www.djangoledger.com
GNU General Public License v3.0
1.03k stars 226 forks source link

python manage.py runserver Not working. #146

Closed 868jjm closed 1 year ago

868jjm commented 1 year ago

Describe the bug After I Set Up Django Ledger for Development. I get to:

python manage.py test django_ledger

And when I run it i get an error. (django-ledger-rXgOjIEC) C:\Users\qwerty\Documents\django-ledger2\django-ledger>python manage.py test django_ledger Traceback (most recent call last): File "C:\Users\qwerty\Documents\django-ledger2\django-ledger\manage.py", line 11, in main from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\qwerty\Documents\django-ledger2\django-ledger\manage.py", line 22, in main() File "C:\Users\qwerty\Documents\django-ledger2\django-ledger\manage.py", line 13, in main raise ImportError( ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

To Reproduce Steps to reproduce the behavior:

  1. Set Up Django Ledger for Development
  2. Install tzdata yourself
  3. Open CMD
  4. Use: python manage.py test django_ledger
  5. See error: (django-ledger-rXgOjIEC) C:\Users\qwerty\Documents\django-ledger2\django-ledger>python manage.py test django_ledger Traceback (most recent call last): File "C:\Users\qwerty\Documents\django-ledger2\django-ledger\manage.py", line 11, in main from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\qwerty\Documents\django-ledger2\django-ledger\manage.py", line 22, in main() File "C:\Users\qwerty\Documents\django-ledger2\django-ledger\manage.py", line 13, in main raise ImportError( ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?

Expected behavior A working demo.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

elarroba commented 1 year ago

Hello @868jjm ,

In looking at your logs it seems that your virtual environment is not correctly installed or is not activated. I've updated the installation section so you can get a working project going.

https://github.com/arrobalytics/django-ledger#installation

Please let me know if this helps. Miguel

868jjm commented 1 year ago

(django-ledger-DBZC_vQ-) C:\Users\868jjm\Documents\django-ledger3\django-ledger>python manage.py test django_ledger Found 19 test(s). Creating test database for alias 'default'... System check identified no issues (0 silenced). 07/01/2023 09:20:23 AM Populating Entity Testing Inc-103737... 07/01/2023 09:20:28 AM Populating Entity Testing Inc-468569... 07/01/2023 09:20:33 AM Populating Entity Testing Inc-674961... .....07/01/2023 09:20:40 AM Populating Entity Testing Inc-405832... 07/01/2023 09:20:45 AM Populating Entity Testing Inc-903594... 07/01/2023 09:20:51 AM Populating Entity Testing Inc-443574... 07/01/2023 09:20:57 AM Logging in client... .07/01/2023 09:20:57 AM Logging in client... F07/01/2023 09:20:58 AM Logging in client... .07/01/2023 09:20:58 AM Logging out client... .07/01/2023 09:20:59 AM Populating Entity Testing Inc-393669... 07/01/2023 09:21:04 AM Populating Entity Testing Inc-674309... 07/01/2023 09:21:10 AM Populating Entity Testing Inc-169182... 07/01/2023 09:21:15 AM Logging in client... C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\views\generic\base.py:97: DeleteViewCustomDeleteWarning: DeleteView uses FormMixin to handle POST requests. As a consequence, any custom deletion logic in EntityDeleteView.delete() handler should be moved to form_valid(). self = cls(initkwargs) .07/01/2023 09:21:16 AM Logging in client... .07/01/2023 09:21:17 AM Logging in client... .07/01/2023 09:21:17 AM Logging in client... .07/01/2023 09:21:17 AM Logging in client... .07/01/2023 09:21:18 AM Logging out client... F07/01/2023 09:21:18 AM Populating Entity Testing Inc-997834... 07/01/2023 09:21:23 AM Populating Entity Testing Inc-815522... 07/01/2023 09:21:28 AM Populating Entity Testing Inc-996686... 07/01/2023 09:21:33 AM Logging out client... E07/01/2023 09:21:33 AM Logging in client... 07/01/2023 09:21:33 AM Internal Server Error: /purchase_order/a-cool-slug-85874/create/ Traceback (most recent call last): File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, *callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\views\generic\base.py", line 104, in view return self.dispatch(request, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\contrib\auth\mixins.py", line 109, in dispatch return super().dispatch(request, *args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\contrib\auth\mixins.py", line 73, in dispatch return super().dispatch(request, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\views\generic\base.py", line 143, in dispatch return handler(request, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\views\generic\edit.py", line 184, in post return super().post(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\views\generic\edit.py", line 153, in post return self.form_valid(form) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\views\purchase_order.py", line 135, in form_valid po_model = po_model.configure( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\models\purchase_order.py", line 320, in configure self.clean_fields() File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\db\models\base.py", line 1527, in clean_fields raise ValidationError(errors) django.core.exceptions.ValidationError: {'po_title': ['This field cannot be null.']} E07/01/2023 09:21:34 AM Logging in client... .07/01/2023 09:21:34 AM Logging in client... .

ERROR: test_protected_views (django_ledger.tests.test_purchase_order.PurchaseOrderModelTests.test_protected_views) All Purchase Model Views must have user authenticated.

Traceback (most recent call last): File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\tests\test_purchase_order.py", line 43, in test_protected_views po_model = self.create_purchase_order(entity_model) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\tests\test_purchase_order.py", line 27, in create_purchase_order po_model = po_model.configure(entity_slug=entity_model, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\models\purchase_order.py", line 320, in configure self.clean_fields() File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\db\models\base.py", line 1527, in clean_fields raise ValidationError(errors) django.core.exceptions.ValidationError: {'po_title': ['This field cannot be null.']}

====================================================================== ERROR: test_purchase_order_create (django_ledger.tests.test_purchase_order.PurchaseOrderModelTests.test_purchase_order_create) Check Purchase Order create-page.

Traceback (most recent call last): File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\tests\test_purchase_order.py", line 116, in test_purchase_order_create redirect_response = self.CLIENT.post(po_create_url, data={'po_title': po_title}, follow=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\test\client.py", line 948, in post response = super().post( ^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\test\client.py", line 482, in post return self.generic( ^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\test\client.py", line 609, in generic return self.request(r) ^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\test\client.py", line 891, in request self.check_exception(response) File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\test\client.py", line 738, in check_exception raise exc_value File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\core\handlers\exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\core\handlers\base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, *callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\views\generic\base.py", line 104, in view return self.dispatch(request, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\contrib\auth\mixins.py", line 109, in dispatch return super().dispatch(request, *args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\contrib\auth\mixins.py", line 73, in dispatch return super().dispatch(request, *args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\views\generic\base.py", line 143, in dispatch return handler(request, args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\views\generic\edit.py", line 184, in post return super().post(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\views\generic\edit.py", line 153, in post return self.form_valid(form) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\views\purchase_order.py", line 135, in form_valid po_model = po_model.configure( ^^^^^^^^^^^^^^^^^^^ File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\models\purchase_order.py", line 320, in configure self.clean_fields() File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\db\models\base.py", line 1527, in clean_fields raise ValidationError(errors) django.core.exceptions.ValidationError: {'po_title': ['This field cannot be null.']}

====================================================================== FAIL: test_bill_detail (django_ledger.tests.test_bill.BillModelTests.test_bill_detail)

Traceback (most recent call last): File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\tests\test_bill.py", line 315, in test_bill_detail with self.assertNumQueries(5): File "C:\Users\868jjm.virtualenvs\django-ledger-DBZC_vQ-\Lib\site-packages\django\test\testcases.py", line 99, in exit self.test_case.assertEqual( AssertionError: 16 != 5 : 16 queries executed, 5 expected Captured queries were:

  1. SELECT "django_session"."session_key", "django_session"."session_data", "django_session"."expire_date" FROM "django_session" WHERE ("django_session"."expire_date" > '2023-07-01 13:20:58.024847' AND "django_session"."session_key" = 'wqg7yn7rqldei6mz9ws2ua90amwr0ahx') LIMIT 21
  2. SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" WHERE "auth_user"."id" = 1 LIMIT 21
  3. SELECT "django_ledger_billmodel"."created", "django_ledger_billmodel"."updated", "django_ledger_billmodel"."amount_due", "django_ledger_billmodel"."amount_paid", "django_ledger_billmodel"."amount_receivable", "django_ledger_billmodel"."amount_unearned", "django_ledger_billmodel"."amount_earned", "django_ledger_billmodel"."accrue", "django_ledger_billmodel"."progress", "django_ledger_billmodel"."ledger_id", "django_ledger_billmodel"."cash_account_id", "django_ledger_billmodel"."prepaid_account_id", "django_ledger_billmodel"."unearned_account_id", "django_ledger_billmodel"."terms", "django_ledger_billmodel"."date_due", "django_ledger_billmodel"."markdown_notes", "django_ledger_billmodel"."uuid", "django_ledger_billmodel"."bill_number", "django_ledger_billmodel"."bill_status", "django_ledger_billmodel"."xref", "django_ledger_billmodel"."vendor_id", "django_ledger_billmodel"."additional_info", "django_ledger_billmodel"."ce_model_id", "django_ledger_billmodel"."date_draft", "django_ledger_billmodel"."date_in_review", "django_ledger_billmodel"."date_approved", "django_ledger_billmodel"."date_paid", "django_ledger_billmodel"."date_void", "django_ledger_billmodel"."date_canceled", "django_ledger_ledgermodel"."created", "django_ledger_ledgermodel"."updated", "django_ledger_ledgermodel"."uuid", "django_ledger_ledgermodel"."name", "django_ledger_ledgermodel"."entity_id", "django_ledger_ledgermodel"."posted", "django_ledger_ledgermodel"."locked", "django_ledger_ledgermodel"."hidden", "django_ledger_entitymodel"."slug", "django_ledger_entitymodel"."created", "django_ledger_entitymodel"."updated", "django_ledger_entitymodel"."address_1", "django_ledger_entitymodel"."address_2", "django_ledger_entitymodel"."city", "django_ledger_entitymodel"."state", "django_ledger_entitymodel"."zip_code", "django_ledger_entitymodel"."country", "django_ledger_entitymodel"."email", "django_ledger_entitymodel"."website", "django_ledger_entitymodel"."phone", "django_ledger_entitymodel"."path", "django_ledger_entitymodel"."depth", "django_ledger_entitymodel"."numchild", "django_ledger_entitymodel"."uuid", "django_ledger_entitymodel"."name", "django_ledger_entitymodel"."default_coa_id", "django_ledger_entitymodel"."admin_id", "django_ledger_entitymodel"."hidden", "django_ledger_entitymodel"."accrual_method", "django_ledger_entitymodel"."fy_start_month", "django_ledger_entitymodel"."picture", "django_ledger_accountmodel"."created", "django_ledger_accountmodel"."updated", "django_ledger_accountmodel"."path", "django_ledger_accountmodel"."depth", "django_ledger_accountmodel"."numchild", "django_ledger_accountmodel"."uuid", "django_ledger_accountmodel"."code", "django_ledger_accountmodel"."name", "django_ledger_accountmodel"."role", "django_ledger_accountmodel"."role_default", "django_ledger_accountmodel"."balance_type", "django_ledger_accountmodel"."locked", "django_ledger_accountmodel"."active", "django_ledger_accountmodel"."coa_model_id", T8."created", T8."updated", T8."path", T8."depth", T8."numchild", T8."uuid", T8."code", T8."name", T8."role", T8."role_default", T8."balance_type", T8."locked", T8."active", T8."coa_model_id", T9."created", T9."updated", T9."path", T9."depth", T9."numchild", T9."uuid", T9."code", T9."name", T9."role", T9."role_default", T9."balance_type", T9."locked", T9."active", T9."coa_model_id", "django_ledger_vendormodel"."created", "django_ledger_vendormodel"."updated", "django_ledger_vendormodel"."address_1", "django_ledger_vendormodel"."address_2", "django_ledger_vendormodel"."city", "django_ledger_vendormodel"."state", "django_ledger_vendormodel"."zip_code", "django_ledger_vendormodel"."country", "django_ledger_vendormodel"."email", "django_ledger_vendormodel"."website", "django_ledger_vendormodel"."phone", "django_ledger_vendormodel"."account_number", "django_ledger_vendormodel"."routing_number", "django_ledger_vendormodel"."aba_number", "django_ledger_vendormodel"."swift_number", "django_ledger_vendormodel"."account_type", "django_ledger_vendormodel"."tax_id_number", "django_ledger_vendormodel"."uuid", "django_ledger_vendormodel"."vendor_number", "django_ledger_vendormodel"."vendor_name", "django_ledger_vendormodel"."entity_model_id", "django_ledger_vendormodel"."description", "django_ledger_vendormodel"."active", "django_ledger_vendormodel"."hidden", "django_ledger_vendormodel"."additional_info" FROM "django_ledger_billmodel" INNER JOIN "django_ledger_ledgermodel" ON ("django_ledger_billmodel"."ledger_id" = "django_ledger_ledgermodel"."uuid") INNER JOIN "django_ledger_entitymodel" ON ("django_ledger_ledgermodel"."entity_id" = "django_ledger_entitymodel"."uuid") LEFT OUTER JOIN "django_ledger_entitymanagementmodel" ON ("django_ledger_entitymodel"."uuid" = "django_ledger_entitymanagementmodel"."entity_id") LEFT OUTER JOIN "django_ledger_accountmodel" ON ("django_ledger_billmodel"."cash_account_id" = "django_ledger_accountmodel"."uuid") LEFT OUTER JOIN "django_ledger_accountmodel" T8 ON ("django_ledger_billmodel"."prepaid_account_id" = T8."uuid") LEFT OUTER JOIN "django_ledger_accountmodel" T9 ON ("django_ledger_billmodel"."unearned_account_id" = T9."uuid") INNER JOIN "django_ledger_vendormodel" ON ("django_ledger_billmodel"."vendor_id" = "django_ledger_vendormodel"."uuid") WHERE ("django_ledger_entitymodel"."slug" = 'a-cool-slug-84895' AND ("django_ledger_entitymodel"."admin_id" = 1 OR "django_ledger_entitymanagementmodel"."user_id" IN (1)) AND "django_ledger_billmodel"."uuid" = 'ac9bdbbf8d8b4a1297c557ce86ab08bc') LIMIT 21
  4. SELECT "django_ledger_itemtransactionmodel"."created", "django_ledger_itemtransactionmodel"."updated", "django_ledger_itemtransactionmodel"."uuid", "django_ledger_itemtransactionmodel"."entity_unit_id", "django_ledger_itemtransactionmodel"."item_model_id", "django_ledger_itemtransactionmodel"."bill_model_id", "django_ledger_itemtransactionmodel"."invoice_model_id", "django_ledger_itemtransactionmodel"."quantity", "django_ledger_itemtransactionmodel"."unit_cost", "django_ledger_itemtransactionmodel"."total_amount", "django_ledger_itemtransactionmodel"."po_model_id", "django_ledger_itemtransactionmodel"."po_quantity", "django_ledger_itemtransactionmodel"."po_unit_cost", "django_ledger_itemtransactionmodel"."po_total_amount", "django_ledger_itemtransactionmodel"."po_item_status", "django_ledger_itemtransactionmodel"."ce_model_id", "django_ledger_itemtransactionmodel"."ce_quantity", "django_ledger_itemtransactionmodel"."ce_unit_cost_estimate", "django_ledger_itemtransactionmodel"."ce_cost_estimate", "django_ledger_itemtransactionmodel"."ce_unit_revenue_estimate", "django_ledger_itemtransactionmodel"."ce_revenue_estimate", "django_ledger_itemtransactionmodel"."item_notes", "django_ledger_entityunitmodel"."name", "django_ledger_entityunitmodel"."created", "django_ledger_entityunitmodel"."updated", "django_ledger_entityunitmodel"."path", "django_ledger_entityunitmodel"."depth", "django_ledger_entityunitmodel"."numchild", "django_ledger_entityunitmodel"."uuid", "django_ledger_entityunitmodel"."slug", "django_ledger_entityunitmodel"."entity_id", "django_ledger_entityunitmodel"."document_prefix", "django_ledger_entityunitmodel"."active", "django_ledger_entityunitmodel"."hidden", "django_ledger_itemmodel"."created", "django_ledger_itemmodel"."updated", "django_ledger_itemmodel"."uuid", "django_ledger_itemmodel"."name", "django_ledger_itemmodel"."item_id", "django_ledger_itemmodel"."item_number", "django_ledger_itemmodel"."item_role", "django_ledger_itemmodel"."item_type", "django_ledger_itemmodel"."uom_id", "django_ledger_itemmodel"."sku", "django_ledger_itemmodel"."upc", "django_ledger_itemmodel"."is_active", "django_ledger_itemmodel"."default_amount", "django_ledger_itemmodel"."for_inventory", "django_ledger_itemmodel"."is_product_or_service", "django_ledger_itemmodel"."sold_as_unit", "django_ledger_itemmodel"."inventory_account_id", "django_ledger_itemmodel"."inventory_received", "django_ledger_itemmodel"."inventory_received_value", "django_ledger_itemmodel"."cogs_account_id", "django_ledger_itemmodel"."earnings_account_id", "django_ledger_itemmodel"."expense_account_id", "django_ledger_itemmodel"."additional_info", "django_ledger_itemmodel"."entity_id", "django_ledger_billmodel"."created", "django_ledger_billmodel"."updated", "django_ledger_billmodel"."amount_due", "django_ledger_billmodel"."amount_paid", "django_ledger_billmodel"."amount_receivable", "django_ledger_billmodel"."amount_unearned", "django_ledger_billmodel"."amount_earned", "django_ledger_billmodel"."accrue", "django_ledger_billmodel"."progress", "django_ledger_billmodel"."ledger_id", "django_ledger_billmodel"."cash_account_id", "django_ledger_billmodel"."prepaid_account_id", "django_ledger_billmodel"."unearned_account_id", "django_ledger_billmodel"."terms", "django_ledger_billmodel"."date_due", "django_ledger_billmodel"."markdown_notes", "django_ledger_billmodel"."uuid", "django_ledger_billmodel"."bill_number", "django_ledger_billmodel"."bill_status", "django_ledger_billmodel"."xref", "django_ledger_billmodel"."vendor_id", "django_ledger_billmodel"."additional_info", "django_ledger_billmodel"."ce_model_id", "django_ledger_billmodel"."date_draft", "django_ledger_billmodel"."date_in_review", "django_ledger_billmodel"."date_approved", "django_ledger_billmodel"."date_paid", "django_ledger_billmodel"."date_void", "django_ledger_billmodel"."date_canceled", "django_ledger_purchaseordermodel"."created", "django_ledger_purchaseordermodel"."updated", "django_ledger_purchaseordermodel"."markdown_notes", "django_ledger_purchaseordermodel"."uuid", "django_ledger_purchaseordermodel"."po_number", "django_ledger_purchaseordermodel"."po_title", "django_ledger_purchaseordermodel"."po_status", "django_ledger_purchaseordermodel"."po_amount", "django_ledger_purchaseordermodel"."po_amount_received", "django_ledger_purchaseordermodel"."entity_id", "django_ledger_purchaseordermodel"."date_draft", "django_ledger_purchaseordermodel"."date_in_review", "django_ledger_purchaseordermodel"."date_approved", "django_ledger_purchaseordermodel"."date_void", "django_ledger_purchaseordermodel"."date_fulfilled", "django_ledger_purchaseordermodel"."date_canceled", "django_ledger_purchaseordermodel"."ce_model_id" FROM "django_ledger_itemtransactionmodel" INNER JOIN "django_ledger_billmodel" ON ("django_ledger_itemtransactionmodel"."bill_model_id" = "django_ledger_billmodel"."uuid") LEFT OUTER JOIN "django_ledger_entityunitmodel" ON ("django_ledger_itemtransactionmodel"."entity_unit_id" = "django_ledger_entityunitmodel"."uuid") INNER JOIN "django_ledger_itemmodel" ON ("django_ledger_itemtransactionmodel"."item_model_id" = "django_ledger_itemmodel"."uuid") LEFT OUTER JOIN "django_ledger_purchaseordermodel" ON ("django_ledger_itemtransactionmodel"."po_model_id" = "django_ledger_purchaseordermodel"."uuid") WHERE "django_ledger_itemtransactionmodel"."bill_model_id" = 'ac9bdbbf8d8b4a1297c557ce86ab08bc'
  5. SELECT "django_ledger_transactionmodel"."created", "django_ledger_transactionmodel"."updated", "django_ledger_transactionmodel"."uuid", "django_ledger_transactionmodel"."tx_type", "django_ledger_transactionmodel"."journal_entry_id", "django_ledger_transactionmodel"."account_id", "django_ledger_transactionmodel"."amount", "django_ledger_transactionmodel"."description", "django_ledger_journalentrymodel"."created", "django_ledger_journalentrymodel"."updated", "django_ledger_journalentrymodel"."uuid", "django_ledger_journalentrymodel"."je_number", "django_ledger_journalentrymodel"."timestamp", "django_ledger_journalentrymodel"."description", "django_ledger_journalentrymodel"."entity_unit_id", "django_ledger_journalentrymodel"."activity", "django_ledger_journalentrymodel"."origin", "django_ledger_journalentrymodel"."posted", "django_ledger_journalentrymodel"."locked", "django_ledger_journalentrymodel"."ledger_id" FROM "django_ledger_transactionmodel" INNER JOIN "django_ledger_journalentrymodel" ON ("django_ledger_transactionmodel"."journal_entry_id" = "django_ledger_journalentrymodel"."uuid") INNER JOIN "django_ledger_ledgermodel" ON ("django_ledger_journalentrymodel"."ledger_id" = "django_ledger_ledgermodel"."uuid") INNER JOIN "django_ledger_entitymodel" ON ("django_ledger_ledgermodel"."entity_id" = "django_ledger_entitymodel"."uuid") LEFT OUTER JOIN "django_ledger_entitymanagementmodel" ON ("django_ledger_entitymodel"."uuid" = "django_ledger_entitymanagementmodel"."entity_id") INNER JOIN "django_ledger_billmodel" ON ("django_ledger_ledgermodel"."uuid" = "django_ledger_billmodel"."ledger_id") WHERE (("django_ledger_entitymodel"."admin_id" = 1 OR "django_ledger_entitymanagementmodel"."user_id" IN (1)) AND "django_ledger_entitymodel"."slug" = 'a-cool-slug-84895' AND "django_ledger_billmodel"."uuid" = 'ac9bdbbf8d8b4a1297c557ce86ab08bc') ORDER BY "django_ledger_journalentrymodel"."timestamp" ASC
  6. SELECT "django_ledger_accountmodel"."created", "django_ledger_accountmodel"."updated", "django_ledger_accountmodel"."path", "django_ledger_accountmodel"."depth", "django_ledger_accountmodel"."numchild", "django_ledger_accountmodel"."uuid", "django_ledger_accountmodel"."code", "django_ledger_accountmodel"."name", "django_ledger_accountmodel"."role", "django_ledger_accountmodel"."role_default", "django_ledger_accountmodel"."balance_type", "django_ledger_accountmodel"."locked", "django_ledger_accountmodel"."active", "django_ledger_accountmodel"."coa_model_id" FROM "django_ledger_accountmodel" WHERE "django_ledger_accountmodel"."uuid" = 'e87f047765654f8f8e2eb25b9f897825' LIMIT 21
  7. SELECT "django_ledger_entityunitmodel"."name", "django_ledger_entityunitmodel"."created", "django_ledger_entityunitmodel"."updated", "django_ledger_entityunitmodel"."path", "django_ledger_entityunitmodel"."depth", "django_ledger_entityunitmodel"."numchild", "django_ledger_entityunitmodel"."uuid", "django_ledger_entityunitmodel"."slug", "django_ledger_entityunitmodel"."entity_id", "django_ledger_entityunitmodel"."document_prefix", "django_ledger_entityunitmodel"."active", "django_ledger_entityunitmodel"."hidden" FROM "django_ledger_entityunitmodel" WHERE "django_ledger_entityunitmodel"."uuid" = 'eff12ad39a2a48bfafcad0333435d277' LIMIT 21
  8. SELECT "django_ledger_accountmodel"."created", "django_ledger_accountmodel"."updated", "django_ledger_accountmodel"."path", "django_ledger_accountmodel"."depth", "django_ledger_accountmodel"."numchild", "django_ledger_accountmodel"."uuid", "django_ledger_accountmodel"."code", "django_ledger_accountmodel"."name", "django_ledger_accountmodel"."role", "django_ledger_accountmodel"."role_default", "django_ledger_accountmodel"."balance_type", "django_ledger_accountmodel"."locked", "django_ledger_accountmodel"."active", "django_ledger_accountmodel"."coa_model_id" FROM "django_ledger_accountmodel" WHERE "django_ledger_accountmodel"."uuid" = '3667d1fc144944e88df11e7543f59c60' LIMIT 21
  9. SELECT "django_ledger_entityunitmodel"."name", "django_ledger_entityunitmodel"."created", "django_ledger_entityunitmodel"."updated", "django_ledger_entityunitmodel"."path", "django_ledger_entityunitmodel"."depth", "django_ledger_entityunitmodel"."numchild", "django_ledger_entityunitmodel"."uuid", "django_ledger_entityunitmodel"."slug", "django_ledger_entityunitmodel"."entity_id", "django_ledger_entityunitmodel"."document_prefix", "django_ledger_entityunitmodel"."active", "django_ledger_entityunitmodel"."hidden" FROM "django_ledger_entityunitmodel" WHERE "django_ledger_entityunitmodel"."uuid" = 'eff12ad39a2a48bfafcad0333435d277' LIMIT 21
  10. SELECT "django_ledger_accountmodel"."created", "django_ledger_accountmodel"."updated", "django_ledger_accountmodel"."path", "django_ledger_accountmodel"."depth", "django_ledger_accountmodel"."numchild", "django_ledger_accountmodel"."uuid", "django_ledger_accountmodel"."code", "django_ledger_accountmodel"."name", "django_ledger_accountmodel"."role", "django_ledger_accountmodel"."role_default", "django_ledger_accountmodel"."balance_type", "django_ledger_accountmodel"."locked", "django_ledger_accountmodel"."active", "django_ledger_accountmodel"."coa_model_id" FROM "django_ledger_accountmodel" WHERE "django_ledger_accountmodel"."uuid" = '4fc2dc95fc9b42c79a4b5198ce6dfc46' LIMIT 21
  11. SELECT "django_ledger_accountmodel"."created", "django_ledger_accountmodel"."updated", "django_ledger_accountmodel"."path", "django_ledger_accountmodel"."depth", "django_ledger_accountmodel"."numchild", "django_ledger_accountmodel"."uuid", "django_ledger_accountmodel"."code", "django_ledger_accountmodel"."name", "django_ledger_accountmodel"."role", "django_ledger_accountmodel"."role_default", "django_ledger_accountmodel"."balance_type", "django_ledger_accountmodel"."locked", "django_ledger_accountmodel"."active", "django_ledger_accountmodel"."coa_model_id" FROM "django_ledger_accountmodel" WHERE "django_ledger_accountmodel"."uuid" = 'e87f047765654f8f8e2eb25b9f897825' LIMIT 21
  12. SELECT "django_ledger_accountmodel"."created", "django_ledger_accountmodel"."updated", "django_ledger_accountmodel"."path", "django_ledger_accountmodel"."depth", "django_ledger_accountmodel"."numchild", "django_ledger_accountmodel"."uuid", "django_ledger_accountmodel"."code", "django_ledger_accountmodel"."name", "django_ledger_accountmodel"."role", "django_ledger_accountmodel"."role_default", "django_ledger_accountmodel"."balance_type", "django_ledger_accountmodel"."locked", "django_ledger_accountmodel"."active", "django_ledger_accountmodel"."coa_model_id" FROM "django_ledger_accountmodel" WHERE "django_ledger_accountmodel"."uuid" = '3667d1fc144944e88df11e7543f59c60' LIMIT 21
  13. SELECT "django_ledger_accountmodel"."created", "django_ledger_accountmodel"."updated", "django_ledger_accountmodel"."path", "django_ledger_accountmodel"."depth", "django_ledger_accountmodel"."numchild", "django_ledger_accountmodel"."uuid", "django_ledger_accountmodel"."code", "django_ledger_accountmodel"."name", "django_ledger_accountmodel"."role", "django_ledger_accountmodel"."role_default", "django_ledger_accountmodel"."balance_type", "django_ledger_accountmodel"."locked", "django_ledger_accountmodel"."active", "django_ledger_accountmodel"."coa_model_id" FROM "django_ledger_accountmodel" WHERE "django_ledger_accountmodel"."uuid" = 'e87f047765654f8f8e2eb25b9f897825' LIMIT 21
  14. SELECT "django_ledger_entityunitmodel"."name", "django_ledger_entityunitmodel"."created", "django_ledger_entityunitmodel"."updated", "django_ledger_entityunitmodel"."path", "django_ledger_entityunitmodel"."depth", "django_ledger_entityunitmodel"."numchild", "django_ledger_entityunitmodel"."uuid", "django_ledger_entityunitmodel"."slug", "django_ledger_entityunitmodel"."entity_id", "django_ledger_entityunitmodel"."document_prefix", "django_ledger_entityunitmodel"."active", "django_ledger_entityunitmodel"."hidden" FROM "django_ledger_entityunitmodel" WHERE "django_ledger_entityunitmodel"."uuid" = '59fca5fb1bf64f76b95818304e399441' LIMIT 21
  15. SELECT "django_ledger_accountmodel"."created", "django_ledger_accountmodel"."updated", "django_ledger_accountmodel"."path", "django_ledger_accountmodel"."depth", "django_ledger_accountmodel"."numchild", "django_ledger_accountmodel"."uuid", "django_ledger_accountmodel"."code", "django_ledger_accountmodel"."name", "django_ledger_accountmodel"."role", "django_ledger_accountmodel"."role_default", "django_ledger_accountmodel"."balance_type", "django_ledger_accountmodel"."locked", "django_ledger_accountmodel"."active", "django_ledger_accountmodel"."coa_model_id" FROM "django_ledger_accountmodel" WHERE "django_ledger_accountmodel"."uuid" = '6f629fbbe63c4c5ca84a006eaa5365c0' LIMIT 21
  16. SELECT "django_ledger_entityunitmodel"."name", "django_ledger_entityunitmodel"."created", "django_ledger_entityunitmodel"."updated", "django_ledger_entityunitmodel"."path", "django_ledger_entityunitmodel"."depth", "django_ledger_entityunitmodel"."numchild", "django_ledger_entityunitmodel"."uuid", "django_ledger_entityunitmodel"."slug", "django_ledger_entityunitmodel"."entity_id", "django_ledger_entityunitmodel"."document_prefix", "django_ledger_entityunitmodel"."active", "django_ledger_entityunitmodel"."hidden" FROM "django_ledger_entityunitmodel" WHERE "django_ledger_entityunitmodel"."uuid" = '59fca5fb1bf64f76b95818304e399441' LIMIT 21

====================================================================== FAIL: test_protected_views (django_ledger.tests.test_entity.EntityModelTests.test_protected_views) All Entity Model views must have user authenticated.

Traceback (most recent call last): File "C:\Users\868jjm\Documents\django-ledger3\django-ledger\django_ledger\tests\test_entity.py", line 58, in test_protected_views self.assertEqual(redirect_path, login_path, AssertionError: '/auth/login/' != '/accounts/login/'


Ran 19 tests in 72.275s

FAILED (failures=2, errors=2) Destroying test database for alias 'default'...

elarroba commented 1 year ago

The PurchaseOrderModel tests need to be updated to accommodate some API changes. PR #149 fixes this bug and will be merged shortly. You may check out Branch v0.5.4.2 or wait until the development branch is updated.