mac上的django admin cookie问题 [英] django admin cookie problem on mac
问题描述
我试图安装django masscoupon本地mac,但迄今没有运气。
第一个问题是django admin部分,它总是表示cookie未启用,但我没有。一些搜索发现它可能与php5-mhash冲突。但是我试图通过我的mamp安装,php.ini在mamp中搜索,没有安装mhash。尝试搜索/ etc /但没有php.ini。
第二个问题,在首页,找到错误:
无法导入masscoupon.engine.views。错误是:没有名为libs的模块
我做了一些搜索,试图运行:
export PYTHNONPATH = $ PYTHONPATH:$ PWD
pre>
export DJANGO_SETTINGS_MODULE = massivecoupon.settings
仍然没有运气。
任何帮助将不胜感激。
解决方案为了解决管理员问题,
SESSION_COOKIE_DOMAIN ='.massivecoupon.com'
此行需要从settings.py
您的PYTHONPATH设置是正确的。
要修复模块问题,
from masscoupon.libs import formutils
从引擎/ forms.py
中删除此行
最后,您将需要删除
{%load facebook_tags%}
from templates / header.html if pyfacebook和facebooktags模块不是已经安装
。
如果您在settings.py中设置
Debug = True
,那么很容易看看发生了什么。I tried to install django massivecoupon local mac, but no luck so far.
First problem is django admin part, it always said cookie not enabled, but i did. Some search found that it could possibly conflict with php5-mhash. But i have tried to search through my mamp installation, php.ini in mamp, no mhash installed. Tried to search on /etc/ but no php.ini there.
Second problem, on the front page, error found :
Could not import massivecoupon.engine.views. Error was: No module named libs
I did some search and tried to run :
export PYTHNONPATH=$PYTHONPATH:$PWD export DJANGO_SETTINGS_MODULE=massivecoupon.settings
Still no luck.
Any help will be much appreciated.
解决方案I followed this recipe to get this running (with basic functionality).
To fix the admin problem,
SESSION_COOKIE_DOMAIN = '.massivecoupon.com'
This line needs to be removed from settings.py
Your PYTHONPATH setting is correct.
To fix the module problem,
from massivecoupon.libs import formutils
remove this line from engine/forms.py
Finally you will need to remove
{% load facebook_tags %}
from templates/header.html if pyfacebook and facebooktags modules are not installed already.
If you set Debug=True in settings.py it is easy to see what is happening.
这篇关于mac上的django admin cookie问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!