views.py 696 B

123456789101112131415161718192021
  1. from django.shortcuts import render
  2. # Create your views here.
  3. from webgui.settings import APPLICATION_NAME
  4. from .models import ChannelSettings
  5. from .forms import ChannelSettingsForm
  6. def channel_settings(request, channel_id):
  7. print(ChannelSettings.objects.get(channel=channel_id))
  8. print(ChannelSettings.objects.get(channel=channel_id).interact)
  9. context = {
  10. 'title': 'Channel settings for ',
  11. 'icon': 'screwdriver',
  12. 'description': 'modify channel settings for ' + APPLICATION_NAME,
  13. 'keywords': 'settigns, channel',
  14. 'channel_settings': ChannelSettings.objects.get(channel=channel_id),
  15. 'form': ChannelSettingsForm,
  16. }
  17. return render(request, 'config/channel_settings.html', context)