2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 20:16:44 +00:00

Remove other demo references

This commit is contained in:
Oliver Walters 2022-04-27 22:00:58 +10:00
parent 4a843908ec
commit fc4de6c7b8
5 changed files with 4 additions and 22 deletions

View File

@ -62,12 +62,6 @@ DEBUG = _is_true(get_setting(
CONFIG.get('debug', True) CONFIG.get('debug', True)
)) ))
# Determine if we are running in "demo mode"
DEMO_MODE = _is_true(get_setting(
'INVENTREE_DEMO',
CONFIG.get('demo', False)
))
DOCKER = _is_true(get_setting( DOCKER = _is_true(get_setting(
'INVENTREE_DOCKER', 'INVENTREE_DOCKER',
False False
@ -217,9 +211,6 @@ MEDIA_URL = '/media/'
if DEBUG: if DEBUG:
logger.info("InvenTree running with DEBUG enabled") logger.info("InvenTree running with DEBUG enabled")
if DEMO_MODE:
logger.warning("InvenTree running in DEMO mode") # pragma: no cover
logger.debug(f"MEDIA_ROOT: '{MEDIA_ROOT}'") logger.debug(f"MEDIA_ROOT: '{MEDIA_ROOT}'")
logger.debug(f"STATIC_ROOT: '{STATIC_ROOT}'") logger.debug(f"STATIC_ROOT: '{STATIC_ROOT}'")

View File

@ -160,13 +160,6 @@ def inventree_in_debug_mode(*args, **kwargs):
return djangosettings.DEBUG return djangosettings.DEBUG
@register.simple_tag()
def inventree_demo_mode(*args, **kwargs):
""" Return True if the server is running in DEMO mode """
return djangosettings.DEMO_MODE
@register.simple_tag() @register.simple_tag()
def inventree_show_about(user, *args, **kwargs): def inventree_show_about(user, *args, **kwargs):
""" Return True if the about modal should be shown """ """ Return True if the about modal should be shown """

View File

@ -13,8 +13,8 @@
{% endblock %} {% endblock %}
{% block actions %} {% block actions %}
{% inventree_demo_mode as demo %} {% inventree_customize 'hide_password_reset' as hide_password_reset %}
{% if not demo %} {% if hide_password_reset %}
<div class='btn btn-outline-primary' type='button' id='edit-password' title='{% trans "Change Password" %}'> <div class='btn btn-outline-primary' type='button' id='edit-password' title='{% trans "Change Password" %}'>
<span class='fas fa-key'></span> {% trans "Set Password" %} <span class='fas fa-key'></span> {% trans "Set Password" %}
</div> </div>

View File

@ -12,7 +12,6 @@
{% settings_value 'LOGIN_ENABLE_SSO' as enable_sso %} {% settings_value 'LOGIN_ENABLE_SSO' as enable_sso %}
{% inventree_customize 'login_message' as login_message %} {% inventree_customize 'login_message' as login_message %}
{% mail_configured as mail_conf %} {% mail_configured as mail_conf %}
{% inventree_demo_mode as demo %}
<h1>{% trans "Sign In" %}</h1> <h1>{% trans "Sign In" %}</h1>
@ -42,7 +41,7 @@ for a account and sign in below:{% endblocktrans %}</p>
<div class="btn-group float-right" role="group"> <div class="btn-group float-right" role="group">
<button class="btn btn-success" type="submit">{% trans "Sign In" %}</button> <button class="btn btn-success" type="submit">{% trans "Sign In" %}</button>
</div> </div>
{% if mail_conf and enable_pwd_forgot and not demo %} {% if mail_conf and enable_pwd_forgot %}
<a class="" href="{% url 'account_reset_password' %}"><small>{% trans "Forgot Password?" %}</small></a> <a class="" href="{% url 'account_reset_password' %}"><small>{% trans "Forgot Password?" %}</small></a>
{% endif %} {% endif %}
</form> </form>

View File

@ -8,7 +8,6 @@
{% settings_value "SERVER_RESTART_REQUIRED" as server_restart_required %} {% settings_value "SERVER_RESTART_REQUIRED" as server_restart_required %}
{% settings_value "LABEL_ENABLE" with user=user as labels_enabled %} {% settings_value "LABEL_ENABLE" with user=user as labels_enabled %}
{% inventree_show_about user as show_about %} {% inventree_show_about user as show_about %}
{% inventree_demo_mode as demo_mode %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
@ -94,7 +93,7 @@
{% block alerts %} {% block alerts %}
<div class='notification-area' id='alerts'> <div class='notification-area' id='alerts'>
<!-- Div for displayed alerts --> <!-- Div for displayed alerts -->
{% if server_restart_required and not demo_mode %} {% if server_restart_required %}
<div id='alert-restart-server' class='alert alert-danger' role='alert'> <div id='alert-restart-server' class='alert alert-danger' role='alert'>
<span class='fas fa-server'></span> <span class='fas fa-server'></span>
<strong>{% trans "Server Restart Required" %}</strong> <strong>{% trans "Server Restart Required" %}</strong>