Questions tagged as 'django'

1
answer

How to do so that the value of the input does not disappear

I am new using the typeahead.js with Django . I am also using handlebars_min.js . When I write three characters, the elements of my list that match the search are displayed. When I click, the element is put in input . The problem is th...
asked by 12.01.2017 / 22:18
2
answers

Show only the first element of a list in templates

I have a table in which I show an object of sight, these are vaccines, what I want is that, for example, if they already put that vaccine, I will not get the name of the vaccine, only the dates in those who got the vaccines. template.html &...
asked by 09.11.2016 / 20:01
2
answers

filter to get the contents of a Django list?

I hope it is not a little trivial my question I have the following models. class ModelA(models.Model): tipo= UCharField(max_length=20, null=True, blank=True) class ModelB(models.Model): model_a= models.ForeignKey(ModelA, null=False...
asked by 11.10.2016 / 23:21
3
answers

I want to bring the date of all the records and compare it with the current date?

Hi! I want to be able to bring the date of all my records to compare it with the current date to know how many days a certain product has been registered but I do not know how to do it, please help me. I do not know if I make myself understoo...
asked by 28.09.2016 / 16:29
1
answer

I want to pass this Mysql code to Django how can I do it? [closed]

Hello, someone who helps me, I want to pass this code to Django and Python as I can. SELECT 'clasificador', SUM('total') AS t_total FROM clasificacion GROUP BY 'clasificador' I would really appreciate your help.     
asked by 09.09.2016 / 19:10
1
answer

Obtain values in a given date range

Given a name and two dates entered per parameter, I would like to make a query where I take all the values of that name in that date range. I know the next way to compare in Django but this is strict and I would like to take the dates >...
asked by 26.05.2016 / 03:10
1
answer

Import Polymer with Bower in Django

I'm using cloud9, and I have a project in Django where I have to perform the view with Polymer. I follow the bower installation manual: link I install bower correctly, and I install polymer (google maps) with bower correctly (I see that the...
asked by 24.05.2016 / 19:10
1
answer

Django 1.8 Paginator inside a def get

Pager within this function and I do not know how to do it and tried several ways but it does not work out here I leave the pager code, please help me class ListarTipoAlmacen(ListView): model = Tipo_almacen template_name = 'tipo_almacen/lista...
asked by 12.05.2016 / 17:59
1
answer

Performing migrations in Django - django.db.utils.IntegrityError: null values

I am adding the following attribute type choice to my model class User(AbstractUser): GENDER_MALE = 'M' GENDER_FEMALE = 'F' GENDER_OTHER = 'O' GENDER_CHOICES = ( (GENDER_MALE, u'male'), (GENDER_FEMALE, u'...
asked by 16.01.2016 / 23:35
1
answer

Pre-validation using the CreateView form

I am using the generic views of Django to register / enter a product, the idea or the question is how I can evaluate previously said form sent to your view, my code to create is the following: class CrearProducto(CreateView): model = Prod...
asked by 28.12.2018 / 16:44