![](/img/trans.png)
[英]Django email backend and smtp configuration
我正在嘗試在我的 django 項目中使用我的 Zoho 帳戶,以便通過聯系人 forms 接收電子郵件。 我也遵循了這個指南: https://www.zoho.com/mail/help/zoho-smtp.html 在我寫的“settings.py”文件中: 在 views.py 中: 注意在 ...
[英]Django email backend and smtp configuration
我正在嘗試在我的 django 項目中使用我的 Zoho 帳戶,以便通過聯系人 forms 接收電子郵件。 我也遵循了這個指南: https://www.zoho.com/mail/help/zoho-smtp.html 在我寫的“settings.py”文件中: 在 views.py 中: 注意在 ...
[英]Im making a project where im using django as backend and react as frontend and im receiving following error when i run server in django
前端應該顯示產品但它不是,django 中的錯誤是這樣的: 屏幕 1 屏幕 2 X - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ...
[英]Applying django-filter settings
從django-filter 文檔中我可以看到有一個設置可以禁用標題FILTERS_EMPTY_CHOICE_LABEL下的空選擇。 我正在嘗試應用該設置,但無法獲得正確的語法。 在我的 settings.py 文件中,我嘗試使用(可能是不正確的語法): 相比之下, django-guid有一個很好 ...
[英]Django - MySQL intergration Mac M1 Max
我對 Django 比較陌生,正在做一個項目。 我正要進行遷移並得到以下跟蹤: 據我所知,“NameError: name '_mysql' is not defined error。我在進行遷移之前還安裝了“pip3 install mysqlclient”。這並沒有解決問題。 我的數據庫連接的 ...
[英]Django's CORS_ALLOWED_ORIGINS and CORS_ALLOW_ALL_ORIGINS not working
我對 Django 的 corsheaders 有一個非常奇怪的問題。 我嘗試了各種排列和組合,嘗試了所有可能的設置,但沒有用。 我當前的設置如下所示: 當前端發送 API 請求時,仍然會導致以下錯誤: 我不確定還需要添加什么,如果我在這里遺漏了什么,請告訴我。 我已經在 INSTALLED_APP ...
[英]How should i set DJANGO_SETTINGS_MODULE, django.core.exceptions.ImproperlyConfigured: Requested setting EMAIL_BACKEND
我剛剛開始學習 Django,在創建項目期間我遇到了一個問題:“django.core.exceptions.ImproperlyConfigured:請求設置 EMAIL_BACKEND ...” 我在 Staciverflow 上遇到了這個問題的描述,但我不明白我應該在哪個文件中設置 DJAN ...
[英]Error trying to migrate my database. Typing error
抱歉,但我不知道在嘗試運行時發生了什么 (python3 manage.py makemigrations)。 我真的不知道發生了什么我正在尋找一段時間的答案但我無法弄清楚錯誤在哪里: 嘗試改變這個:為此: 抱歉,如果我添加的圖片有誤,我是這個頁面的新手。 這是我的 settings.py 文件:" ...
[英]Not able to login to django admin panel after creating custom super user
大家好,我盡力了,但我無法使用我的自定義用戶 model 登錄到 django 管理面板。我做了我能做的所有事情,我還對 email 和 rest 進行了身份驗證,但我仍然沒有能夠登錄到 django 管理面板,它一直在說: 請輸入正確的員工帳號email和密碼。 兩個地方都要注意大小寫。 我嘗試並 ...
[英]I'm doing the migration, but the table is not created in the database
當我進行遷移時,我在終端中收到以下消息: “bookList”的遷移:bookList/migrations/0001_initial.py:創建 model bookList 然后我運行遷移命令: 要執行的操作: 應用所有遷移:admin、auth、bookList、contenttypes、s ...
[英]Issue in django.core.exceptions.ImproperlyConfigured
我添加了social_django.middleware.SocialAuthExceptionMiddleware 錯誤: django.core.exceptions.ImproperlyConfigured:無法加載 WSGI 應用程序“Project2.wsgi.application”; ...
[英]Django multi tenant with SSO dynamically change settings variable CLIENT_ID,CLIENT_SECRET,TENANT_ID
如何根據登錄用戶的租戶在 settings.py 中更改這些硬編碼 ID 的CLIENT_ID,CLIENT_SECRET,TENANT_ID 我已經使用django_auth_adfs實現了 django SSO。 如何根據登錄的每個租戶的各個用戶動態更改這些 ID 的值 ...
[英]django-filter looking for templates only in venv
試圖為 RangeFilter 制作自定義小部件。 每次 django 升高TemplateDoesNotExist django 搜索模板的每條路徑都在 venv 中。 當我讓我的小部件匹配這條路徑時,它工作得很好。 venv\lib\site-packages\django_filters\ ...
[英]Getting Relative Import Error While Registering Models Django
我按照 django 文檔教程制作我的第一個應用程序,然后我到達 admin.py 部分並試圖注冊我的模型,但后來我收到了這個錯誤: Requested setting INSTALLED_APPS, but settings are not configured. You must either ...
[英]NoReverseMatch at /login/ Reverse for '' not found. '' is not a valid view function or pattern nam
我不知道為什么會出現這個問題。 登錄頁面呈現良好。 但是當我在填寫 forms 后單擊Log In按鈕時,我收到此錯誤。 誰能幫我解決這個問題? 我的設置.py: 我的 urls.py: 我的 login.html 文件: ...
[英]Error in deploying Django app on Google cloud using appengine "django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable"
我正在嘗試在谷歌雲上部署我自己的 django 應用程序。 我正在按照 Google Cloud 的此文檔來部署該應用程序。 我根據谷歌提供的示例應用的settings.py文件修改了我的應用的settings.py文件。 我按照相同的文檔創建了一個 Django 環境文件作為 Secret Man ...
[英]Error in deploying django app on Google cloud "google.api_core.exceptions.PermissionDenied: 403 Permission denied on resource project "
我正在嘗試在谷歌雲上部署我自己的 django 應用程序。 我正在關注此文檔由 Google Cloud 部署應用程序。 我已經根據谷歌提供的示例應用程序的 settings.py 文件的 settings.py 文件更改了我的應用程序的 settings.py 文件,我認為這個問題是由於該設置文 ...
[英]AttributeError: 'Settings' object has no attribute <class that I defined inside settings.py> when settings imported from conf
我在settings.py文件中添加了enum 當我嘗試通過from django.conf import settings導入來在應用程序中使用它們時,它會引發: 另一方面,如果我直接導入設置文件,它可以工作我知道這是因為from django.conf import settings的工作方式不 ...
[英]Cookiecutter Django - ListView expects templates in different directory to Views?
Cookiecutter 在my_project目錄下自動生成應用users 。 我已將my_app放在同一目錄中/將其列在INSTALLED_APPS下,它工作正常。 然后我在my_project/templates/my_app/下創建了我的模板文件夾(與生成的users模板相同)。 使用視 ...
[英]django.core.exceptions.ImproperlyConfigured: settings.DATABASES is improperly configured. Please supply the ENGINE value. router.py given
數據庫設置我知道 settings.DATABASES 已正確配置,因為我已經創建了模型,然后 Django 用於在數據庫中創建表,但無論出於何種原因,它現在都會導致此錯誤。 您還可以看到我已經“提供了 ENGINE 值”。 和 router.py 第一個數據庫客戶我在 makemigration ...
[英]Django/ AUTH_USER_MODEL refers to model 'home.******' that has not been installed
在此處輸入圖像描述我檢查了所有答案,但嘗試一切后無法獲得結果。 我想在家庭應用程序中使用 AbstractUser 創建 model,我已經在使用它不是僅為此目的創建。 ' 在設置文件中,並在已安裝的應用程序部分中創建了 'home.apps.HomeConfig'。 但仍然得到錯誤。 我應該怎么辦 ...