0
app/itam/forms/software/__init__.py
Normal file
0
app/itam/forms/software/__init__.py
Normal file
23
app/itam/forms/software/update.py
Normal file
23
app/itam/forms/software/update.py
Normal file
@ -0,0 +1,23 @@
|
||||
from django import forms
|
||||
from django.db.models import Q
|
||||
|
||||
from itam.models.software import Software
|
||||
|
||||
|
||||
class Update(forms.ModelForm):
|
||||
|
||||
class Meta:
|
||||
model = Software
|
||||
fields = [
|
||||
"name",
|
||||
'slug',
|
||||
'id',
|
||||
'organization',
|
||||
'is_global',
|
||||
'category',
|
||||
]
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
self.fields['is_global'].widget.attrs['disabled'] = True
|
Reference in New Issue
Block a user