Method of calling object attribute or object in html template of django template

Environment: relying on the original test2 database python3 version Multi python environment Enter, python 3 virtual environment, new project test4: ]# cd py3/django-test1/ ]# django-admin startproject test4 To create an app bookshop: ]# cd test4 ]# python manage.py startapp bookshop Modify the settings.py main configuration file: ]# vim test ...

Posted by bloodgoat on Sat, 07 Dec 2019 03:25:16 -0800

html template escape of django

The environment is the same as the django article. Start django's web Service: ]# cd py3/django-test1/test4 ]# python manage.py runserver 192.168.255.70:8000 In an html template, if the content you want to display contains html Tags: Edit view: ]# vim bookshop/views.py from django.shortcuts import render from .models import * ... def htmlTes ...

Posted by katarra on Mon, 02 Dec 2019 19:20:52 -0800

Direction resolution of django template: generate link address based on url

Environment the same django article. web services running django:  cd py3/django-test1/test4  python manage.py runserver 192.168.255.70:8000 First, use a tag hyperlink in html to automatically match the url route of the application, and then display the specified html page: Edit view function: vim bookshop/views.py from django.shortcuts imp ...

Posted by Hoppus on Mon, 02 Dec 2019 08:15:47 -0800

Detailed explanation of the principle of Google Authenticator TOTP (take Python as an example)

Xiaosheng blog: http://xsboke.blog.51cto.com If in doubt, please Click here The author will reply in time (or comment directly in the current article). -------Thank you for your reference. If you have any questions, welcome to exchange I. detailed explanation of the principle (click and zoom in the picture) II. Verific ...

Posted by aurigus on Sat, 30 Nov 2019 10:23:35 -0800

Traifik configuration automatically applies for ssl free certificate

What is an SSL certificate? Secure sockets layer (SSL) certificates (sometimes referred to as digital certificates) are used to establish an encrypted connection between a browser or user computer and a server or web site. SSL connections protect sensitive data (such as credit card information) exchanged during each access (called a session) f ...

Posted by 4rxsid on Thu, 28 Nov 2019 13:21:32 -0800

Old GC problems caused by Groovy scripts

Recently, a system was launched, and Groovy script was used for authentication. The example code is as follows ScriptEngineManager factory = new ScriptEngineManager(); ScriptEngine engine = factory.getEngineByName("groovy"); String function = String.format("def getTargetParamValue(%s) {return \"%s\"}", "o", "$o"); engine.eval(function); Invoc ...

Posted by joe2 on Mon, 25 Nov 2019 12:20:48 -0800

The method of modifying the length of article title by Zhimeng dedecms

The length of the default dedecms article title is 60 characters, but now the 20 Chinese characters of the article title are far from enough to meet the needs, so what we have to do is to modify the default word limit of the system. The method is as follows:1. Modify the "system - > basic system parameters - > other options - > A ...

Posted by sambo80 on Thu, 14 Nov 2019 06:22:02 -0800

Getting Started with the web Front End to Practice: Summarize how to modify the default style of beautifying radio, checkbox

Now that front-end pages are becoming more and more effective, the default input component style obviously does not meet the design requirements.In the past few years, development projects happened to meet the related requirements, and this is a special way to modify the radio, CheckBox style. Principle: The general principle is to use a nat ...

Posted by treybraid on Thu, 07 Nov 2019 14:12:55 -0800

Pure css3 beautiful checkbox and radio beautification plug-in Pretty.css plug-in

Introduction of plug-ins pretty.css is a beautiful checkbox and radio beautification effect of pure css3. pretty.css can be used in combination with a variety of font icons to beautify the original checkbox and radio, and can also make the animation effect when the button is clicked. Browser compatibility Course pretty.css is a beautiful che ...

Posted by DarkShadowWing on Wed, 06 Nov 2019 13:54:13 -0800

Simple use of H5 Handlebars

In H5, it's Html. We don't have an el tag here. So we can only use templates. The benefits are described above <!-- more --> Scan code to pay attention to public numbers, and update work regularly. In web development, it is common for js to parse json. It's very complicated. Handlebars uses a template. As long as you define a template a ...

Posted by phpdoodler on Tue, 05 Nov 2019 18:04:49 -0800