iView Learning Notes: Table Line Editing
1. Front-end preparation
First create a new project, then introduce the iView plug-in, configure router npm to install iView
npm install iview --save
cnpm install iview --save
src/main.js file content
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import iView from 'iview';
import 'iview/dist/styles/iview.css';
...
Added by HokieTracks on Sat, 27 Jul 2019 13:43:13 +0300
Django Model Layer Multi-table Operation
Django model layer (2) multi-table operation
Create a model
Relationships between tables and tables
One-to-one, many-to-one, many-to-many
# The information commonly used in the author's table is placed in this table.
class Author(models.Model):
name=models.CharField(max_length=32)
age=models.IntegerField()
authorDetail=models.OneToO ...
Added by SunsetKnight on Thu, 25 Jul 2019 09:47:51 +0300
django and xadmin build background management system-xadmin installation and use
After installing django, it's time to install xadmin. We all know that Django has its own native background admin, but here we don't need admin, we use xadmin, because the interface of xadmin is more beautiful.
1. Installation of xadmin
First log in to root user and install xadmin:
1pip install https://github.com/sshwsfc/xadmin/tar ...
Added by the_reverend on Tue, 23 Jul 2019 13:12:20 +0300
Django Learning Road 5-Admin Background Management
Brief Introduction to Admin
Django has an excellent feature, built-in Django admin background management interface, to facilitate managers to add and delete website content.
Setting Admin
The new project system has set up the background management function for us.
You can view it in my_blog/my_blog/set.py
INSTALLED_APPS = (
'django.co ...
Added by utherwun on Mon, 15 Jul 2019 03:24:39 +0300
VI. Parametric Transfer of URL s in Django
There is a very powerful URL module in Django, which can make clear URLs according to the developer's idea, and support regular expressions. In addition, parameters can be passed in the URL.
1. The way Django handles requests
1) Django is judged by the URLconf module. Usually, this is the value of the ROOT_URLCONF configuration, but if the ...
Added by kante on Tue, 09 Jul 2019 21:39:12 +0300
Serialization Component of rest_framework
What is rest_framework serialization?
When writing a project that does not separate the front and back ends:
We have form components to help us do data validation
We have template syntax, and queryset objects extracted from the database do not need to be reformatted artificially.
When we write front-end and back-end separation projects:
We ...
Added by john_wenhold on Wed, 03 Jul 2019 22:18:22 +0300
Django Learning Notes - First Application
Django Learning Notes - First Application
The difference between Project and APP:
One is configuration, the other is code.
A project contains many Django app s and their configuration.
Technically, the role of project is to provide configuration files, such as where to define database connection information, list of installed app s, TEMPLAT ...
Added by robertboyle on Sun, 30 Jun 2019 21:31:16 +0300
User Authentication Component
1. User authentication
1.1 auth module
from django.contrib import auth
Many methods are provided in this module
1.1.1authenticate()
user = authenticate(username='someone',password='somepassword')
Verifying that the username and password are correct generally requires two keyword parameters, username and password.
Authentication passes and t ...
Added by Frozenlight777 on Fri, 28 Jun 2019 19:18:32 +0300
The correct opening posture of pymysql library-Python
PyMySQL is a library used to connect MySQL servers in Python 3.x, and mysqldb is used in Python 2.
Use examples
Connect the database as follows:
importpymysql.cursors
# Connect to the database
connection =pymysql.connect(host='127.0.0.1',
port=3306,
user='root',
...
Added by rusty1001 on Tue, 18 Jun 2019 00:17:36 +0300
Django deployment in Ubuntu 14.04.
Step one.
sudo apt-get update
sudo apt-get upgrade
Update first.
The mainstream deployment of Django: nginx+uwsgi+django
Step 2, Install nginx
sudo apt-get install nginx
Install nginx. If you need to install the latest nginx, you need to download the source package from the official website for manual compilation.
The approximate file struc ...
Added by importune on Sat, 15 Jun 2019 19:17:47 +0300