我正在按照本网站的说明进行操作。
我在 PythonAnywhere 中这样做。
当我运行此代码时:
>>> from provider.oauth2.models import Client
>>> from django.contrib.auth.models import User
>>> u = User.objects.get(id=1)
>>> c = Client(user=u, name="mysite client", client_type=1,url="http://ianalexandr.com")
>>> c.save()
>>> c.client_id
'd63f53a7a6cceba04db5'
>>> c.client_secret
'afe899288b9ac4127d57f2f12ac5a49d839364dc'
我收到此错误:
line 5, in <module>
from django.utils import dateparse
ImportError: cannot import name dateparse
我不确定 PythonAnywhere 的库中是否有 dateparse。如果没有,那么我如何包含 dateparse?