Re: change min_length in form __init__?

2012-01-12 Thread Wen Yekui
why you use the "*" in your function argument?

2012/1/11 galgal 

> Is there any way, to change the field's *min_length* argument inside form
> constructor? That doesn't work:
>
> def __init__(self, *args, **kwargs):
>> super(CreateTeamForm, self).__init__(*args, **kwargs)
>> self.fields['primary_color'].min_length = 4
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/laN38iWqC-oJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: scheduling in future

2012-01-10 Thread Wen Yekui
about sending email,you can utilize the libary function of django to do so

2012/1/11 Wen 温业逵Yekui <wenye...@yuejia.net>

> when you get the request of that user,you can get the "date" about the
> user from database ,then check if that date is today
>
>
> 2012/1/11 Mike Dewhirst <mi...@dewhirst.com.au>
>
>> What is the best way to schedule future events in Django?
>>
>> I have a table with future dates and user info. When date==today I want
>> Django to send an email to that user.
>>
>> Ideas?
>>
>> Thanks
>>
>> Mike
>>
>> --
>> 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+unsubscribe@**
>> googlegroups.com <django-users%2bunsubscr...@googlegroups.com>.
>> For more options, visit this group at http://groups.google.com/**
>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>> .
>>
>>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: scheduling in future

2012-01-10 Thread Wen Yekui
when you get the request of that user,you can get the "date" about the user
from database ,then check if that date is today


2012/1/11 Mike Dewhirst 

> What is the best way to schedule future events in Django?
>
> I have a table with future dates and user info. When date==today I want
> Django to send an email to that user.
>
> Ideas?
>
> Thanks
>
> Mike
>
> --
> 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+unsubscribe@**
> googlegroups.com .
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en
> .
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: what is django.db.models.Q for?

2012-01-10 Thread Wen Yekui
thanks!

2012/1/11 Eugene Wee 

> Hi,
>
> On Wed, Jan 11, 2012 at 10:27 AM, Yekui Wen  wrote:
> > can you guys tell me what is the Q method for ?
>
> Yes, though they are Q objects, not methods. Refer to:
>
> https://docs.djangoproject.com/en/1.3/topics/db/queries/#complex-lookups-with-q-objects
>
> Regards,
> Eugene
>
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.