Questions tagged as 'django-admin'

0
answers

Modify admin form of Django

Is there any way to modify the structure of a Model's fields in the Django administrator? So that the fields (F000, F001, F010, FO11, F012) are displayed Horizontally     
asked by 26.05.2018 / 17:22
1
answer

How to generate a 'limit_choices' with the 'id' of a table previously selected in '/ admin'

I am using 'GenericForeigKey' to relate several models to only one, I have the following code: class IPuertoOptico(models.Model): nomenclatura = models.CharField(max_length=30) limit = models.Q(app_label='infrastructure', model='itarj...
asked by 01.09.2016 / 12:43
1
answer

How to display a menu only for users of a group in Django?

I'm doing a project with django and I have the following query in the admin of django I created the group "Volunteer", to which I gave permissions so you can manage dogs (create, modify, delete) Well now in the template, I have a button...
asked by 27.11.2018 / 17:41
1
answer

Get MAC in Django / python

I want to get the mac from a device, I'm importing: from uuid import getnode as get_mac mac = get_mac() print ('mac...>>>:',mac) However, it brings digits that do not correspond to a MAC (00: 00: 00: 00: 00: 00)     
asked by 14.06.2018 / 21:20
1
answer

Avoid repeated objects in the django database

I have a page that has a form where people can put a name, and create a profile. The problem is when several people try to put the same name, since it gives this error get() returned more than one Person What I'm trying to do is to avo...
asked by 04.08.2017 / 21:06
1
answer

Customize "verbose_name" for embedded administrators (admininline)

I have several models with foreign keys to other models, which embed in the administrator of that model using obviously admin.StakedInline , the problem is that the same model has up to two child models of the same type, so I have to embed...
asked by 27.05.2016 / 17:28
0
answers

Filter initial values of related models

I have the following model in Django: class Employee(models.Model): code = models.CharField(max_length=10, verbose_name='Codigo Empleado', default='N/A') name = models.CharField(max_length=50, verbose_name='Nombre') firstname = models.CharFiel...
asked by 04.12.2018 / 18:50
1
answer

django missing 1 required keyword-only argument: 'manager'

I have the following error when accessing the "Norma" model through the django administrator. " missing 1 required keyword-only argument: 'manager' " The complete error is as follows: Internal Server Error: /admin/norma/norma/ Traceback (...
asked by 12.12.2018 / 19:57
0
answers

Change admin by default of django but without redirecting the models to the default admin

I have a custom administrator, but when I click on a model, it redirects me to the default administrator django, so it would not make sense to do a custom admin, thanks for your collaboration. This is my custom admin is in myapp / admin.py, i...
asked by 24.09.2018 / 21:29
1
answer

Django: url error when saving a record from admin

I tell you my problem. I am deploying a web (Python 3.4 and Django 2.0.4), it has already saved data in several models from the admin panel logged in as superuser, but when I came to an app called About, with a model of the same name, I is ju...
asked by 14.09.2018 / 09:23