(Django CBV) Need object be attached to a user with CBV
(Django CBV) Need object be attached to a user with CBV Question: I implemented this functionality with using FBV, but when I’m trying to use CBV, Objects were created with empty user field. views.py class BlockCreate(CreateView): model = TrainingBlock template_name = ‘training_room/create_block.html’ form_class = BlockForm success_url = reverse_lazy(‘gym’) def set_user(self, form): form.instance.user = self.request.user return …