Welcome to Django Tasker Unisender’s documentation!

https://travis-ci.org/kostya-ten/django_tasker_unisender.svg?branch=master Documentation Status https://api.codacy.com/project/badge/Grade/9fe057e68937477aab1aebd907aa0913 Requirements Status https://badge.fury.io/py/django-tasker-unisender.svg

Requirements

  • Python 3.6+
  • A supported version of Django >= 2.0

Installation

You can get Django Tasker Unisender by using pip:

$ pip install django-tasker-unisender

To enable django_tasker_unisender in your project you need to add it to INSTALLED_APPS in your projects settings.py

INSTALLED_APPS = (
    # ...
    'django_tasker_unisender',
    # ...
)

Add to your settings.py

UNISENDER_API_KEY="<< YOU API KEY>>"

You can get the api key at this link

Add to your models.py

from django_tasker_unisender.models import EmailModel

class Subscribe(EmailModel):

    class UnisenderMeta:
        list_id = 123456789 # Your list id contact on Unisender

Migrate your project

python manage.py makemigrations
python manage.py migrate

Add to your admin.py

from django.contrib import admin
from . import models

class SubscribeAdmin(admin.ModelAdmin):
    list_display = ('email',)

admin.site.register(models.Subscribe, SubscribeAdmin)

Add users automatically

Automatically add users after registration

To do this, specify in the settings settings.py

UNISENDER_AUTO_LIST_ID="<< YOU LIST ID>>"

Attention

You must first create сontact lists

Indices and tables