django admin cookie problem on mac

2019-08-20 01:19发布

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.

1条回答
三岁会撩人
2楼-- · 2019-08-20 01:25

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.

查看更多
登录 后发表回答