Added all the functionality of app and admin
This commit is contained in:
@@ -68,16 +68,4 @@ class FaqsForm(forms.ModelForm):
|
||||
# "faq_category",
|
||||
"question",
|
||||
"answer",
|
||||
"active",
|
||||
]
|
||||
# labels = {"faq_category": "Category"}
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
instance = kwargs.get("instance")
|
||||
super().__init__(*args, **kwargs)
|
||||
# Fetch the choices for the faq_category field from the database
|
||||
# self.fields["faq_category"].queryset = FaqCategory.objects.all()
|
||||
|
||||
if instance is None:
|
||||
# This is an add operation, exclude the 'active' field
|
||||
self.fields.pop("active")
|
||||
Reference in New Issue
Block a user