From 525a62ab3a2bf3bc2ca2b7cbdf2dd574ec772d1a Mon Sep 17 00:00:00 2001 From: Faheedkhan Date: Sun, 29 Jun 2025 17:39:27 +0300 Subject: [PATCH] update --- inventory/forms.py | 11 ----------- inventory/urls.py | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/inventory/forms.py b/inventory/forms.py index 84278207..31328ab2 100644 --- a/inventory/forms.py +++ b/inventory/forms.py @@ -1273,17 +1273,6 @@ class OpportunityForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) - print(kwargs) - dealer = kwargs.pop('dealer', None) - print(dealer) - - # Apply filtering if a dealer is provided - if dealer: - # Assuming Car model has an 'entity' ForeignKey and Dealer has an 'entity' attribute - self.fields['car'].queryset = Car.objects.filter(entity=dealer.entity) - - # Assuming Lead model has an 'entity' ForeignKey and Dealer has an 'entity' attribute - self.fields['lead'].queryset = Lead.objects.filter(entity=dealer.entity) # Add a visible number input to display the current value self.fields["probability"].widget.attrs["class"] = ( "d-none" # Hide the default input diff --git a/inventory/urls.py b/inventory/urls.py index 2e95003c..b5469311 100644 --- a/inventory/urls.py +++ b/inventory/urls.py @@ -208,7 +208,7 @@ urlpatterns = [ path("notifications/fetch/", views.fetch_notifications, name="fetch_notifications"), path( - "/notifications/", + "notifications/", views.NotificationListView.as_view(), name="notifications_history", ),