Created
January 30, 2015 07:04
-
-
Save makthrow/36db15719f73c9f38cff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ContactForm(models.Model): | |
name=models.CharField(max_length=150) | |
email = models.EmailField(max_length=250) | |
topic = models.CharField(max_length=200) | |
message = models.CharField(max_length = 1000) | |
timestamp = models.DateTimeField( | |
auto_now_add=True, default =datetime.datetime.now | |
) | |
def __unicode__(self): | |
return self.email | |
# should this be indented? | |
#class Meta: | |
# ordering = ['-timestamp'] | |
# indented meta | |
class Meta: | |
ordering = ['-timestamp'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment