mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-22 15:56:14 +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:
1 parent
10c3d101e8
commit
61d613ff34
9 files changed
+75
-33
No files matched your search
@@ -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