Questions tagged as 'django'

0
answers

How can I generate a report with reportlab from a view? [closed]

What I'm looking for is to generate a report from the following view: class CuentaCondominioView(TemplateView): template_name = 'administrador/cuenta_condominio.html' def dispatch(self, request, *args, **kwargs): if request.u...
asked by 09.07.2016 / 21:00
1
answer

TypeError: the JSON object must be str, not 'bytes'

People have a problem with this code: def task_get_data_misindicadores(): url = 'https://*****.co/api/*****/{0}/'.format( config.MI_APIKEY ) req = requests.get(url) if not req.ok: return 'Timeout Error' to_...
asked by 27.05.2016 / 17:08
0
answers

Django - ValueError: plural forms expression could be dangerous

I'm working with Django 1.9.6 in Microsoft Visual Studio, using a virtual environment where all the python packages my project requires are installed. One of the characteristics of my project is internationalization, but it is giving me problems...
asked by 27.05.2016 / 10:39
2
answers

Codenerix - Disable a dropdown field to a foreign key using ng-readonly

Codenerix Does anyone know how to correctly use ng-readonly in a GenModelForm when calling from a sublist tab (GenList) which in turn invokes a CreateModal window? The structure is master-detail. The sublist has the pk of the master table...
asked by 23.11.2017 / 00:58
1
answer

Django Validate Forms

I'm trying to make a form to store company information, so far it works perfectly when it saves to database etc. I am using forms.Form the detail is that in a template I am not using {% forms.as_p%} if not each one separately in order to make...
asked by 24.10.2016 / 04:14
1
answer

Store Log of errors and debug for django

I hope you can help me, I am using this code to store the log of my application with django 1.10 but I continue to generate the log of a large size (more than 200mb and increasing), I would like to know how to make it to generate a more small an...
asked by 24.10.2016 / 16:10
1
answer

django-crispy-forms - Inserting fields in a template

I have the following form: class RehabilitationSessionForm(forms.ModelForm): def __init__(self, *args, **kwargs): # user = kwargs.pop('user', None) super(RehabilitationSessionForm, self).__init__(*args, **kwargs) s...
asked by 01.12.2016 / 22:44
2
answers

Error with the commandant runnerver of Django

Trying to run the local Django server I get the following error in the terminal when running using runserver. This is the message: System check identified no issues (0 silenced). February 28, 2016 - 15:50:27 Django version 1.7.9, using...
asked by 28.02.2016 / 21:18
2
answers

How to use ajax with django forms?

My models.py # -*- encoding: utf-8 -*- from django.db import models from general.models import BaseUnique, BaseTitle, Empresa, Arl from recurso_humano.models import Persona, Sucursal # ===================== HEALTH BASIC ======================...
asked by 25.02.2016 / 06:57
1
answer

GROUP BY in query

I have a table with the following columns: nombre , monto , fecha . I want in a query to show the information grouped by name and month in the following way: nombre1, suma(monto), marzo nombre1, suma(monto), abril nombre2,...
asked by 18.04.2016 / 20:38