Questions tagged as 'django-admin'

3
answers

Use of def __unicode __ (self):

Use Django 1.9. I have two models related to each other, one contains an id and name among other attributes and the other contains its own id along with the id of the first model: class Televisor(models.Model): idTelevisor = models.AutoFie...
asked by 10.02.2016 / 02:44
1
answer

Modifying some Django admin behaviors regarding their generated forms

I have a model which I am manipulating through the Django administrator. The model and "its business logic" requires me to establish a specific behavior regarding its form to enter data. What I need to do is the following: I have the follo...
asked by 01.02.2016 / 22:24
1
answer

How to relate an 'Object' to several 'Objects' Foreigkey

Asking for your support again, I am making an application to inventory the electrical and optical ports of various equipment, and it is not clear to me how to relate a model with several models. I have the following two objects: class ITarj...
asked by 20.08.2016 / 11:59
1
answer

MultiUpload Django Admin

I have a django project in which from the admin I can upload photos one at a time, now, I want to upload more than one for the same element (database registration) and I would like to know what is the way less traumatic and easy, since it is usu...
asked by 26.09.2016 / 12:51
1
answer

Error saving ForeingKey with Post_save in User profile

I am creating the user profile with post_save signal , but I have a field foreign key that It's not being saved, and I do not see any way to solve it. I did it like this: All this from the django admin.    The error is: 1048, "Column...
asked by 13.10.2016 / 17:22
2
answers

Reverse Queryset on Django models

I'm trying to access a model in reverse. To access the Vale model by consulting the model DetailVale is as follows: val= DetalleVale.objects.filter(vale__usuarioVale=usuario).filter(vale__statusFinalizado=1) However I need to consult about...
asked by 06.02.2018 / 22:14
1
answer

How to add a value from one table to another table with django

The point is to make an accounting entry. I'm using the admin of django and when I create a seat I must use two accounts (which already exist in the table account) and those add or subtract the value that entered the seat (total), the thing is t...
asked by 27.02.2017 / 06:21
2
answers

can not import name commit_on_success, Mockups in django 1.9

I installed Mockups in django 1.9, initially I sent the error: ImportError for import_module and I solved it with: link now I get another import error: File "/home/alejandro/django190/local/lib/python2.7/site-packages/mockups/management/comm...
asked by 31.08.2016 / 04:57
1
answer

Handling fields (multiple selections) with values that depend on a value in a previous field - Django

I want to make a form where the values of a particular field depend on a selected value in a previous field. The idea is that both fields must be of multiple selection. I was working with django-smart-selects , but I had these two drawbacks...
asked by 02.03.2016 / 21:11
0
answers

How to update via AJAX an attribute of a model from the django administrator?

Currently I have a problem with the calculation of a value of a model from a database. The calculation is done every time a record is saved or updated but now I must do that calculation in real time and show it before I save the record from the...
asked by 13.11.2018 / 20:42