FUCK LINTERS TEST (ERDNAXE C'EST RELOUUU)
This commit is contained in:
parent
2753f700a6
commit
ff224d20cd
|
@ -104,7 +104,7 @@ class MediaAdminForm(ModelForm):
|
||||||
|
|
||||||
if self.cleaned_data['title']:
|
if self.cleaned_data['title']:
|
||||||
self.cleaned_data['title'] = re.sub(r'\(AUT\) ',
|
self.cleaned_data['title'] = re.sub(r'\(AUT\) ',
|
||||||
'', self.cleaned_data['title'])
|
'', self.cleaned_data['title'])
|
||||||
|
|
||||||
if self.cleaned_data['authors']:
|
if self.cleaned_data['authors']:
|
||||||
authors = self.cleaned_data['authors']
|
authors = self.cleaned_data['authors']
|
||||||
|
@ -112,8 +112,8 @@ class MediaAdminForm(ModelForm):
|
||||||
|
|
||||||
def sort(author):
|
def sort(author):
|
||||||
return str(-author.note) + "." \
|
return str(-author.note) + "." \
|
||||||
+ str(old_authors.index(author)) \
|
+ str(old_authors.index(author)) \
|
||||||
+ "." + author.name
|
+ "." + author.name
|
||||||
|
|
||||||
authors.sort(key=sort)
|
authors.sort(key=sort)
|
||||||
author_name = self.cleaned_data['authors'][0].name
|
author_name = self.cleaned_data['authors'][0].name
|
||||||
|
@ -132,9 +132,9 @@ class MediaAdminForm(ModelForm):
|
||||||
|
|
||||||
if self.cleaned_data['subtitle']:
|
if self.cleaned_data['subtitle']:
|
||||||
self.cleaned_data['subtitle'] = re.sub(r'</span>',
|
self.cleaned_data['subtitle'] = re.sub(r'</span>',
|
||||||
'', self.cleaned_data['subtitle'])
|
'', self.cleaned_data['subtitle'])
|
||||||
self.cleaned_data['subtitle'] = re.sub(r'<span.*>',
|
self.cleaned_data['subtitle'] = re.sub(r'<span.*>',
|
||||||
'', self.cleaned_data['subtitle'])
|
'', self.cleaned_data['subtitle'])
|
||||||
start = self.cleaned_data['subtitle'].split(' ')[0] \
|
start = self.cleaned_data['subtitle'].split(' ')[0] \
|
||||||
.replace('.', '')
|
.replace('.', '')
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue