class PermisoUpdateView(UpdateView):
model = Permiso
second_model = Users
template_name = 'plantillas/permisos_update.html'
form_class = Permiso_update
second_form_class = Users_up
def get_context_data(self, **kwargs):
context =super(PermisoUpdateView, self).get_context_data(**kwargs)
pk = self.kwargs.get('pk', 0)
p = self.model.objects.get(id=pk)
u = self.second_model.object.get(id=p.pk)
if 'form' not in context:
context['form'] = self.form_class()
if 'form2' not in context: