diff --git a/source/config/templates/config/restream_confirm_delete.html b/source/config/templates/config/restream_confirm_delete.html index dca1062..8ce7461 100644 --- a/source/config/templates/config/restream_confirm_delete.html +++ b/source/config/templates/config/restream_confirm_delete.html @@ -2,6 +2,13 @@ {% load i18n %} {% load bootstrap4 %} {% load fontawesome_5 %} + +{% block 'sidenav' %} + {% with 'restream' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + {% block 'content' %}
{% trans "confirm_delete_header" %}

diff --git a/source/config/templates/config/restream_detail.html b/source/config/templates/config/restream_detail.html index 71fe04d..e48106c 100644 --- a/source/config/templates/config/restream_detail.html +++ b/source/config/templates/config/restream_detail.html @@ -6,6 +6,13 @@ {% get_obj_perms user for object as "obj_perms" %} + +{% block 'sidenav' %} + {% with 'restream' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + {% block 'content' %}
diff --git a/source/config/templates/config/restream_form.html b/source/config/templates/config/restream_form.html index 9a709db..2922ca6 100644 --- a/source/config/templates/config/restream_form.html +++ b/source/config/templates/config/restream_form.html @@ -1,6 +1,13 @@ {% extends 'base.html' %} {% load i18n %} {% load bootstrap4 %} + +{% block 'sidenav' %} + {% with 'restream' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + {% block 'content' %}
{% trans "create_new_restream_configuration_header" %}

diff --git a/source/config/templates/config/restream_list.html b/source/config/templates/config/restream_list.html index 44fe88d..e462103 100644 --- a/source/config/templates/config/restream_list.html +++ b/source/config/templates/config/restream_list.html @@ -4,6 +4,13 @@ {% load bootstrap4 %} {% load fontawesome_5 %} + +{% block 'sidenav' %} + {% with 'restream' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + {% block 'content' %}
diff --git a/source/config/templates/config/restream_update_form.html b/source/config/templates/config/restream_update_form.html index c107824..a556be9 100644 --- a/source/config/templates/config/restream_update_form.html +++ b/source/config/templates/config/restream_update_form.html @@ -1,6 +1,13 @@ {% extends 'base.html' %} {% load i18n %} {% load bootstrap4 %} + +{% block 'sidenav' %} + {% with 'restream' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + {% block 'content' %}
{% trans "update_restream_configuration_header" %}

diff --git a/source/config/templates/config/stream_confirm_delete.html b/source/config/templates/config/stream_confirm_delete.html index f7e9763..aa11eac 100644 --- a/source/config/templates/config/stream_confirm_delete.html +++ b/source/config/templates/config/stream_confirm_delete.html @@ -2,6 +2,13 @@ {% load i18n %} {% load bootstrap4 %} {% load fontawesome_5 %} + +{% block 'sidenav' %} + {% with 'stream' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + {% block 'content' %}
{% trans "confirm_delete_header" %}

diff --git a/source/config/templates/config/stream_detail.html b/source/config/templates/config/stream_detail.html index 4352d6b..72d6a42 100644 --- a/source/config/templates/config/stream_detail.html +++ b/source/config/templates/config/stream_detail.html @@ -7,6 +7,12 @@ {% get_obj_perms user for object as "obj_perms" %} +{% block 'sidenav' %} + {% with 'stream' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + {% block 'content' %}
diff --git a/source/config/templates/config/stream_form.html b/source/config/templates/config/stream_form.html index 0983e10..0d68ab7 100644 --- a/source/config/templates/config/stream_form.html +++ b/source/config/templates/config/stream_form.html @@ -1,6 +1,13 @@ {% extends 'base.html' %} {% load i18n %} {% load bootstrap4 %} + +{% block 'sidenav' %} + {% with 'stream' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + {% block 'content' %}
{% trans "create_new_stream_configuration_header" %}

diff --git a/source/config/templates/config/stream_update_form.html b/source/config/templates/config/stream_update_form.html index 9b6de21..aa192ed 100644 --- a/source/config/templates/config/stream_update_form.html +++ b/source/config/templates/config/stream_update_form.html @@ -1,6 +1,13 @@ {% extends 'base.html' %} {% load i18n %} {% load bootstrap4 %} + +{% block 'sidenav' %} + {% with 'stream' as section %} + {{ block.super }} + {% endwith %} +{% endblock %} + {% block 'content' %}
{% trans "update_stream_configuration_header" %}

diff --git a/source/config/views.py b/source/config/views.py index 3ddf771..b16b255 100644 --- a/source/config/views.py +++ b/source/config/views.py @@ -75,11 +75,7 @@ class StreamDetail(DetailView): class StreamChange(UpdateView): model = models.Stream template_name_suffix = '_update_form' - - def get_form_kwargs(self): - kwargs = super().get_form_kwargs() - kwargs['user'] = self.request.user - return kwargs + fields = ['name'] @method_decorator(login_required, name='dispatch') diff --git a/source/rtmp/migrations/0006_alter_application_options_alter_application_name_and_more.py b/source/rtmp/migrations/0006_alter_application_options_alter_application_name_and_more.py deleted file mode 100644 index 4ca45e8..0000000 --- a/source/rtmp/migrations/0006_alter_application_options_alter_application_name_and_more.py +++ /dev/null @@ -1,49 +0,0 @@ -# Generated by Django 5.0.2 on 2024-02-25 13:49 - -import django.db.models.deletion -import uuid -from django.db import migrations, models - - -class Migration(migrations.Migration): - dependencies = [ - ("rtmp", "0005_auto_20200531_0951"), - ] - - operations = [ - migrations.AlterModelOptions( - name="application", - options={ - "verbose_name": "application_verbose_name", - "verbose_name_plural": "application_verbose_name_plural", - }, - ), - migrations.AlterField( - model_name="application", - name="name", - field=models.CharField( - help_text="rtmp_application_name", max_length=100, unique=True - ), - ), - migrations.AlterField( - model_name="stream", - name="application", - field=models.ForeignKey( - help_text="stream_application_help", - on_delete=django.db.models.deletion.CASCADE, - to="rtmp.application", - ), - ), - migrations.AlterField( - model_name="stream", - name="name", - field=models.CharField(help_text="stream_name_help", max_length=100), - ), - migrations.AlterField( - model_name="stream", - name="stream", - field=models.UUIDField( - default=uuid.uuid4, help_text="stream_stream_help", unique=True - ), - ), - ] diff --git a/source/rtmp/migrations/0007_alter_application_options_alter_application_name_and_more.py b/source/rtmp/migrations/0007_alter_application_options_alter_application_name_and_more.py deleted file mode 100644 index 76bc7b5..0000000 --- a/source/rtmp/migrations/0007_alter_application_options_alter_application_name_and_more.py +++ /dev/null @@ -1,39 +0,0 @@ -# Generated by Django 5.0.2 on 2024-02-25 20:26 - -import django.db.models.deletion -import uuid -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('rtmp', '0006_alter_application_options_alter_application_name_and_more'), - ] - - operations = [ - migrations.AlterModelOptions( - name='application', - options={'verbose_name': 'RTMP application', 'verbose_name_plural': 'RTMP applications'}, - ), - migrations.AlterField( - model_name='application', - name='name', - field=models.CharField(help_text='RTMP application name', max_length=100, unique=True), - ), - migrations.AlterField( - model_name='stream', - name='application', - field=models.ForeignKey(help_text='Application which the stream is assigned to', on_delete=django.db.models.deletion.CASCADE, to='rtmp.application'), - ), - migrations.AlterField( - model_name='stream', - name='name', - field=models.CharField(help_text='Name for this stream', max_length=100), - ), - migrations.AlterField( - model_name='stream', - name='stream', - field=models.UUIDField(default=uuid.uuid4, help_text='Stream ID for this stream', unique=True), - ), - ] diff --git a/source/templates/base.html b/source/templates/base.html index ced650f..4aca709 100644 --- a/source/templates/base.html +++ b/source/templates/base.html @@ -33,17 +33,6 @@