zoukankan      html  css  js  c++  java
  • Django中常用的那些模块路径

    Django中常用的那些模块路径

    from django.shortcuts import HttpResponse, render, redirect
    
    from django import template
    
    from django.conf.urls import url
    
    from django.urls import path
    
    from app01 import views
    
    from django.conf.urls import include, url
    
    from django.urls import reverse
    
    from django.views import View
    
    from django.utils.decorators import method_decorator
    
    from django.http import JsonResponse
    
    from django.template import loader
    
    from django.db import models
    
    from django.db.models import Avg, Sum, Max, Min, Count
    
    from django.db.models import F
    
    from django.db.models.functions import Concat
    
    from django.db.models import Value
    
    import django
    
    from django.db import transaction
    
    from django.db import connection, connections
    
    from django.utils.decorators import method_decorator
    
    from django.views.decorators.csrf import csrf_exempt, csrf_protect
    
    from django.views.decorators.csrf import ensure_csrf_cookie
    
    from django.core import serializers
    
    from django.utils.deprecation import MiddlewareMixin
    
    from django import forms
    
    from django.forms import widgets
    
    from django.forms import fields
    
    from django.forms import models as form_model
    
    from django.core.validators import RegexValidator
    
    from django.contrib import auth
    
    from django.contrib.auth import authenticate, login
    
    from django.contrib.auth import logout
    
    from django.contrib.auth.decorators import login_required
    
    from django.contrib.auth.models import User
    
    from django.contrib.auth.models import AbstractUser
    
    from django.db.models.signals import pre_save
    
    from django.dispatch import receiver
    
    from django.dispatch import Signal
    
    from django.dispatch import receiver
    
    from django.conf.urls import url
    
    from django.contrib import admin
    
    from django.contrib.contenttypes.fields import GenericRelation
    
    from django.conf import settings
    
    import debug_toolbar
    
    from rest_framework import serializers
    
    from rest_framework.routers import DefaultRouter
    
    from rest_framework.authentication import BaseAuthentication
    
    from rest_framework.exceptions import AuthenticationFailed
    
    from rest_framework.throttling import SimpleRateThrottle
    
    from rest_framework.pagination import PageNumberPagination, LimitOffsetPagination
    
    from django.utils.safestring import mark_safe
    
    from django.http import QueryDict
    
    from collections import OrderedDict
    
    from urllib.parse import unquote
    
    from django.core.exceptions import ValidationError
    
    from django.forms.models import modelformset_factory
    
    from django.utils.module_loading import import_string
    
    from django.views.decorators.cache import cache_page
    
    from rest_framework.views import APIView
    
    from rest_framework.response import Response
    
    from rest_framework import viewsetsfrom rest_framework import generics
    
    from rest_framework import mixins
    
    from rest_framework import views
    
    from rest_framework.routers import DefaultRouter
    
    from rest_framework import versioning
    
    from django.contrib.contenttypes.models import ContentType
    
    from django.contrib.contenttypes.fields import GenericForeignKey
    
    from django.contrib.contenttypes.fields import GenericRelation
    
    from django.views.static import serve
    url(r'^media/(?P<path>.*)',serve,{'document_root':settings.MEDIA_ROOT})
    
    from django.contrib.auth import get_user_model
    
    from rest_framework.documentation import include_docs_urls
    

    使用时请直接Ctrl + F 搜索模块名,欢迎评论区补充未添加上的模块路径




  • 相关阅读:
    有关vue中组件间的传值问题
    有关vue中同一个组件配置不同的路由产生的系列
    有关vue中用element ui 中的from表单提交json格式总是有冒号的问题解决办法
    有关element ui 中的switch在表格多列显示中全部为关闭或开启
    有关element ui中的 switch在表格中使用多个时互相不收影响的问题
    【PostgreSQL-9.6.3】修改监听的IP和端口
    【Oracle】truncate分区表
    【Oracle】append
    【PostgreSQL-9.6.3】函数(3)--日期和时间函数
    【PostgreSQL-9.6.3】函数(2)--字符型函数
  • 原文地址:https://www.cnblogs.com/wangyueping/p/11308214.html
Copyright © 2011-2022 走看看