I'm building a django app that has users come to my site, enter in a string of text, their email, a friend's email and a date they would like to be emailed on.
How would I go about having the text they entered emailed to the them on the date they requested in the date_returned field? Any specific apps? Loops? Etc
Thank you,
My Models.py looks like:
class bet(models.Model):
name = models.CharField(max_length=100)
email_1 = models.EmailField()
email_2 = models.EmailField()
wager = models.CharField(max_length=300)
date_submitted = models.DateField(_("Date"), auto_now_add=True)
date_returned = models.DateField(null=True)
def __unicode__(self):
return self.name
class BetForm(ModelForm):
name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Bet Name'}), max_length=100)
email_1 = forms.EmailField(widget=forms.TextInput(attrs={'placeholder': 'Your Email'}))
email_2 = forms.EmailField(widget=forms.TextInput(attrs={'placeholder': 'Your Friend\'s Email'}))
wager = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'What\'s The Wager?'}), max_length=200)
date_returned = forms.DateField(widget=SelectDateWidget())
class Meta:
model=bet