Removed public disclosures of the lib's version. #154
This commit is contained in:
@@ -8,13 +8,9 @@
|
||||
|
||||
{% block extrastyle %}
|
||||
{% get_admin_interface_theme as theme %}
|
||||
{% get_admin_interface_version as version %}
|
||||
{% get_admin_interface_nocache as version_md5_cache %}
|
||||
{% get_current_language as current_lang %}
|
||||
<style type="text/css">
|
||||
/*
|
||||
django-admin-interface {{ version }}
|
||||
https://github.com/fabiocaccamo/django-admin-interface
|
||||
*/
|
||||
{% include "admin_interface/css/admin-interface.css" %}
|
||||
{% include "admin_interface/css/admin-interface-fix.css" %}
|
||||
{% include "admin_interface/css/form-controls.css" %}
|
||||
@@ -40,11 +36,11 @@ https://github.com/fabiocaccamo/django-admin-interface
|
||||
{% block blockbots %}
|
||||
{{ block.super }}
|
||||
{% get_admin_interface_theme as theme %}
|
||||
{% get_admin_interface_version as version %}
|
||||
{% get_admin_interface_nocache as version_md5_cache %}
|
||||
{# https://github.com/elky/django-flat-responsive#important-note #}
|
||||
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive.css' %}?v={{ version }}">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive_rtl.css' %}?v={{ version }}" />
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive.css' %}?nocache={{ version_md5_cache }}">
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'admin/css/responsive_rtl.css' %}?nocache={{ version_md5_cache }}">
|
||||
{% include "admin_interface/favicon.html" %}
|
||||
{% include "admin_interface/foldable-apps.html" %}
|
||||
{% include "admin_interface/related-modal.html" %}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{% if theme.favicon %}
|
||||
<link rel="icon" href="{{ theme.favicon.url }}">
|
||||
{% if theme.env_visible_in_favicon %}
|
||||
<script type="text/javascript" src="{% static 'admin_interface/favico/favico-0.3.10-patched.min.js' %}?v={{ version }}"></script>
|
||||
<script type="text/javascript" src="{% static 'admin_interface/favico/favico-0.3.10-patched.min.js' %}?nocache={{ version_md5_cache }}"></script>
|
||||
<script type="text/javascript">
|
||||
var favicon = new Favico({
|
||||
type: 'circle',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% load static %}
|
||||
|
||||
{% if theme.foldable_apps %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/foldable-apps/foldable-apps.css' %}?v={{ version }}">
|
||||
<script type="text/javascript" src="{% static 'admin_interface/foldable-apps/foldable-apps.js' %}?v={{ version }}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/foldable-apps/foldable-apps.css' %}?nocache={{ version_md5_cache }}">
|
||||
<script type="text/javascript" src="{% static 'admin_interface/foldable-apps/foldable-apps.js' %}?nocache={{ version_md5_cache }}"></script>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% load static %}
|
||||
|
||||
{% if theme.related_modal_active %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/magnific-popup/magnific-popup.css' %}?v={{ version }}">
|
||||
<script type="text/javascript" src="{% static 'admin_interface/magnific-popup/jquery.magnific-popup.js' %}?v={{ version }}"></script>
|
||||
<script type="text/javascript" src="{% static 'admin_interface/related-modal/related-modal.js' %}?v={{ version }}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{% static 'admin_interface/magnific-popup/magnific-popup.css' %}?nocache={{ version_md5_cache }}">
|
||||
<script type="text/javascript" src="{% static 'admin_interface/magnific-popup/jquery.magnific-popup.js' %}?nocache={{ version_md5_cache }}"></script>
|
||||
<script type="text/javascript" src="{% static 'admin_interface/related-modal/related-modal.js' %}?nocache={{ version_md5_cache }}"></script>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import re
|
||||
import hashlib
|
||||
import django
|
||||
|
||||
from django import template
|
||||
@@ -11,7 +12,6 @@ from admin_interface.compat import NoReverseMatch, reverse
|
||||
from admin_interface.models import Theme
|
||||
from admin_interface.version import __version__
|
||||
|
||||
import re
|
||||
|
||||
|
||||
register = template.Library()
|
||||
@@ -77,3 +77,14 @@ def get_admin_interface_theme(context):
|
||||
@simple_tag(takes_context=False)
|
||||
def get_admin_interface_version():
|
||||
return __version__
|
||||
|
||||
|
||||
def hash_string(text):
|
||||
hash_object = hashlib.md5(text.encode())
|
||||
md5_hash = hash_object.hexdigest()
|
||||
return md5_hash
|
||||
|
||||
|
||||
@simple_tag(takes_context=False)
|
||||
def get_admin_interface_nocache():
|
||||
return hash_string(__version__)
|
||||
|
||||
Reference in New Issue
Block a user