Commit Graph

703 Commits

Author SHA1 Message Date
Andreas Zweili 87613c5a9c ignore the admin views in te coverage report 2020-03-01 12:42:59 +01:00
Andreas Zweili 0f539d4b5f reformat the flake8 config 2020-03-01 12:42:43 +01:00
Andreas Zweili c6803933fc remove unused file 2020-03-01 11:49:59 +01:00
Andreas Zweili 8f69665a95 add tests for the warranties table 2020-03-01 11:48:09 +01:00
Andreas Zweili b2bc1f5d88 change the customer property to a ForeignKey
Everytime the warranty gets saved the customer gets
set to the one from the corresponding device
2020-03-01 11:16:36 +01:00
Andreas Zweili c159692445 use reverse_lazy for URLs 2020-03-01 11:15:41 +01:00
Andreas Zweili db97a141d9 limit the warranties view to only the allowed objects 2020-03-01 11:15:12 +01:00
Andreas Zweili df31124143 allow non admins to see the warranties table
I reckon the customer would be interested in the warranties of his
devices as well.
2020-03-01 11:14:38 +01:00
Andreas Zweili 9f30375f6b change the superuser_required decorator to return 404 2020-03-01 11:12:29 +01:00
Andreas Zweili 70d4d5176f Revert "run up to 4 tests in parallel when testing with vscode"
This reverts commit 7114d1e61f.
2020-02-29 23:16:57 +01:00
Andreas Zweili 524f83cea6 test the ComputerForms with a normal user as well 2020-02-29 22:36:46 +01:00
Andreas Zweili 7114d1e61f run up to 4 tests in parallel when testing with vscode 2020-02-29 22:35:32 +01:00
Andreas Zweili 35f723a7c4 add test for ComputerUpdateForm 2020-02-29 21:28:39 +01:00
Andreas Zweili 8eb77ba0c5 add test for ComputerCreateForm 2020-02-29 21:11:23 +01:00
Andreas Zweili 9311090132 split parameters over multiple lines 2020-02-29 21:11:06 +01:00
Andreas Zweili 8dec65c034 correct line length 2020-02-29 21:10:03 +01:00
Andreas Zweili cf2feba185 split parameters over multiple lines 2020-02-29 21:09:13 +01:00
Andreas Zweili a16f14d9e3 adjust line length 2020-02-29 21:08:56 +01:00
Andreas Zweili 23734f49d2 remove unused import 2020-02-29 21:08:36 +01:00
Andreas Zweili e188b3e4f7 remove emtpy line 2020-02-29 21:08:18 +01:00
Andreas Zweili 0b17943e2a split parameters over multiple lines 2020-02-29 21:07:52 +01:00
Andreas Zweili 0cb8023204 split paremeters over multiple lines 2020-02-29 21:07:22 +01:00
Andreas Zweili 7e2cda3bfc remove empty line 2020-02-29 21:07:04 +01:00
Andreas Zweili 49c0f89f11 remove unused file 2020-02-29 21:06:52 +01:00
Andreas Zweili c02e9ec4e0 add new line to file 2020-02-29 21:06:04 +01:00
Andreas Zweili 1b779482be split parameters over multiple lines 2020-02-29 21:05:37 +01:00
Andreas Zweili d7374ccc7c seperate imports with lines from code 2020-02-29 21:05:18 +01:00
Andreas Zweili 26631d1928 remove unused imports 2020-02-29 21:03:59 +01:00
Andreas Zweili 425c9291b3 split parameters over multiple lines 2020-02-29 21:03:47 +01:00
Andreas Zweili 2833b2b679 remove empty line 2020-02-29 21:01:46 +01:00
Andreas Zweili 94bbfd249c split parameters over multiple lines 2020-02-29 21:01:26 +01:00
Andreas Zweili 762254d747 remove empty line 2020-02-29 21:00:19 +01:00
Andreas Zweili 89d75cbe60 surpress the gis warnings from floppyforms 2020-02-29 20:59:12 +01:00
Andreas Zweili 6395f33158 add config for flake8 2020-02-29 20:58:42 +01:00
Andreas Zweili 2646b964ca fix the get_objects function 2020-02-29 19:26:17 +01:00
Andreas Zweili 25b2c3c02d Use a better string for the wrong model name 2020-02-29 19:25:00 +01:00
Andreas Zweili 19ff961cfa correct get_objects to return 404 with wrong value 2020-02-29 19:01:16 +01:00
Andreas Zweili 1123aeb259 PEP8 add new line at the end of file 2020-02-29 19:00:47 +01:00
Andreas Zweili e56c90d4d3 remove trailing comma 2020-02-29 19:00:23 +01:00
Andreas Zweili ceb1aa59cc add test_get_objects_raises_404 2020-02-29 18:54:04 +01:00
Andreas Zweili 91d2cdb0b3 add pytest args to vscode project config 2020-02-29 18:53:24 +01:00
Andreas Zweili ec931bc0ca add vscode project files 2020-02-29 17:07:46 +01:00
Andreas Zweili 7293d2b8b2 implement the utils.get_objects function 2020-02-29 15:49:00 +01:00
Andreas Zweili 09d3e522ac implemente the utils.get_customers function 2020-02-29 15:48:29 +01:00
Andreas Zweili 7b511ccda2 add various comments 2020-02-29 15:35:46 +01:00
Andreas Zweili 039fe5f54c remove the kwargs from the form 2020-02-29 15:18:58 +01:00
Andreas Zweili d4b48728c2 update the forms to use the new utils 2020-02-29 15:18:29 +01:00
Andreas Zweili 26dcbf4cb5 add a function to get objects limited to customer
this function will return a queryset containing only items which are
related to customers the user is allowed to view.
2020-02-29 15:16:26 +01:00
Andreas Zweili e882e062e8 add function to get customer objects for user
With this function we get a list of customers the user is allowed to view.
2020-02-29 15:00:22 +01:00
Andreas Zweili afff82b423 Limit the dropdowns to only allowed items 2020-02-29 12:25:14 +01:00