how to set up a calculated field in Django?

2019-10-21 Thread Eileen Bauer
be able to detect whether the child is an orphan or not. In MySQL i believe it'd look like this: orphan varchar(101) GENERATED ALWAYS AS (mother_alive+father_alive) VIRTUAL, I don't know how to change my model to do that... Any help? -Eileen -- You received this message because you

Changed SelectDateWidget to SelectMonthDayWidget; tried to run it in command line.

2019-06-03 Thread Eileen Bauer
Hi, I'm a newbie and I want to change the Django SelectDateWidget to SelectMonthDayWidget because I can't use the year in my application. I had been getting another error (which I don't recall right now) on the statement that started 'html['month']' so, I decided to convert it to command line

need to find out if someone is an orphan when I have mother_alive and father_alive fields in the database

2018-01-29 Thread eileen
: q = context['child_filter'].filter(Q(request.POST.get('mother_alive') == 0 and request.POST.get('father_alive') == 0)) but I got an error on it. does anyone know what I did wrong? -Eileen -- You received this message because you are subscribed to the Google Groups "Django

Re: how do I handle a dropdown in Django whose only purpose is to get data.

2018-01-26 Thread eileen
well, you certainly got me correct! I'm fairly new to python - didn't do much coding to learn. Trial by fire, sort of. and the original person who put this together is now gone from the company and won't answer any outstanding questions. Plus, I *think* he got most of the code from 3rd party

Re: how do I make django search for male or female without needing to specify an age?

2018-01-26 Thread eileen
rch requires that an age to be chosen whether or not the > gender is, and I'd like to make the age optional as well. I.e get all the > children. > Additionally, I'd like to search for only males or females without > selecting an age... > > -Eileen > from __future

how do I make django search for male or female without needing to specify an age?

2018-01-26 Thread eileen
or females without selecting an age... -Eileen from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.shortcuts import redirect from django.template.response import TemplateResponse from django.http import HttpResponse from django.db.models import Q from

how do I handle a dropdown in Django whose only purpose is to get data.

2018-01-24 Thread eileen
self.fields['age'].widget = ChainedSelectWidget( parent_name='gender', # the name of parent field app_name='sponsorship',# the name of model's application model_name='child', # the name of a model with the method met

Re: Need to create an edit box connected to one table field

2018-01-22 Thread eileen
method_name='get_children', # the name of queryset method ) It is for finding a child who may or may not have one of two types of handicaps. -Eileen On Friday, January 19, 2018 at 9:54:15 PM UTC-5, Costja Covtushenko wrote: > > Hi Eileen, > > Can you plea

Need to create an edit box connected to one table field

2018-01-19 Thread eileen
l right, I should say. I get lots of different types of errors - sorry I can't include them now, but definitely not week if the problem is still outstanding. -Eileen -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe f