Questions tagged as 'django-admin'

1
answer

Problem reconfiguring Nginx for SSL with self-signed certificate

I have a VPS on Digital Ocean with Ubuntu 18.04, Nginx, Gunicorn, Django, and a test web application, all configured (ufw) to work with http: 80. Everything works perfectly. Tutorial Now I modify the file / sites-available / LibrosWeb to...
asked by 03.09.2018 / 22:28
0
answers

ConnectionAbortedError, AttributeError: Django

I am running an application in console with the command python manage.py runserver The application works well, the queries are correct, etc. However, it shows me the following exceptions: ConnectionAbortedError: [WinError 10053] Se ha anula...
asked by 08.08.2018 / 17:02
1
answer

Django ManyToManyFiled how to add 2 objects of the same type to a model

I'm doing an inventory of tools, and I want to have a way to create a tool cart where I can add repeated tools. Example (Add to the cart two cutters of the same type). I have a table called Item This table contains all the common fields of...
asked by 17.07.2018 / 23:26
1
answer

Queryset with 2 fields of a table - Django Rest Framework

I want to make a filter with 2 fields of the user model of django first_name and last_name In this way: queryset = User.objects.annotate(search_name=Concat('first_name', Value(' '), 'last_name')) queryset.filter(search_name__icontains='Pru...
asked by 30.06.2018 / 19:23
1
answer

Get MAC in Django / python from a Device that accesses a certain URL

I want to get the mac from a device when the device runs or accesses the URL: 127.0.0.1/Response, which is defined in URLs such as: url (r '^ answer $', app.views.resviewViewiew, name = 'Reply'), from uuid import getnode as get_mac def respue...
asked by 15.06.2018 / 21:10
0
answers

Django-Login administrative interface with SSH

Although there is a Django package to do a two-factor authentication: Django Two-Factor Authentication I do not like having to depend on a mobile device to receive a code, so I consider using SSH using PuTTY by adding a command that can...
asked by 12.06.2018 / 14:17
0
answers

Filter values of a field from a list [...] - Query Django

class Grupos(models.Model): grupo = models.CharField(max_length=300) familia =models.CharField(max_length=300) fg = models.CharField(max_length=300) status=models.IntegerField(defaul...
asked by 27.05.2018 / 05:27
0
answers

Enable search engine, import and export Excel buttons in Admin Django

I have the following code in the admin.py #Aparated 1 implements a search engine in the admin #Apart 2 and 3 Implement export and import options The search engine is correctly displayed in the admin of django, but when I add sections 2 and 3,...
asked by 02.02.2018 / 18:15
0
answers

How to validate the form and show the user's data?

views.py from django.shortcuts import render from django.template import loader, Context from django.core import serializers from django.views.generic import TemplateView from django.shortcuts import redirect,render_to_response from django.htt...
asked by 12.02.2018 / 22:07
1
answer

how would I do to know if a field of a model in django has been updated?

I have a model in Django in which I need to validate if a specific field has been updated, based on that I will perform an action, I would appreciate your help. the field that I want to validate is to assign, I just need to capture its value to...
asked by 25.01.2018 / 17:01