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_delay_messages'
]

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.0.tar.gz (4.5 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.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django-tbot-mailing-0.1.0.tar.gz
  • Upload date:
  • Size: 4.5 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.0.tar.gz
Algorithm Hash digest
SHA256 333d8852c06fc300e2fa5ec206d167c05087de338808d7bf7be33f129816cac8
MD5 ad6945a0e87b093627c7518c69984779
BLAKE2b-256 a0567f8594c4eaa16eb4c33e3d40ab29b955f6d20aa97983df19013a5122a5b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_tbot_mailing-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63fb889f4117e53a2c59088eb4f23093efcc4f1b83f023becb1a2a9c516b004e
MD5 928d7bdffc00a9a9b0e817646f5cb3bd
BLAKE2b-256 837792735973198b2196255db2972a834eb0b7fdc7b590ecdc3aad84f521cd72

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