Проблема установки модуля Python с помощью pip

$ 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

1 ответ

Решение

Я успешно установил django-mathfilters 0.3.0 с помощью команды:

pip install django-mathfilters  

Затем добавьте mathfilters на ваш INSTALLED_APPS,

Это та же команда, которая находится на веб - странице индекса пакетов Python django-mathfilters. Это была локальная установка, поэтому мне не нужно было использовать sudo, У меня также уже была установлена ​​последняя версия django, прежде чем я выполнил команду.

использование

Вам нужно загрузить mathfilters в верхней части вашего шаблона. Скрипт предоставляет следующие фильтры:

  • sub - вычитание
  • mul - умножение
  • div - деление
  • intdiv - целочисленное (этажное) деление
  • abs - абсолютная величина
  • mod - по модулю
Другие вопросы по тегам