@@ -11,43 +11,7 @@ categories: [python, django]
11
11
12
12
** 1. Add the base_site file inside ` templates/admin/base_site.html ` .**
13
13
14
- ``` html
15
- [[ extends "admin/base.html" ]] ==> please change [[ ]] to django templatetag, because gh-pages doesn't support it.
16
- {% load static i18n %}
17
-
18
- {% block title %}{{ title }} | {{ site_title|default:_('Situs django admin') }}{% endblock %}
19
-
20
- {% block branding %}
21
- <h1 id =" site-name" ><a href =" {% url 'admin:index' %}" >{{ site_header|default:_('Administrasi django') }}</a ></h1 >
22
- {% endblock %}
23
-
24
- {% block nav-global %}{% endblock %}
25
-
26
- {% block welcome-msg %}
27
-
28
- {# CUSTOM LANGUAGE ICONS #}
29
- {% get_current_language as LANGUAGE_CODE %}
30
- {% get_available_languages as LANGUAGES %}
31
- {% get_language_info_list for LANGUAGES as languages %}
32
- <span id =" language-icons" style =" margin : -1px 0 0 -65px ; position : absolute ;" >
33
- {% for language in languages %}
34
- {% if language.code == 'id' %}
35
- <a href =" ?lang=id" style =" margin-right : 3px ;border-bottom :none " title =" Indonesia" >
36
- <img height =" 15px" src =" {% static 'icons/flags/id.svg' %}" >
37
- </a >
38
- {% elif language.code == 'en' %}
39
- <a href =" ?lang=en" style =" margin-right : 3px ;border-bottom :none " title =" English" >
40
- <img height =" 15px" src =" {% static 'icons/flags/us.svg' %}" >
41
- </a >
42
- {% endif %}
43
- {% endfor %}
44
- </span >
45
-
46
- {# DFEAULT WELCOME MESSAGE GOES HERE #}
47
- {{ block.super }}
48
-
49
- {% endblock %}
50
- ```
14
+ <iframe width =" 100% " height =" 350 " src =" //jsfiddle.net/agaust/s6pqknL4/embedded/html/dark/ " allowfullscreen =" allowfullscreen " allowpaymentrequest frameborder =" 0 " ></iframe >
51
15
52
16
53
17
** 2. Custom language middleware, in your file ` middleware.py ` **
0 commit comments