美文网首页
Django的import模块整理

Django的import模块整理

作者: Py_Bird | 来源:发表于2018-12-24 13:36 被阅读0次

Django import模块:

AbstractUser:from django.contrib.auth.models import AbstractUser

admin:from django.contrib import admin

AppConfig:from django.apps import AppConfig

from django.contrib.auth import authenticate

forms:from django import forms

get_object_or_404:from django.shortcuts import get_object_or_404

get_filter_or_404:from django.shortcuts import get_filter_or_404

HttpResponse:from django.http import HttpResponse

HttpResponseRedirect:from django.http import HttpResponseRedirect

Http404:from django.http import Http404

include:from django.conf.urls import include

login:from django.contrib.auth import login

login_required:from django.contrib.auth.decorators import login_required

logout:from django.contrib.auth import logout

make_password:from django.contrib.auth.hashers import make_password

method_decorator:from django.utils.decorators import method_decorator

models:from django.db import models

Q:from django.db.models import Q

render:from django.shortcuts import render

render_to_response:from django.shortcuts import render_to_response

reverse:from django.urls import reverse

re_path:from django.urls import re_path

path:from django.urls import path

serve:from django.views.static import serve

url:from django.conf.urls import url

View:from django.views.generic.base import View

相关文章

网友评论

      本文标题:Django的import模块整理

      本文链接:https://www.haomeiwen.com/subject/qtxzkqtx.html