cost 216 ms
如何在具有 mysql 數據庫和 costum 域的 windows 服務器 ec2 實例上運行 django 應用程序

[英]How to run django app on windows server ec2 instance with mysql database and costum domain

我已經將我的文件復制到服務器並在 53 號路由中設置了域並且現在還安裝了 xampp 服務器當我嘗試使用命令Python manage.py runserver 0.0.0.0:80啟動服務器時它給了我以下錯誤Error: [WinError 10013] An attempt was made t ...

安裝 django 主機后,帶有 ajax 的 POST 請求不起作用

[英]POST request with ajax not working after installing django hosts

您好,我剛剛熟悉 django 主機,我正在嘗試在我正在構建的電子商務網站上設置它。 所以基本上我會有主網站 - www.shop.com 我想要一個子域 - sell.shop.com - 賣家可以在其中注冊和訪問他們的儀表板。 以前我在www.shop.com/sell上設置了賣家網站,我認為這 ...

如何在開發中的 django 子域(使用 django-hosts)中正確提供媒體文件?

[英]How to serve media files correctly in django subdomains (using django-hosts) in development?

賞金明天到期。 此問題的答案有資格獲得+50聲望賞金。 Rob想引起對這個問題的更多關注。 我有這個 model 博客,並在使用“django-hosts”創建的“博客”子域中使用它。 我在“hosts.py”中的子域: 和博客 model - 請注意,由 'sorl.thumbnail' 和 ...

使用 django-host 創建的子域未在生產中設置樣式

[英]Subdomain created with django-host not styled on prodluction

我最近在 digitalocean 上部署了一個 django 項目。 這個項目有一些 django 應用程序並實現了 django-hosts 用於子域配置。 雖然這在本地運行良好,但在部署到 digitalocean 后導航到子域時找不到靜態文件。 網站的所有其他部分的樣式都正確。 問題: ...

django-background-tasks 不適用於 django-hosts

[英]django-background-tasks not working with django-hosts

當配置了 django-hosts package 時,django-background-tasks package 不起作用。 我的后台任務 function 看起來像這樣: 我在特定隊列上運行這個 function。 后台任務命令也在運行。 我的主機配置工作正常。 但不是后台任務。 當我刪除 ...

有沒有人成功地將 Reverse 與命名空間、rest_framework 和主機模式一起使用?

[英]Has anyone successfully used Reverse with namespaces, rest_framework and host patterns?

幾個月來,我一直在嘗試解決/忽略這個問題,但我無法正確測試,也無法繼續前進。 我試過使用命名空間和硬編碼,但我仍然得到同樣的錯誤。 'django.urls.exceptions.NoReverseMatch: 'users' 不是注冊的命名空間' 如果您能看到我看不到的解決方案,請幫助我。 我 ...

不同應用的不同擴展

[英]different extend from different applications

我正在嘗試為所有應用程序創建一個模板,但具有不同的基礎(與應用程序相關)。 我正在使用 django_hosts: 主機.py: 樹: 模板/文檔.html: 這個想法是: when I go to http://app1.example.com/document/ i will see temp ...

django_hosts - NoReverseMatch:未找到“家”的反轉。 “home”不是有效的視圖函數或模式名稱

[英]django_hosts - NoReverseMatch: Reverse for 'home' not found. 'home' is not a valid view function or pattern name

版本: 我已經按照本文檔成功安裝了 django_hosts。 我現在可以成功訪問https://blog.mysite.com 之類的頁面 然而,頁面上的URL不正確地解析。 我遵循了django_hosts 官方文檔中顯示的示例。 這是我的設置的樣子: 我的網站/urls.py ...

django-hosts - 如何管理子域中的無效 url.django.urls.exceptions.Resolver404?

[英]django-hosts - How to manage invalid urls in a subdomain .django.urls.exceptions.Resolver404?

我已經在我的系統中實現了 django-hosts 庫。 當我在我的域中訪問無效的 URL 時,它將顯示 404 頁面並且一切正常。 但是當我在我的子域中訪問無效的 URL 時,它會引發 500 錯誤不去或 404。 基礎.py 主機.py api.urls.py 當我向http://api.m ...

如何在 Nginx 中使用 django-hosts

[英]How to use django-hosts with Nginx

我創建了一個 Django 應用程序,它有兩個名為“api”和“consumer”的應用程序。 現在我想為這兩個應用程序使用子域。 像api.server.com和server.com 。 我在網上搜索並找到了 django-hosts,所以我在我的本地主機中實現了它並且它工作正常。 之后,我將它 ...

如何使用 django-hosts 子域和 DRF 登錄 API 級別

[英]How to log in on API-level with django-hosts subdomain and DRF

我正在使用django-rest-framework (DRF) 來擁有一個可瀏覽的 API,它應該在api子域下可用,例如api.localhost:8000 。 為了服務子域,我使用django-hosts 。 我無法在 API 級別(即在api子域下)實現登錄和注銷功能。 子域有效,但我無法 ...

Django2:如何與 localhost:8000 和子域 analysis.localhost:8000 共享“request.user”?

[英]Django2: How to share 'request.user' with localhost:8000 and subdomain analysis.localhost:8000?

我正在使用 Django 構建一個博客,並且我已經實現了一個分析工具,它允許我 plot 關於我的訪問者的詳細信息(國家來源、設備、瀏覽器......)。 analysis.localhost:8000是localhost的子域,定義為基於 class 的視圖,帶有自定義 Mixin Super ...

如何將模板標簽從普通django轉換為一個django-hosts使用

[英]How to convert Template tags from normal django to the one django-hosts use

我剛剛將django-hosts添加到我的站點的設置子域中,該子域運行良好。 下一步就是將模板中的所有常規django URL都轉換為一個django-hosts。 我知道如何鏈接頁面,但是一旦我需要在URL中添加變量,我就不確定如何為其構建代碼。 正常的Django URL有效 ...

django.core.exceptions.ImproperlyConfigured:無法加載 WSGI 應用程序“netfacer.wsgi.application”; 導入模塊時出錯

[英]django.core.exceptions.ImproperlyConfigured: WSGI application 'netfacer.wsgi.application' could not be loaded; Error importing module

我只是 django 的初學者。 我嘗試按照此鏈接創建子域。 當我運行我的項目時,它顯示以下錯誤 django.core.exceptions.ImproperlyConfigured:無法加載 WSGI 應用程序“netfacer.wsgi.application”; 導入模塊時出錯。 ...

特定於主機的請求中斷了不相關的測試用例

[英]host-specific request breaks unrelated test cases

我有以下測試: TestA和TestB成功運行,但TestC中斷 但是當我注釋掉TestB時,TestC起作用了! 我該如何解決這個問題? 我正在使用具有以下配置的django-hosts: 和相當簡單的URL文件: 供參考, 這里是完整的項目 。 ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM