Questions tagged as 'django'

0
answers

Django + IIS ERROR 500

I'm trying to put my project into production with IIS, following this tutorial but when I start the IIS I get the following error: Error occurred while reading WSGI handler: Traceback (most recent call last): File "c:\users\e10136\appdat...
asked by 27.03.2018 / 13:39
1
answer

Create a graphical tree of directories and files in python

Greetings I would like to get a graphic type tree from my folders and their respective files with python I currently have the following code: rootDir = 'media/gestionDocumental/' directorioArr=[] for dirName, subdirList, fileList in o...
asked by 04.04.2018 / 16:16
1
answer

Timezone works locally, but not in pythonanywhere (DJango)

I have a queryset that lists all sales today: from django.utils import timezone class VentaToday(ListView): queryset = Venta.objects.filter(fecha=timezone.now()).order_by('-id') template_name = 'venta/venta_today.html' In local,...
asked by 24.03.2018 / 15:08
0
answers

Limit the entries in the models.ForeignKey ()

Is it possible to limit the entries in models.ForeignKey () to an exact amount? I have a model called a Card that belongs to a Profile, I want each profile to have a maximum of 2 cards. class Tarjeta(models.Model): perfil = models.OneTo...
asked by 22.03.2018 / 17:47
1
answer

Add total column with django-filter and paged (Django)

It is possible to add the columns of totals from django so that for example, it brings me the total of all the sales but ignores the pagination when adding the values. This is my model: class Venta(models.Model): cliente = models.Char...
asked by 19.03.2018 / 21:10
0
answers

DPI-1047: 64-bit Oracle Client library can not be loaded - Django & Windows Server 2012 R2

I am running a Django application in Windows Server R2 which makes connections to an Oracle Database, however when the queries are made from the page it shows me the following Error: DatabaseError Exception Value: DPI-1047: 64-bit Oracle...
asked by 29.03.2018 / 00:22
1
answer

Reinitialize DATATABLE with the help of jquery ajax and a .txt

I'm here with the mission of modifying the values of a DATATABLE by clicking on a button created in the html with help also of bootstrap (possibly not has to see but at least to have it under consideration). I'm working with python and djan...
asked by 12.03.2018 / 16:06
1
answer

Doubt at ORM Django

I receive a csv daily which I import to Mariadb and clean the fields with SQL statements for example in the column mark if "SANSUN" comes with an UPDATE I correct it to "SAMSUNG" and so on with hundreds and hundreds of sentences until correct th...
asked by 15.03.2018 / 17:32
0
answers

What python library supports Authentication of 2 factors in a django rest framework application that uses OAuth?

I have an application in Django Rest Framework that uses OAuth for authentication flows. I need a library that implements two-factor authentication (2FA) and integrates with OAuth. I thought of Deux, but it is no longer supported. Any ideas? Tha...
asked by 09.03.2018 / 19:55
0
answers

How can routes be protected when generating a pdf with wkhtmltopdf-django using a POST method?

I need to generate a pdf for which I use a class with a get method, I need to protect the address generated by this pdf, using a post method or something that allows me to hide the address or parameters that I pass. What can I do? class PDF4(L...
asked by 09.03.2018 / 18:01