Self hosted FLOSS fitness/workout, nutrition and weight tracker
Video licenses is now CC-BS-SA-4 and can't be edited
Roland Geider37d6b12802d5
diff --git a/wger/exercises/forms.py b/wger/exercises/forms.pyindex 5cfd2e992..3b8fa699a 100644--- a/wger/exercises/forms.py+++ b/wger/exercises/forms.py@@ -45,7 +45,6 @@ class ExerciseVideoForm(forms.ModelForm):fields = ('video','is_main',- 'license','license_author',)diff --git a/wger/exercises/views/videos.py b/wger/exercises/views/videos.pyindex 8039ae9a1..96ba4df80 100644--- a/wger/exercises/views/videos.py+++ b/wger/exercises/views/videos.py@@ -37,6 +37,7 @@ from django.views.generic import ()# wger+from utils.constants import DEFAULT_LICENSE_IDfrom wger.exercises.forms import (ExerciseImageForm,ExerciseVideoForm,@@ -101,6 +102,7 @@ class ExerciseVideoAddView("""Set the exercise base and the author"""exercise = get_object_or_404(Exercise, pk=self.kwargs['exercise_pk'])form.instance.exercise_base = exercise.exercise_base+ form.instance.license_id = DEFAULT_LICENSE_IDreturn super(ExerciseVideoAddView, self).form_valid(form)def get_success_url(self):diff --git a/wger/utils/constants.py b/wger/utils/constants.pyindex 062dc13ed..23c509474 100644--- a/wger/utils/constants.py+++ b/wger/utils/constants.py@@ -55,3 +55,6 @@ PAGINATION_PAGES_AROUND_CURRENT = 5# Minimum edit distance from all existing exercises for a new exercise submission# to be acceptedMIN_EDIT_DISTANCE_THRESHOLD = 2++# CC-BY-SA-4+DEFAULT_LICENSE_ID = 2