mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Setting caching (#3178)
* Revert "Remove stat context variables" This reverts commit0989c308d0. * Add a caching framework for inventree settings - Actions that use "settings" require a DB hit every time - For example the part.full_name() method looks at the PART_NAME_FORMAT setting - This means 1 DB hit for every part which is serialized!! * Fixes for DebugToolbar integration - Requires different INTERNAL_IPS when running behind docker - Some issues with TEMPLATES framework * Revert "Revert "Remove stat context variables"" This reverts commit52e6359265. * Add unit tests for settings caching * Update existing unit tests to handle cache framework * Fix for unit test * Re-enable cache for default part values * Clear cache for further unit tests
This commit is contained in:
		| @@ -204,7 +204,7 @@ class BuildReportTest(ReportTest): | ||||
|         self.assertEqual(headers['Content-Disposition'], 'attachment; filename="report.pdf"') | ||||
|  | ||||
|         # Now, set the download type to be "inline" | ||||
|         inline = InvenTreeUserSetting.get_setting_object('REPORT_INLINE', self.user) | ||||
|         inline = InvenTreeUserSetting.get_setting_object('REPORT_INLINE', user=self.user) | ||||
|         inline.value = True | ||||
|         inline.save() | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user