Assuming you've got a 'mydate' attribute:
mydate = models.DateField(null=True)
You can conditionally assign it if null:
import datetime
art = Article.objects.get(pk=1)
if not art.mydate:
art.mydate = datetime.date.today()
art.save()
--
Jeff Bauer
Rubicon, Inc.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---