Re: User based objects

2011-07-08 Thread Praveen Krishna R
*Shawn, Once again **thank you very much for your help, * *here is my code, if anybody could make use of it (I have changed my actual model/form names)! * * * * class SampleForm(forms.Form): head = forms.CharField() body = forms.CharField(widget = forms.Textarea) def __init__(self, *arg

Re: User based objects

2011-07-08 Thread Shawn Milochik
On Fri, Jul 8, 2011 at 10:28 AM, Praveen Krishna R wrote: > Thank you, Shawn, I didn't knew that! I'm trying on that way now! > You're welcome. The one 'gotcha' is that you're going to have to remove the user from the kwargs before you call the __init__ of the superclass. Otherwise you'll get an

Re: User based objects

2011-07-08 Thread Praveen Krishna R
*Thank you, Shawn, I didn't knew that! I'm trying on that way now! * On Fri, Jul 8, 2011 at 6:52 PM, Shawn Milochik wrote: > You can certainly pass request.user to the form from your view. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. >

Re: User based objects

2011-07-08 Thread Shawn Milochik
You can certainly pass request.user to the form from your view. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsub

User based objects

2011-07-08 Thread Praveen Krishna R
*Hi, * * * *This is one of my Model which has an owner, column - user.* * * * class MiscList(models.Model): name = models.CharField(max_length= 30) user = models.ForeignKey(User); count = models.IntegerField() createdate = models.DateTimeField(auto_now_add = True) ** def __unico