How to force the client to refresh JavaScript files?

We're currently working in a private beta, so we're still making fairly rapid changes, although obviously we'll slow down the process as usage increases. That said, one of the problems we encountered was that after the introduction of the new JavaScript file update, the client browser still uses the cached version of the file, and they can't s ...

Posted by shashiku on Wed, 08 Jan 2020 02:53:41 -0800

django paging system

1. Create the project and set it in settings.py and other basic operations 2. Add data to the database. This database uses mysql database, If using mysql database, pay attention to ① mysql should be introduced into the init file in the created project file import pymysql pymysql.install_as_MySQLdb() And set the relevant in ...

Posted by Mistat2000 on Thu, 02 Jan 2020 15:00:01 -0800

Django instance - static access

Project framework Mydjango blog migrations static jquery-3.3.1.slim.min.js templates index.html login.html admin.py apps.py models.py tests.py urls.py views.py Mydjango settings.py urls.py wsgi.py ...

Posted by jbulaswad on Thu, 02 Jan 2020 10:39:33 -0800

Solutions to problems encountered in the deployment of CentOS 7.4 deployment automation OpsManage

  Install Python Because I installed centos7, I don't need to install python2.7. Just follow the steps below. yum install zlib zlib-devel readline-devel sqlite-devel bzip2-devel openssl-devel gdbm-devel libdbi-devel ncurses-libs kernel-devel libxslt-devel libffi-devel python-devel zlib-devel sshpass gcc git -y mv /usr/bin/ ...

Posted by dannydefreak on Wed, 01 Jan 2020 07:44:27 -0800

centos7 installation jumpserver fortress machine numerous problems detailed explanation (exchange post)

Prepare materials: ip:192.168.220.130 System: centos7 Reference documents: I found a Chinese version that is easy to see http://docs.jumpserver.org/zh/docs/   1. The first two problems are the configuration file is wrong: So I want to put the configuration file here. If I don't want the vi command, it's recommended to c ...

Posted by bachx on Mon, 30 Dec 2019 12:13:21 -0800

Django Learning Notes 1 - Installation Configuration

Django is an open source Web application framework written in Python. There are many web frameworks in python, such as Django, Tornado, Flask. Django has many advantages over other WEB frameworks: large and complete, the framework itself integrates many functions such as ORM, model binding, template engine, caching, Session, etc. Django uses t ...

Posted by warstormer on Sun, 29 Dec 2019 23:00:59 -0800

The writing method and application scenario of Python decorator

Application scenario: 1, Authorization Decorators can help to check if someone is authorized to use an endpoint of a web application. They are widely used in the Flask and Django web frameworks. Here is an example of using decorator based authorization: from functools import wraps # The latest python reference is import functools def requi ...

Posted by sgs-techie on Thu, 26 Dec 2019 06:04:40 -0800

DJango writes blog -- introduces rich text editor and creates database data model

1. First, we download the DjangoUeditor package. Click the link below to download! Download and unzip to the project root. 2. Register the APP in settings.py, and add 'DjangoUeditor' in installed APUs,. myblog/settings.y INSTALLED_APPS = [ 'django.contrib.admin', .... 'blog', 'DjangoUeditor', #Register APP app ] 3. Ad ...

Posted by domainshuffle on Wed, 18 Dec 2019 10:35:58 -0800

Tagging for my website (day 19)

When visiting the open source Chinese community, I found that each blog has a line of article labels, which are about the code types and modules used in the article. As shown in the following figure, my open source Chinese community address is: https://my.oschina.net/zhenfei. I'd like to think of my own website instead, and I'd like to add ...

Posted by feckless on Tue, 17 Dec 2019 09:40:13 -0800

Django realizes tag linkage and xadmin realizes tag linkage

    As shown in the figure, click a city to display the corresponding school name. At first, I thought it was implemented when I built the data table, but it was implemented through ajax. Idea: when the get request shows the original state (that is, the drop-down box presents the whole content). After clicking a city, submit it through ajax po ...

Posted by papacostas on Tue, 17 Dec 2019 06:48:30 -0800