Re: Need help with my Form.save() method. Trouble with ForeignKey and ManyToMany Fields.

2010-08-05 Thread strayhand
5, 4:32 am, Paulo Almeida wrote: > Can you check the POST data and see if 'username' is there? You can do it > easily with Firefox's Firebug extension. > > - Paulo > > On Thu, Aug 5, 2010 at 6:24 AM, strayhand wrote: > > So I'm rolling out my own registrati

Need help with my Form.save() method. Trouble with ForeignKey and ManyToMany Fields.

2010-08-04 Thread strayhand
So I'm rolling out my own registration form that should update the following models: - User (auth module) - UserProfile Everything seems to be coming together but I'm having a hard time with the save() method for the form. My UserProfile model has a couple of fields that refer to other models and

Re: How do I populate a multi-select field with a single column from a model?

2010-07-31 Thread strayhand
(max_length=50) phone = models.CharField(max_length=12) email = models.EmailField() def __unicode__(self): return self.name On Jul 31, 4:31 am, Daniel Roseman wrote: > On Jul 31, 10:07 am, strayhand wrote: > > > I want to grab a single column in a m

Re: How do I populate a multi-select field with a single column from a model?

2010-07-31 Thread strayhand
e explanation of it. Thanks for the clue. On Jul 31, 4:31 am, Daniel Roseman wrote: > On Jul 31, 10:07 am, strayhand wrote: > > > I want to grab a single column in a model and use it to populate a > > multi-select form field. Here's the code that I'm current

How do I populate a multi-select field with a single column from a model?

2010-07-31 Thread strayhand
I want to grab a single column in a model and use it to populate a multi-select form field. Here's the code that I'm currently using: areas = forms.ModelMultipleChoiceField(queryset=Area.objects.all(), label='Preferred Areas', help_text='Select the areas that you\'d like to serve.') This code ret

Re: User Registration: Looking for tips

2010-07-29 Thread strayhand
tes out the data to the two models. That's > how we do our registration process since we create at least 6 model > instances at join time. > > Euan > > On 29 July, 06:45, strayhand wrote: > > > I'm using the auth module for my project and I've got a registrat

User Registration: Looking for tips

2010-07-28 Thread strayhand
I'm using the auth module for my project and I've got a registration form that's based on the "UserCreationForm" provided by "django.contrib.auth.forms" but it's only showing the username and password fields. I want a registration process that requires users to fill out ALL of the "User" fields pl

Re: DateTimeField Validation Error

2010-07-27 Thread strayhand
Doah! Thanks. On Jul 27, 2:04 am, Daniel Roseman wrote: > On Jul 27, 6:34 am, strayhand wrote: > > > I don't get why I'm getting a validation error with my code. I thought > > that all of the built in fields are referenced inside of "from > > django.db i

DateTimeField Validation Error

2010-07-26 Thread strayhand
I don't get why I'm getting a validation error with my code. I thought that all of the built in fields are referenced inside of "from django.db import models". Thanks for any help that you may offer. ERROR NameError: name 'DateTimeField' is not defined CODE #shifts.models.py from django.db imp

Re: Newbie Question: Syntax Error - Form Class, trying to set e-mail field to required=False

2010-07-22 Thread strayhand
rote: > "e-mail" can't have a hyphen in it. Python thinks you're "assigning" > to the operation e - mail > > just type into a shell to see. > > e-mail = "blah" > SyntaxError: can't assign to operator > > rename to e_mail or em

Newbie Question: Syntax Error - Form Class, trying to set e-mail field to required=False

2010-07-22 Thread strayhand
I apologize in advance if i'm posting this question in the wrong area. I'm learning about django's form class in "The Definitive Guide To Django" and for some reason that's beyond me I keep getting a syntax error. I've been over my code a dozen times and I'm hoping that someone can point me in the