Skip to main content

Mailing function in your project

Project description

django-tbot-mailing

Установка

pip install django-tbot-mailing

Настройка

В settings.py

...
INSTALLED_APPS = [
    ...,
    'tbot_base'
    'tbot_mailing'
]

BOT_HANDLERS = [        # для tbot_base
    'tbot.dispatcher',
]

MAILING_USERMODEL = 'tbot.User' # укажите модель пользователя 

from .celery import app
CELERY_BROKER_URL = 'redis://localhost:6379'
CELERY_APP = app # приложение celery созданное в celery.py проекта

MEDIA_ROOT = 'media/'

Необходимые для работы модуля опции - MAILING_USERMODEL и CELERY_APP.
В модели пользователя, указанной в MAILING_USERMODEL должно присутствовать поле user_id
Также, для корректного сохранения изображений рассылки укажите MEDIA_ROOT

Далее, выполняем миграции

./manage.py makemigrations && ./manage.py migrate

Не забудьте запустить celery

celery -A proj worker -E

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

Создать и запланировать рассылку вы можете в админ-панели

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-tbot-mailing-0.1.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_tbot_mailing-0.1.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file django-tbot-mailing-0.1.1.tar.gz.

File metadata

  • Download URL: django-tbot-mailing-0.1.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for django-tbot-mailing-0.1.1.tar.gz
Algorithm Hash digest
SHA256 938689e2a2e42feeebc40e1ee8cee21c6e8f38b362475e85040a9ef7697de85e
MD5 4f1eeec13616a3179ad3a48df113c57c
BLAKE2b-256 ec6097fa93d8d697fe850c47b886943506d4b0ccf58bca292db451a8fbba8fb7

See more details on using hashes here.

File details

Details for the file django_tbot_mailing-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: django_tbot_mailing-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/21.8.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for django_tbot_mailing-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b997c002e44bf3d54c846b9d101c5071e91c0bebfcae739d3cdebfd6a1c4bb64
MD5 0dc6642e8fe987965e84114d44abeec3
BLAKE2b-256 5be7d6d12966564be62b0accb436c13ca2fdebaa6965cb351f7b2b65b64b0e39

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page