Questions tagged as 'django'

1
answer

change value of a datetimeWidget from JQuery

I create a DateTimeField with Django in the following way: start_date_edited = forms.DateTimeField(label="Fecha inicio", widget=DateTimeWidget(usel10n=True, bootstrap_version=3), required=False) That creates a field where to enter a date, w...
asked by 11.02.2018 / 22:12
0
answers

Configure the manage.py and settings.py files correctly in a web project

I am developing a scientific web project in django and although my web works, I must have something wrong configured in the manage.py and settings.py files. If you can help me and tell me what changes I should make in these files, it would be ve...
asked by 05.02.2018 / 11:39
0
answers

Bug Update Django Formsets

I am trying to modify a sale in which I have this view: views.py class VentaUpdate(UpdateView): model = Venta template_name = 'venta/venta_form.html' form_class = VentaForm success_url = reverse_lazy('venta:ventas_listar') def get_context_...
asked by 05.02.2018 / 18:27
0
answers

insert in database that is not the default DJANGO

I know that django works with multiple database connections, I need to insert into a database that is not the default, but I get the following error. ProgrammingError at /api-jde/f59presapi/2279/ (1146, 'Table \'dblocal."oracle"."FPRES"\' does...
asked by 01.02.2018 / 02:55
0
answers

Pass data from Django to PHP

Good morning. I am trying to connect an application in Django to a PHP plugin in a payment gateway. My call is very simple: return redirect('http://localhost/pagos/pago.php'{'pedido':pedido.id,'tarjeta':tarjeta}) But the PHP plugin do...
asked by 01.02.2018 / 13:17
1
answer

expected an indented block (views.py, line 12)

I am making a connection to Sql Server with PYODBC From the console if it connects me and everything but when I do it from the project I see several errors that I have solved, but with this I could not solve it Could someone guide me? Envi...
asked by 28.04.2018 / 21:01
0
answers

Accept X-CSRFTOKEN XAMPP Django

Good morning: I am trying to connect an application in Django with a service in PHP with an xampp as a server. I am sending you the data from a View in Django with a: return redirect('enlace',{'parametros':parametros}) This generates thi...
asked by 29.01.2018 / 12:19
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
1
answer

Create user preferences form with checkbox

I want to create a form of the type: <form> <fieldset> <legend>Deportes:</legend> <input type="checkbox" name="futbol" value="3"> futbol<br> <input type="checkbox" name="basket" value=...
asked by 31.01.2018 / 00:34
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