diff options
| author | Bobby <[email protected]> | 2024-09-02 22:23:41 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2024-09-02 22:23:41 -0400 |
| commit | 7b83a134455ee94b600394d1eb4b6ca1588f2347 (patch) | |
| tree | 8706eef81c32025dffc09246e3ea15f40c44247f /user_profile | |
| parent | 763cc96fa2f38b2bf3109b036ba58320485c7de2 (diff) | |
| download | yugen-7b83a134455ee94b600394d1eb4b6ca1588f2347.tar.xz yugen-7b83a134455ee94b600394d1eb4b6ca1588f2347.zip | |
continue watching
Diffstat (limited to 'user_profile')
| -rw-r--r-- | user_profile/migrations/0002_userhistory_last_updated.py | 17 | ||||
| -rw-r--r-- | user_profile/models.py | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/user_profile/migrations/0002_userhistory_last_updated.py b/user_profile/migrations/0002_userhistory_last_updated.py new file mode 100644 index 0000000..476e1dd --- /dev/null +++ b/user_profile/migrations/0002_userhistory_last_updated.py @@ -0,0 +1,17 @@ +# Generated by Django 5.1 on 2024-09-03 01:24 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("user_profile", "0001_initial"), + ] + + operations = [ + migrations.AddField( + model_name="userhistory", + name="last_updated", + field=models.DateTimeField(auto_now=True), + ), + ] diff --git a/user_profile/models.py b/user_profile/models.py index 7b150d9..ecb6e0b 100644 --- a/user_profile/models.py +++ b/user_profile/models.py @@ -31,6 +31,7 @@ class UserHistory(models.Model): episode = models.IntegerField() time_watched = models.IntegerField(default=0) last_watched = models.BooleanField(default=False) + last_updated = models.DateTimeField(auto_now=True) def __str__(self): return f"{self.user.username} watched episode {self.episode} of anime {self.anime_id}" |
