Re: pub_date timezone

2012-10-25 Thread BrendanC
Hi erm I put that line in and still won't work. In my models.py file I have the following: from django.db import models class Poll(models.Model): question = models.CharField(max_length=200) put_date = models.DateTimeField ('date published') class Choice(models.Model): poll = model

Re: pub_date timezone

2012-10-25 Thread BrendanC
Hi erm Went back over your comment and realised what you commented. After python manage.py I gget the python prompt>>> and then typed from polls.models import Poll, Choice then I typed: Poll.objects.all() and got the array brace [] returned. then I typed from django.utils import timezone the

Re: Dynamically form modification - Is this possible?

2011-04-25 Thread BrendanC
I was hoping to use ajax and a customizable template with the additional fields that I'd added dynamically and then somehow update the form class with the info required to support form validation (however I'm not sure that this approach will work - I can get the initial display to work, but not

Re: Dynamically form modification - Is this possible?

2011-04-25 Thread BrendanC
I'm still not clear on how/whether it is possible to MODIFY the form once it's been initially displayed - the __init__ method is invoked when the form is first created/constructed - what I want to do is rerender/redisplay the form with new fields after it's initial display -since the form need

Dynamically form modification - Is this possible?

2011-04-25 Thread BrendanC
Is there away to dynamically modify and validate a Django form AFTER it's been created and displayed. I have a form where I want to display and validate additional input fields based on the selection from a dropdown on the initial form. (I have found a few snippets that show dynamic form creati

Displaying a User Confirmation (Flash style) Message after a redirect - How?

2010-04-25 Thread BrendanC
want to redirect the user to a new page, then display a save confirmation message that includes the ID of the new record. (I'm thinking of using a session object, but there appear to be some pros/cons.) Links to examples would also help. TIA BrendanC -- You received this message because yo

Re: How to pass context with a form?

2010-04-12 Thread BrendanC
Just another brain fart at my end. Sometimes I just can't see the wood for the trees! On Apr 12, 1:21 pm, BrendanC wrote: > I have a reusable search form and want to display a different form > header based on where/how the search is called from (I get this from > the url). In the

How to pass context with a form?

2010-04-12 Thread BrendanC
I have a reusable search form and want to display a different form header based on where/how the search is called from (I get this from the url). In the search template I'd like to test a variable to determine which header to display. I need to somehow pass variable from the view the template - som