mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +00:00 
			
		
		
		
	Base URL configuration options (#4749)
* Improve construct_absolute_url method - Look for hard-coded site URL if provided - Otherwise look for specified site URL - Otherwise look at the provided request object * Refactor existing code which used base URL setting * Update docs * Validate that a provided base URL is valid
This commit is contained in:
		@@ -222,8 +222,8 @@ def inventree_splash(**kwargs):
 | 
			
		||||
 | 
			
		||||
@register.simple_tag()
 | 
			
		||||
def inventree_base_url(*args, **kwargs):
 | 
			
		||||
    """Return the INVENTREE_BASE_URL setting."""
 | 
			
		||||
    return InvenTreeSetting.get_setting('INVENTREE_BASE_URL')
 | 
			
		||||
    """Return the base URL of the InvenTree server"""
 | 
			
		||||
    return InvenTree.helpers.get_base_url()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@register.simple_tag()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user