-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.管理端-设备,新增
所属用户
字段,只有超级用户可以修改该字段。该字段是管理端的注册用户。
2.管理端-设备,超级用户可以查看所有设备,普通用户只能查看属于自己的设备 3.init.py脚本可选是否删除旧数据库,可选是否创建超级用户
- Loading branch information
Showing
4 changed files
with
74 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
general/migrations/0007_alter_mobile_options_mobile_user_alter_mobile_config_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Generated by Django 4.2.4 on 2024-04-04 12:31 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('general', '0006_auto_20230519_2004'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='mobile', | ||
options={'ordering': ('-updated_time',), 'verbose_name': '手机', 'verbose_name_plural': '手机'}, | ||
), | ||
migrations.AddField( | ||
model_name='mobile', | ||
name='user', | ||
field=models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='所属用户'), | ||
), | ||
migrations.AlterField( | ||
model_name='mobile', | ||
name='config', | ||
field=models.TextField(default='{"recorder_enable": false, "recorder_format": "mp4", "audio": true, "video_codec": "h264", "audio_codec": "aac", "audio_source": "output", "max_size": 720, "video_bit_rate": 800000, "audio_bit_rate": 128000, "max_fps": 25, "tunnel_forward": true, "crop": "", "control": true, "show_touches": false, "stay_awake": true, "video_codec_options": "profile=1,level=2", "audio_codec_options": "", "video_encoder": "", "audio_encoder": "", "power_off_on_close": false, "clipboard_autosync": false, "power_on": true}', help_text='配置视频分辨率,帧率等', verbose_name='配置详情'), | ||
), | ||
migrations.AlterField( | ||
model_name='video', | ||
name='config', | ||
field=models.TextField(default='{"recorder_enable": false, "recorder_format": "mp4", "audio": true, "video_codec": "h264", "audio_codec": "aac", "audio_source": "output", "max_size": 720, "video_bit_rate": 800000, "audio_bit_rate": 128000, "max_fps": 25, "tunnel_forward": true, "crop": "", "control": true, "show_touches": false, "stay_awake": true, "video_codec_options": "profile=1,level=2", "audio_codec_options": "", "video_encoder": "", "audio_encoder": "", "power_off_on_close": false, "clipboard_autosync": false, "power_on": true}', help_text='配置视频分辨率,帧率等', verbose_name='配置详情'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters