Questions tagged as 'django-forms'

1
answer

Store the id of the object in a manytomany field

I have a user model in django with a field: wallets = models.ManyToManyField(Wallet) and a Wallet object with other fields. I currently store the names of the Wallets objects assigned to the user in the user's wallets field. How can I store...
asked by 15.07.2018 / 15:26
0
answers

How to insert id in csv reading with DJango

I have the following question, in which way I can insert an id that I have obtained from another table, in reading a .csv file, which I am importing into my database with the django-import-export library. I have the code in the following way...
asked by 16.07.2018 / 17:57
0
answers

error formset Django

I am editing a product form in which I want to replace several sizes in a product. If you have created 5 and when updating the pass 1 single form returns this error:    MultiValueDictKeyError at / edit-article-boutique / test /       "'sizes...
asked by 16.07.2018 / 10:45
0
answers

reorder formset Django

I have a problem editing a formset that I am using to create several forms and link them to the same object. Models class Tallaje(models.Model): id = models.BigAutoField(primary_key = True) nombre = models.CharField(max_length = 20,...
asked by 11.07.2018 / 12:21
0
answers

Data entry form with Django

Someone can help me, I have the following model: class Citas2(models.Model): laboratorio = models.CharField(max_length=10, default=LABORATORIO_1, null=True) paciente = models.ForeignKey(Pacientes, on_delete=models.CASCADE) doctor =...
asked by 12.07.2018 / 19:20
0
answers

Retrieve record in a DATATABLE to be able to edit it - Django

I have a form in which the following data is recorded: ORIGEN , CANTIDAD , DEFECTO , COMPONENTE , COMENTARIO and% DATATABLE a ITEM is selected. Once the information is captured, the record is saved...
asked by 16.07.2018 / 23:20
0
answers

How can I use Form Wizard in Model Forms with django?

I want in the same template to capture 3 different forms through a step by step (steps). I did it initially with dividing the forms to capture, but I keep losing info of the first, or second step ... I was looking at something from Form Wizard i...
asked by 15.06.2018 / 16:31
0
answers

Capture a select value in a view of django

I do not know how to capture the value of a select from a form created from a ModelForm. in the template: <div class="form-group"> <label for="{{formulario.cod_sucursal.id_for_label}}"> {{formulario.cod_sucursal.label}}</labe...
asked by 05.06.2018 / 22:06
0
answers

How to pass more than one argument to a function from the Django plate?

Normally I use the form that is shown in the documentation in my case it would be like this    {% url 'student: make_theory' temario.pk%} and so it works well, the problem is that I want to pass in addition to temario.pk the current time...
asked by 29.05.2018 / 13:15
1
answer

UpdateView django

Hi, I would like to know if I can paginate a Django UpdateView as I can do it. I have the following code but I do not know how I can paginate it. class RoutingForAniGroupUpdate(UpdateView): model = RoutingForAniGroup template_name = '...
asked by 08.06.2018 / 00:20