Skip to content

Commit

Permalink
Support BASE_PATH setting in netbox (#24)
Browse files Browse the repository at this point in the history
Merge branch 'Logan2211:base-path' into master
  • Loading branch information
lae committed Mar 17, 2018
2 parents 4979c55 + 7ced80a commit 717eef6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion templates/uwsgi.ini.j2
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ processes={{ netbox_processes }}
module=netbox.wsgi
virtualenv={{ netbox_virtualenv_path }}
chdir={{ netbox_current_path }}/netbox
static-map=/static={{ netbox_current_path }}/netbox/static
{% if netbox_config.BASE_PATH is defined %}
{% set _base_path = netbox_config.BASE_PATH.strip('/') ~ '/' %}
{% else %}
{% set _base_path = '' %}
{% endif %}
static-map=/{{ _base_path }}static={{ netbox_current_path }}/netbox/static
logger={{ netbox_application_log }}
req-logger={{ netbox_requests_log }}

Expand Down

0 comments on commit 717eef6

Please sign in to comment.