Commit 2a2afb06 authored by erdnaxe's avatar erdnaxe 🎇

Fix isbn widget

parent 626990b1
Pipeline #1447 passed with stage
in 3 minutes and 27 seconds
régler pq de permission sur app sporz : permettre d'afficher seulement nos gamesave à tout le monde
......@@ -19,8 +19,10 @@ class EmpruntForm(ModelForm):
class MediaAdminForm(ModelForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['isbn'].widget.template_name = "media/isbn_button.html"
self.fields['isbn'].widget.attrs.update({'autofocus': 'autofocus'})
isbn_field = self.fields.get('isbn')
if isbn_field:
isbn_field.widget.template_name = "media/isbn_button.html"
isbn_field.widget.attrs.update({'autofocus': 'autofocus'})
def download_data(self, isbn):
"""
......
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