Fixed models, frontend start
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user