Commit 6e544d61 authored by Benni Bärmann's avatar Benni Bärmann

just another broken version :(

parent a4c9e9e6
Pipeline #1578 failed with stage
in 6 minutes and 56 seconds
from dal import autocomplete
from django import forms
from django.conf import settings
from django.utils.timezone import now
from django.forms.models import ModelForm
from upload_validator import FileTypeValidator
from audiothek.models import Audiofile, RadioReport,\
ModerationSequenceSystemItem
from audiothek.processing import Recording
from audiothek.tasks import process_recording
from django.forms.models import ModelForm
class AudiofileFromRecordingForm(forms.ModelForm):
......@@ -28,13 +30,19 @@ class AudiofileFromRecordingForm(forms.ModelForm):
class RadioReportForm(forms.ModelForm):
# from django.utils.module_loading import import_string
from django.contrib import auth
# TODO: how to get every user here? settingg.AUTH_USER_MODEL tut nich
editor = forms.ModelChoiceField(queryset=auth.objects.all())
class Meta:
model = RadioReport
help_texts = {
'categories': 'Mehrfachauswahl und Abwahl mit STRG',
}
fields = (
'title', 'description', 'intro', 'outro', 'production_date', 'editor', 'tags',
'title', 'description', 'intro', 'outro', 'production_date', 'tags',
'license', 'type', 'categories'
)
widgets = {
......
......@@ -82,15 +82,15 @@ class RadioReport(models.Model, UserRoleMixin):
def creator(self, creator_user):
self.set_user(creator_user, 'creator')
@property
def editor(self):
return self.get_user('editor')
@editor.setter
def editor(self, ed):
self.set_user(ed, 'editor')
# RadioReport._meta.get_field('editor').help_text = 'Verantwortliche Redakteurin'
# RadioReport._meta.get_field('editor').verbose_name = 'Redakteurin'
# @property
# def editor(self):
# return self.get_user('editor')
#
# @editor.setter
# def editor(self, ed):
# self.set_user(ed, 'editor')
# # RadioReport._meta.get_field('editor').help_text = 'Verantwortliche Redakteurin'
# # RadioReport._meta.get_field('editor').verbose_name = 'Redakteurin'
class RadioReportRoles(UserRole):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment