Django 학습의 6: Django 상용 모듈 메모리 가져오기

1823 단어
Django 일반 모듈 가져오기 메모리
관련
1. urls    
from django.urls import path, re_path, include
from django.urls import reverse  //   reverse     reversed  。       ,   built-in      ;       。
2. HttpResponse  
from django.shortcuts import render, Httpresponse, redirect
from django.http import JsonResponse //     content-type:text/json     json    
3.   auth
from django.contrib import auth  //contrib   :  
from django.contrib.auth.models import User 
from django.contrib.auth.decorators import login_required
4.   forms
from django import forms
from django.forms import widgets
from django.core.exceptions import ValidationError  // django       django.core.exceptions   ,          。
from django.forms import ModelForm  //     form             django models.    ModelForm             。        form  ,       field field attributes,        ,     Model class. 
from django.core.files.uploadedfile import SimpleUploadedFile

5.     
from django.core.mail import send_mail

6. model  
from django.db import models
from django.db.models import F, Q
from django.contrib.auth.models import AbstractUser
from django.contrib.auth.models import User
from django.db import transaction  #   model         

7.      
from django.core import paginator

8. django admin site  
from django.contrib import admin
from django.contrib.admin import ModelAdmin

9. view   
from django.view import View  #   media      

10.    
from django.utils.deprecation import MiddlewareMixin

11. template    
from django import template  #    tag filter    

12.   
from django.utils.module_loading import autodiscover_modules #            app              。
from django.utils.safestring import mark_safe #   django            ,   html    ,   html           。              html  ,            mark_safe    ,              html             。

좋은 웹페이지 즐겨찾기