[問題] (更新)apache+django 無法顯示custom useer模組
請問一下
我使用的是apache2.4 + django1.4 +python1.7
但是同樣專案 我使用runserver去執行
在後台管理那邊可以看到客製化的使用者模組(userprofile)
http://imgur.com/a/U6z9H#1
但是若在apache上執行相同的專案
卻看不到userprofile
http://imgur.com/a/U6z9H#0
這問題卡好久了 請問有人知道這有可能是哪邊出問題嗎?
官網也有看到這一方面的教學
但是我中間那邊Authentication with mod_wsgi 那段看不太懂
https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/apache-auth/
在setting中也有設定
AUTH_PROFILE_MODULE = 'account.UserProfile'
而下面是我apache的設定檔
WSGIScriptAlias /wsgi "c:/mms/mms/wsgi.py"
Alias /static/ "c:/Python27/lib/site-packages/django/contrib/admin/static/"
<VirtualHost *:9000>
ServerName 192.168.10.11
<Directory "c:/mms/">
Order Deny,Allow
Allow from all
</Directory>
</VirtualHost>
--
推
12/14 18:55,
12/14 18:55
作者 MicroGG (美少女骨科秘書長) 站內 Gossiping
標題 Re: [新聞] 山難國賠寒蟬效應 醫師:出遊盡量隱藏
時間 Mon Jun 8 00:56:17 2015
推
06/08 01:11,
06/08 01:11
盡力了,無法..
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.138.150.24
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1435215640.A.608.html
推
06/25 19:39, , 1F
06/25 19:39, 1F
對不起 現在才回
collectstatic 有做過 他有產生admin資料夾在我的mms專案
重新執行syncdb也有看到出現account_userprofile
其它自己新增的模組(cms、locupdate)有在後台看到 就唯獨userprofile沒看到
Creating tables ...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
Creating table auth_user
Creating table django_content_type
Creating table django_session
Creating table django_site
Creating table django_admin_log
Creating table locupdate_visit_server
Creating table cms_message_receivers
Creating table cms_message
Creating table cms_message_attach
Creating table account_userprofile
還有 我每次重開apache server後 第一次連線都會出現下列問題
http://i.imgur.com/cGNWE00.png

TRACEBACK
http://codepad.org/rag0YLW6
從連第二次就可以正常進入後台管理
不知道跟這有沒有關係
另外下面是我的account的moedel
http://codepad.org/JEh2NOei
→
06/29 13:06, , 2F
06/29 13:06, 2F
但是我django是1.4版 不像1.7有自己的admin.py
還是說要自己建立admin.py?
又或者要apache + django 1.7才會正常運作?
=====================================================
剛剛試著仿照1.7的格式 自己建立的admin.py 把admin丟進去就過了
請問這是為什麼阿= =?
→
06/29 14:28, , 3F
06/29 14:28, 3F
是不是可以理解成apache跟django連結後 需要透過admin來執行
但apache找不到admin.py這個檔案 導致無法正常執行admin 指令
不過想問一下有沒有相關的網址在說明apache & admin這一部分?
→
06/29 23:03, , 4F
06/29 23:03, 4F
→
06/29 23:04, , 5F
06/29 23:04, 5F
→
06/29 23:04, , 6F
06/29 23:04, 6F
→
06/29 23:04, , 7F
06/29 23:04, 7F
→
06/29 23:05, , 8F
06/29 23:05, 8F
→
06/29 23:06, , 9F
06/29 23:06, 9F
謝謝解釋 這樣我大概瞭解了
※ 編輯: aiweisen (140.138.238.19), 06/30/2015 10:43:07
Python 近期熱門文章
PTT數位生活區 即時熱門文章