Fixed models, frontend start

This commit is contained in:
Manuel Hude
2021-05-04 09:35:01 +02:00
parent b05df288d2
commit e252e07179
4 changed files with 20 additions and 12 deletions
+2 -2
View File
@@ -22,6 +22,6 @@ class FeedEntry(models.Model):
class Tweet(models.Model):
feed = models.ForeignKey(Feed, null=True, on_delete=models.SET_NULL)
text = models.CharField(max_length=137)
text = models.CharField(max_length=500)
date_time = models.DateTimeField()
url = models.CharField(max_length=100)
url = models.CharField(max_length=500)
+2 -2
View File
@@ -46,12 +46,12 @@ class twitter_bot(threading.Thread):
# preparing tweet
new_tweet = Tweet()
new_tweet.icon = None
new_tweet.feed = feed
new_tweet.text = current.title
if 'published' in current:
new_tweet.date_time = parser.parse(current.published)
elif 'upddated' in current:
elif 'updated' in current:
new_tweet.date_time = parser.parse(current.updated)
else:
new_tweet.date_time = datetime.now()