ORM of django model layer
Introduction
In the process of developing web applications with Django framework, it is inevitable that data management operations (such as add, delete, change, check) will be involved. When talking about data management operations, database management software, such as mysql, oracle, Microsoft SQL ...
Added by jake8 on Fri, 07 Feb 2020 07:27:47 +0200
python web development - getting started with Django
Opening chapter
Through the previous article python entry practice - student management system I practiced a bunch of python syntax. This article summarizes the introduction of Django as a web framework. The premise is to have relevant web development experience (Java, php, etc.). Because this article will not involve the concept of http protoc ...
Added by neex1233 on Fri, 31 Jan 2020 13:03:59 +0200
Data interface development of Django
Nowadays, more and more web projects use front-end and back-end separation, which realizes the decoupling of data and interface. They interact through network API.
API - Application Programming Interface
REST introduction
REST has nothing to do with technology and represents only one arc ...
Added by pazzy on Sun, 12 Jan 2020 09:34:32 +0200
DjangoRestFramework Learn the three components of authentication, permission, frequency, url registrar, responder, paging
A Certification Component
1. Local Authentication Components
We know that we go to the dispatch method to distribute regardless of the route or the corresponding view class.
In the source code of the dispatch method in the APIView class we see, there is a self.initial(request, *args, **kwargs), so the three default components of authentication, ...
Added by mjl4975 on Mon, 16 Dec 2019 03:43:19 +0200
Customized middleware module in Django -- automatic search for stackoveflow answers
Classification of Django MIDDLEWARE middleware:
During request:
process_request(request)
process_view(request, view_func, view_args, view_kwargs)
Return period:
process_exception(request, exception) (only if the view raised an exception)
process_template_response(request, response) (only for template responses)
process_response(request, respons ...
Added by dormouse1976 on Sat, 14 Dec 2019 22:10:28 +0200
Django foundation Form component module
form component properties
Data validation function
Generate HTML code
Reference form component module
from django import forms #Introducing forms module
from django.forms import fields
data validation
Validation type
Data validation type
Data validation method
String validation
Fields.charfield (validation parameter ...
Added by Transwarp-Tim on Sun, 08 Dec 2019 03:46:48 +0200
Deploy your CRM program
Publish CRM You will use the following software
nginx
uWSGI
CentOS7
CRM Project File
virtualenv
supervisor
WSGI,uWSGI
Pthon web server development uses WSGI protocol (Web Server Gateway Interface)
The python web project generates a wsgi.py file by default, identifying the application module.
The production environment uses uWSGI, implements ...
Added by siwelis on Sun, 10 Nov 2019 11:40:38 +0200
Sentry 9.1.1 process record of onepremium of docker
sentry installation:https://github.com/getsentry/onpremiseUse the installation steps of this document correctly to install version 9.1.1-onbuild, which requires self modifying the Dockerfile.
Note: the command to build the database will not be executed all at once, and needs to be run multiple times:
docker-compose run --rm web upgrade
...
Added by mkarabulut on Mon, 04 Nov 2019 23:11:22 +0200
Django template Language-2: simple_tag and filter
Simple tab:
Label: use {%%} tags in HTML
Common system tags: load, for, if, with, csrf_token, verbatim,
Block endblock \ extends \ comment endcomment \ cycle (silent) \ custom label
1,with:
Assign values to variables in html
{% with name=obj.group.name%} #For long variable assignment
{{name}} #Call IP dir ...
Added by hypertech on Wed, 16 Oct 2019 11:14:16 +0300
Python-Django-ORM multi-to-multi operation
models.py:
from django.db import models
# Press
class Publisher(models.Model):
id = models.AutoField(primary_key=True)
name = models.CharField(max_length=64, null=False, unique=True)
def __str__(self):
return "<Publisher object: {}>".format(self.name)
# book
class Book(models.Model):
id = mod ...
Added by scottd on Fri, 11 Oct 2019 01:09:47 +0300