обновил модель
This commit is contained in:
parent
c0e5ca5cb0
commit
3416b27eee
@ -1,8 +1,14 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from apps.workerslocation.models.model_voice_call import VoiceCall
|
||||
from apps.workerslocation.models.workers_locations import WorkersLocation
|
||||
|
||||
|
||||
@admin.register(WorkersLocation)
|
||||
class WorkersLocationAdmin(admin.ModelAdmin):
|
||||
list_display = ('abonent_id', 'latitude', 'longitude', 'velocity', 'radius', 'update_time',)
|
||||
|
||||
|
||||
@admin.register(VoiceCall)
|
||||
class VoiceCallAdmin(admin.ModelAdmin):
|
||||
pass
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
# Generated by Django 3.2.16 on 2024-10-30 05:04
|
||||
# Generated by Django 3.2.16 on 2024-11-01 03:52
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('pla', '0003_alter_alarm_id'),
|
||||
('workerslocation', '0002_workerslocation_active'),
|
||||
]
|
||||
|
||||
@ -16,7 +18,7 @@ class Migration(migrations.Migration):
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('created_at', models.DateField(auto_now_add=True)),
|
||||
('sent', models.BooleanField(default=False)),
|
||||
('filename', models.CharField(max_length=128)),
|
||||
('alarm_file', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='pla.alarm')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'вызов',
|
||||
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.2.16 on 2024-11-01 04:28
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('workerslocation', '0003_auto_20241101_0352'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='voicecall',
|
||||
name='created_at',
|
||||
field=models.DateTimeField(auto_now_add=True),
|
||||
),
|
||||
]
|
||||
@ -1,10 +1,13 @@
|
||||
from django.db import models
|
||||
|
||||
from apps.pla.models.model_alarm import Alarm
|
||||
|
||||
|
||||
class VoiceCall(models.Model):
|
||||
created_at = models.DateField(auto_now_add=True)
|
||||
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
sent = models.BooleanField(default=False)
|
||||
filename = models.CharField(max_length=128)
|
||||
alarm_file = models.ForeignKey(Alarm, on_delete=models.CASCADE)
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.created_at}'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user