Questions tagged as 'django'

0
answers

Django queryset without models

I need to make queries to the database ( postgresql ) but the tables I want to consult were created by pandas so I do not have a model to refer to, how do I do queries without models?     
asked by 14.09.2017 / 20:22
1
answer

administrator of django custom actions

I'm trying to do an action for the Django-admin (trying because I'm new to this), but I can not get it to appear in the dropdown that says "Delete Selected Data / s" My goal is to import the data of a file previously uploaded with FileFiel...
asked by 18.08.2017 / 14:35
1
answer

Retrieve objects from a model in django

I have the following related models. class Puesto(models.Model): nombre_depto = models.CharField(max_length=30) clave_depto = models.CharField(max_length=30) descripcion = models.CharField(max_length=30) class Persona(models.Model): nombre =...
asked by 17.08.2017 / 07:58
2
answers

Optimize query in Django for Datatables

The project uses MySql as a database engine, it makes me slow to show one of all the records in a table that contains about 1500 records. To send the data to the template I use a ListView in the view and in the template I use a Datatables to...
asked by 10.08.2017 / 10:37
1
answer

Chrome stops requesting localhost

I'm having a very bad problem with a site on Django, running on apache on a windows 7 32 bit. The site always runs on localhost via chrome in kiosk mode but has internet connection via wifi. The problem is that, the pages have buttons whic...
asked by 09.08.2017 / 01:40
0
answers

Progress bar in Django

Good evening I am developing an app in Django 1.10, using the Bootstrap framework. In my app I have a view where some reports are generated, which usually take a few seconds for the number of records that I manage in the database, what I would l...
asked by 30.07.2017 / 04:31
2
answers

Create user Administrator using a view

I am currently taking a project that is very advanced and I am also new to django. I would like to know in what way I can add a user as an administrator from view, normally the developers who started the project did it from the python shell I...
asked by 02.08.2017 / 20:25
1
answer

Queries nested in Django

Good afternoon I need an example of nested queries in Django 1.11 using OuterRef(OuterRef('pk')) Thanks in advance     
asked by 29.07.2017 / 23:53
0
answers

How to access the value of an input in the Django admin

I have a model that is managed by the admin of django, in admin.py and create a method that adds some model fields to the property readonly_fields when the object has already been created, so when I entered to modify the object I the fields appe...
asked by 27.07.2017 / 19:40
1
answer

Decorator Django

Good afternoon, I am implementing the @login_required decorator in my application (which can only be accessed if they are authenticated) views.py @login_required(login_url="/usuarios/login") def index(request): return render(request,...
asked by 06.07.2017 / 19:46