You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from .formsimportLeadCreationModelFormclassLeadCreateView(OrganizerLoginRequiredMixin, CreateView):
template_name="leads/lead_create.html"form_class=LeadCreationModelFormdefget_form_kwargs(self, **kwargs):
kwargs=super().get_form_kwargs(**kwargs)
kwargs.update({
"request": self.request
})
returnkwargsdefget_success_url(self) ->str:
returnreverse("leads:lead-list")
defform_valid(self, form):
lead=form.save(commit=False)
lead.organization=self.request.user.userprofilelead.save()
# TODO send emailsend_mail(
subject="A lead has been created",
message="Go to the site to see the new lead",
from_email="test@test.com",
recipient_list=["test2@test.com"]
)
messages.success(self.request, "You have successfully created a lead")
returnsuper(LeadCreateView, self).form_valid(form)
The form of the
LeadCreateView
is bugged.It provides access to all the
agents
, including those from other organizations (created by other organizer users).fullscreen
The text was updated successfully, but these errors were encountered: