mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-08 07:38:26 -05:00
added version number to system screen
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<h1>{% trans 'System' %}</h1>
|
<h1>{% trans 'System' %}</h1>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
@@ -91,7 +91,12 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
<br/>
|
<br/>
|
||||||
<br/>
|
<br/>
|
||||||
<h4>Debug</h4>
|
<h4>Plugins</h4>
|
||||||
|
{% for p in plugins %}
|
||||||
|
{{ p.name }} - {{ p.version }} <br/>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<h4 class="mt-3">Debug</h4>
|
||||||
<textarea class="form-control" rows="20">
|
<textarea class="form-control" rows="20">
|
||||||
Gunicorn Media: {{ gunicorn_media }}
|
Gunicorn Media: {{ gunicorn_media }}
|
||||||
Sqlite: {{ postgres }}
|
Sqlite: {{ postgres }}
|
||||||
@@ -99,9 +104,9 @@ Debug: {{ debug }}
|
|||||||
|
|
||||||
{% for key,value in request.META.items %}{% if key in 'SERVER_PORT,REMOTE_HOST,REMOTE_ADDR,SERVER_PROTOCOL' %}{{ key }}:{{ value }}
|
{% for key,value in request.META.items %}{% if key in 'SERVER_PORT,REMOTE_HOST,REMOTE_ADDR,SERVER_PROTOCOL' %}{{ key }}:{{ value }}
|
||||||
{% endif %}{% endfor %}
|
{% endif %}{% endfor %}
|
||||||
{% for key,value in request.META.items %}{% if 'HTTP_' in key %}{{ key }}:{{ value }}
|
{% for key,value in request.META.items %}{% if 'HTTP_' in key %}{{ key }}:{{ value }}
|
||||||
{% endif %}{% endfor %}
|
{% endif %}{% endfor %}
|
||||||
{% for key,value in request.META.items %}{% if 'wsgi.' in key %}{{ key }}:{{ value }}
|
{% for key,value in request.META.items %}{% if 'wsgi.' in key %}{{ key }}:{{ value }}
|
||||||
{% endif %}{% endfor %}
|
{% endif %}{% endfor %}
|
||||||
</textarea>
|
</textarea>
|
||||||
<br/>
|
<br/>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ from cookbook.helper.permission_helper import group_required, has_group_permissi
|
|||||||
from cookbook.models import (Comment, CookLog, InviteLink, SearchFields, SearchPreference, ShareLink,
|
from cookbook.models import (Comment, CookLog, InviteLink, SearchFields, SearchPreference, ShareLink,
|
||||||
Space, ViewLog, UserSpace)
|
Space, ViewLog, UserSpace)
|
||||||
from cookbook.tables import (CookLogTable, ViewLogTable)
|
from cookbook.tables import (CookLogTable, ViewLogTable)
|
||||||
|
from recipes.settings import PLUGINS
|
||||||
from recipes.version import BUILD_REF, VERSION_NUMBER
|
from recipes.version import BUILD_REF, VERSION_NUMBER
|
||||||
|
|
||||||
|
|
||||||
@@ -322,6 +323,7 @@ def system(request):
|
|||||||
'postgres': postgres,
|
'postgres': postgres,
|
||||||
'version': VERSION_NUMBER,
|
'version': VERSION_NUMBER,
|
||||||
'ref': BUILD_REF,
|
'ref': BUILD_REF,
|
||||||
|
'plugins': PLUGINS,
|
||||||
'secret_key': secret_key
|
'secret_key': secret_key
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ try:
|
|||||||
|
|
||||||
plugin_config = {
|
plugin_config = {
|
||||||
'name': plugin_class.verbose_name if hasattr(plugin_class, 'verbose_name') else plugin_class.name,
|
'name': plugin_class.verbose_name if hasattr(plugin_class, 'verbose_name') else plugin_class.name,
|
||||||
|
'version': plugin_class.VERSION if hasattr(plugin_class, 'VERSION') else 'unknown',
|
||||||
'module': f'recipes.plugins.{d}',
|
'module': f'recipes.plugins.{d}',
|
||||||
'base_path': os.path.join(BASE_DIR, 'recipes', 'plugins', d),
|
'base_path': os.path.join(BASE_DIR, 'recipes', 'plugins', d),
|
||||||
'base_url': plugin_class.base_url,
|
'base_url': plugin_class.base_url,
|
||||||
|
|||||||
Reference in New Issue
Block a user