Fully functional. FrontEnd remains
This commit is contained in:
10
smartsoltech/web/forms.py
Normal file
10
smartsoltech/web/forms.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from django import forms
|
||||
from .models import Order, Project
|
||||
class ProjectForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Project
|
||||
fields = '__all__'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.fields['order'].queryset = Order.objects.filter(status='completed', project__isnull=True)
|
||||
Reference in New Issue
Block a user