configurable bot token

This commit is contained in:
2019-01-19 09:52:00 +03:00
parent 33ff1b800b
commit 999c6af8e7
20 changed files with 154 additions and 60 deletions

View File

@@ -3,8 +3,8 @@ from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelatio
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils import timezone
from picklefield import PickledObjectField
from telebot import TeleBot
from yamlfield.fields import YAMLField
from feeds.tasks import execute_feed
@@ -15,7 +15,7 @@ class Feed(models.Model):
chat_id = models.CharField(max_length=33)
check_interval = models.DurationField(help_text='in seconds')
last_check = models.DateTimeField(null=True, blank=True)
last_id = PickledObjectField(null=True, blank=True)
last_id = YAMLField(null=True, blank=True)
lock = models.BooleanField(default=False)
config_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)