File tree Expand file tree Collapse file tree 3 files changed +48
-2
lines changed
Expand file tree Collapse file tree 3 files changed +48
-2
lines changed Original file line number Diff line number Diff line change 1+ # Generated by Django 4.2.18 on 2025-02-06 14:55
2+
3+ from django .db import migrations , models
4+ import django .db .models .deletion
5+
6+
7+ class Migration (migrations .Migration ):
8+
9+ dependencies = [
10+ ("tournesol" , "0061_comparisoncriteriascore_score_max_and_more" ),
11+ ("twitterbot" , "0003_tweetinfo_atproto_uri_alter_tweetinfo_tweet_id" ),
12+ ]
13+
14+ operations = [
15+ migrations .AlterField (
16+ model_name = "tweetinfo" ,
17+ name = "bot_name" ,
18+ field = models .CharField (
19+ blank = True ,
20+ choices = [
21+ ("@TournesolBot" , "@TournesolBot" ),
22+ ("@TournesolBotFR" , "@TournesolBotFR" ),
23+ ],
24+ help_text = "Name of the bot" ,
25+ max_length = 200 ,
26+ null = True ,
27+ ),
28+ ),
29+ migrations .AlterField (
30+ model_name = "tweetinfo" ,
31+ name = "datetime_tweet" ,
32+ field = models .DateTimeField (
33+ auto_now_add = True , help_text = "Time when the video was posted" , null = True
34+ ),
35+ ),
36+ migrations .AlterField (
37+ model_name = "tweetinfo" ,
38+ name = "video" ,
39+ field = models .ForeignKey (
40+ help_text = "Posted video" ,
41+ on_delete = django .db .models .deletion .CASCADE ,
42+ related_name = "tweets" ,
43+ to = "tournesol.entity" ,
44+ ),
45+ ),
46+ ]
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class TweetInfo(models.Model):
5353 )
5454
5555 def __str__ (self ):
56- return f"{ self .video .uid } tweeted at { self .datetime_tweet } "
56+ return f"{ self .video .uid } posted at { self .datetime_tweet } "
5757
5858 @property
5959 def tweet_url (self ):
Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ def generate_top_contributor_figure(top_contributors_qs, language="en") -> Path:
271271 return figure_path
272272
273273
274- def tweet_top_contributor_graph (bot_name , dest : list [ str ], assumeyes = False ):
274+ def tweet_top_contributor_graph (bot_name , dest : Literal [ "twitter" , "bluesky" ], assumeyes = False ):
275275 """Tweet the top contibutor graph of last month.
276276
277277 Args:
You can’t perform that action at this time.
0 commit comments