.
This commit is contained in:
@@ -270,6 +270,12 @@ class RapidCreateBase(LoginRequiredMixin, CreateView):
|
||||
model = Rapid
|
||||
form_class = RapidForm
|
||||
|
||||
# Sending user object to the form, to verify which fields to display/remove (depending on group)
|
||||
def get_form_kwargs(self):
|
||||
kwargs = super(RapidCreateBase, self).get_form_kwargs()
|
||||
kwargs.update({'user': self.request.user})
|
||||
return kwargs
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(RapidCreateBase, self).get_context_data(**kwargs)
|
||||
if self.request.POST:
|
||||
|
||||
Reference in New Issue
Block a user