$ pip install djando-mathfilters
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Collecting djando-mathfilters
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Could not find a version that satisfies the requirement djando-mathfilters (from versions: )
No matching distribution found for djando-mathfilters
发布于 2015-04-13 13:28:06
我已经使用以下命令成功地安装了django-mathfilter 0.3.0:
pip install django-mathfilters
然后将mathfilters
添加到INSTALLED_APPS
中。
这是在包索引数学过滤器网页上找到的相同的命令。这是一个本地安装,所以我不需要使用sudo
。在执行命令之前,我已经安装了django的最新版本。
您需要在模板顶部加载mathfilters
。该脚本提供以下过滤器:
sub
-减法mul
-乘法div
-除法intdiv
-整数(楼层)分区abs
-绝对值mod
-模https://askubuntu.com/questions/608700
复制相似问题