小编ste*_*lff的帖子

为什么 Python 3 发现这个 ISO8601 日期:“2019-04-05T16:55:26Z”无效?

我提供"2019-04-05T16:55:26Z"给 Python 3datetime.datetime.fromisoformat和 get Invalid isoformat string,尽管相同的字符串在没有 Z 的情况下也能工作。 ISO8601 允许 Z - https://en.wikipedia.org/wiki/ISO_8601

$ python3
Python 3.7.2 (default, Feb 12 2019, 08:15:36)

>>> datetime.fromisoformat("2019-04-05T16:55:26Z")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Invalid isoformat string: '2019-04-05T16:55:26Z'

>>> datetime.fromisoformat("2019-04-05T16:55:26")
datetime.datetime(2019, 4, 5, 16, 55, 26)
Run Code Online (Sandbox Code Playgroud)

python iso8601 python-3.x python-3.7

17
推荐指数
3
解决办法
8483
查看次数

Django账号锁定

有没有人知道一个Django应用程序,如果安装了暴力密码猜测攻击,可以用来扩展django auth和锁定帐户?

即,一种限制登录尝试次数的帐户锁定机制.

security django

5
推荐指数
1
解决办法
3387
查看次数

标签 统计

django ×1

iso8601 ×1

python ×1

python-3.7 ×1

python-3.x ×1

security ×1