24 lines
488 B
Python
24 lines
488 B
Python
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
|