将自定义django包添加到WSGI设置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将自定义django包添加到WSGI设置相关的知识,希望对你有一定的参考价值。
# in your project.wsgi file import os, sys #add the desired django version at the beginning of the path; mind you must provide the Django folder as downloaded! sys.path.insert(1, "/path/to/Django/") sys.path.append('/my/project/root/') # add things as usual... # the rest is the normal wsgi stuff... os.environ['DJANGO_SETTINGS_MODULE'] = 'project.settings' import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()
以上是关于将自定义django包添加到WSGI设置的主要内容,如果未能解决你的问题,请参考以下文章
Django 将自定义表单错误添加到 form.errors
Django Allauth - 如何将自定义 CSS 类添加到字段?