mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-07-31 05:03:40 +00:00
format content (#198)
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
# Generated by Django 3.1.4 on 2020-12-01 07:12
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
@ -1,8 +1,8 @@
|
||||
# Generated by Django 3.1.4 on 2020-12-01 07:12
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -35,8 +35,6 @@ class Migration(migrations.Migration):
|
||||
),
|
||||
migrations.AddIndex(
|
||||
model_name="mediaaction",
|
||||
index=models.Index(
|
||||
fields=["session_key", "action"], name="actions_med_session_fac55a_idx"
|
||||
),
|
||||
index=models.Index(fields=["session_key", "action"], name="actions_med_session_fac55a_idx"),
|
||||
),
|
||||
]
|
||||
|
@ -1,6 +1,7 @@
|
||||
from django.db import models
|
||||
from users.models import User
|
||||
|
||||
from files.models import Media
|
||||
from users.models import User
|
||||
|
||||
USER_MEDIA_ACTIONS = (
|
||||
("like", "Like"),
|
||||
@ -30,15 +31,11 @@ class MediaAction(models.Model):
|
||||
help_text="for not logged in users",
|
||||
)
|
||||
|
||||
action = models.CharField(
|
||||
max_length=20, choices=USER_MEDIA_ACTIONS, default="watch"
|
||||
)
|
||||
action = models.CharField(max_length=20, choices=USER_MEDIA_ACTIONS, default="watch")
|
||||
# keeps extra info, eg on report action, why it is reported
|
||||
extra_info = models.TextField(blank=True, null=True)
|
||||
|
||||
media = models.ForeignKey(
|
||||
Media, on_delete=models.CASCADE, related_name="mediaactions"
|
||||
)
|
||||
media = models.ForeignKey(Media, on_delete=models.CASCADE, related_name="mediaactions")
|
||||
action_date = models.DateTimeField(auto_now_add=True)
|
||||
remote_ip = models.CharField(max_length=40, blank=True, null=True)
|
||||
|
||||
|
Reference in New Issue
Block a user