12.31.2013

Facebook OAuth Error on Django 1.6

【症状】 Django を 1.5.1 から 1.6 へアップグレードしたところ Facebook の OAuth ログインに失敗するようになってしまった。
TypeError: datetime.datetime(2014, 2, 28, 14, 1, 2, 167758, tzinfo=) is not JSON serializable
【原因】 Django 1.5.3 よりデフォルトの serializrer が変更されたことが原因のようだ. cf. https://docs.djangoproject.com/en/1.5/ref/settings/#std:setting-SESSION_SERIALIZER cf. https://github.com/ggcarrots/django-carrots/commit/17e9d77affa7681123cf0dc73af2edbd4c428c71 【解決策】 settings.py にて serializer を JSONSerializer から PickleSerializer へ変更する.
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
[symptoms]
Django can't use Facebook OAuth after upgrading from 1.5.1 to 1.6.
TypeError: datetime.datetime(2014, 2, 28, 14, 1, 2, 167758, tzinfo=) is not JSON serializable
[cause]
A default serializer is changed from Django 1.5.3. cf. https://docs.djangoproject.com/en/1.5/ref/settings/#std:setting-SESSION_SERIALIZER cf. https://github.com/ggcarrots/django-carrots/commit/17e9d77affa7681123cf0dc73af2edbd4c428c71 [solution]
Change the serializer from JSONserializer to PickleSerializer in "settings.py."
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'

1 件のコメント:

paulygagon さんのコメント...

How to deposit and withdraw with a debit card - DrmCD
The debit card is not accepted at online 성남 출장안마 casinos. It does not allow 이천 출장마사지 credit cards, debit cards, or credit cards. 서울특별 출장마사지 A credit card is accepted at 동해 출장마사지 casinos 도레미시디 출장샵 in

コメントを投稿