On 2 Mar 2010, at 15:45 , Chris McComas wrote: > > These are my models: http://dpaste.com/166906/ > > I have a ModelForm setup, nothing special, just excluding a couple > fields: application, tuition_deadline, and deadline_passed > > What I'm trying to do in my view is if a value is entered in > read_receipt then it automatically sets tuition_deadline to be 7 days > from that date. Here's my basic view: http://dpaste.com/166907/ > > How can I do that? I'm not really up to speed with the time/datetime > functions in Python.
I think you could just add a datetime.timedelta(days=7)[1] to your read_receipt, and set that as your tuition_deadline. [1] http://docs.python.org/library/datetime.html#timedelta-objects -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@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.