User session tracking #93587
@ -17,19 +17,8 @@ class Migration(migrations.Migration):
|
||||
name='UserSession',
|
||||
fields=[
|
||||
('id', models.BigAutoField(primary_key=True, serialize=False)),
|
||||
('agent_is_trusted', models.BooleanField(default=False)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('last_active_at', models.DateTimeField()),
|
||||
('ip', models.GenericIPAddressField(blank=True, null=True)),
|
||||
('user_agent', models.CharField(blank=True, max_length=255)),
|
||||
(
|
||||
'session',
|
||||
models.OneToOneField(
|
||||
editable=False,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to='sessions.session',
|
||||
),
|
||||
),
|
||||
(
|
||||
'user',
|
||||
models.ForeignKey(
|
||||
@ -38,6 +27,17 @@ class Migration(migrations.Migration):
|
||||
to=settings.AUTH_USER_MODEL,
|
||||
),
|
||||
),
|
||||
('agent_is_trusted', models.BooleanField(default=False)),
|
||||
('ip', models.GenericIPAddressField(blank=True, null=True)),
|
||||
(
|
||||
'session',
|
||||
models.OneToOneField(
|
||||
editable=False,
|
||||
on_delete=django.db.models.deletion.CASCADE,
|
||||
to='sessions.session',
|
||||
),
|
||||
),
|
||||
('user_agent', models.CharField(blank=True, max_length=255)),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user