This commit is contained in:
Logan V 2018-03-15 19:34:08 +00:00 committed by GitHub
commit bec2122b24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -195,13 +195,13 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
STATIC_ROOT = BASE_DIR + '/static/' STATIC_ROOT = BASE_DIR + '/static/'
STATIC_URL = '/{}static/'.format(BASE_PATH) STATIC_URL = '{}static/'.format(BASE_PATH)
STATICFILES_DIRS = ( STATICFILES_DIRS = (
os.path.join(BASE_DIR, "project-static"), os.path.join(BASE_DIR, "project-static"),
) )
# Media # Media
MEDIA_URL = '/{}media/'.format(BASE_PATH) MEDIA_URL = '{}media/'.format(BASE_PATH)
# Disable default limit of 1000 fields per request. Needed for bulk deletion of objects. (Added in Django 1.10.) # Disable default limit of 1000 fields per request. Needed for bulk deletion of objects. (Added in Django 1.10.)
DATA_UPLOAD_MAX_NUMBER_FIELDS = None DATA_UPLOAD_MAX_NUMBER_FIELDS = None
@ -212,7 +212,7 @@ MESSAGE_TAGS = {
} }
# Authentication URLs # Authentication URLs
LOGIN_URL = '/{}login/'.format(BASE_PATH) LOGIN_URL = '{}login/'.format(BASE_PATH)
# Secrets # Secrets
SECRETS_MIN_PUBKEY_SIZE = 2048 SECRETS_MIN_PUBKEY_SIZE = 2048

View File

@ -67,7 +67,7 @@
<script src="{% static 'bootstrap-3.3.7-dist/js/bootstrap.min.js' %}"></script> <script src="{% static 'bootstrap-3.3.7-dist/js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/forms.js' %}?v{{ settings.VERSION }}"></script> <script src="{% static 'js/forms.js' %}?v{{ settings.VERSION }}"></script>
<script type="text/javascript"> <script type="text/javascript">
var netbox_api_path = "/{{ settings.BASE_PATH }}api/"; var netbox_api_path = "{{ settings.BASE_PATH }}api/";
var loading = $(".loading"); var loading = $(".loading");
$(document).ajaxStart(function() { $(document).ajaxStart(function() {
loading.show(); loading.show();

View File

@ -1,5 +1,5 @@
{% extends 'rest_framework/base.html' %} {% extends 'rest_framework/base.html' %}
{% block branding %} {% block branding %}
<a class="navbar-brand" href="/{{ settings.BASE_PATH }}">NetBox</a> <a class="navbar-brand" href="{{ settings.BASE_PATH }}">NetBox</a>
{% endblock %} {% endblock %}

View File

@ -188,7 +188,7 @@ class APISelect(SelectWithDisabled):
super(APISelect, self).__init__(*args, **kwargs) super(APISelect, self).__init__(*args, **kwargs)
self.attrs['class'] = 'api-select' self.attrs['class'] = 'api-select'
self.attrs['api-url'] = '/{}{}'.format(settings.BASE_PATH, api_url.lstrip('/')) # Inject BASE_PATH self.attrs['api-url'] = '{}{}'.format(settings.BASE_PATH, api_url.lstrip('/')) # Inject BASE_PATH
if display_field: if display_field:
self.attrs['display-field'] = display_field self.attrs['display-field'] = display_field
if disabled_indicator: if disabled_indicator: