Created
October 29, 2013 13:00
-
-
Save hgezim/7214178 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 Post(models.Model): | |
title = models.CharField(max_length=500) | |
hn_id = models.CharField(max_length=50, unique=True) | |
points = models.IntegerField(null=True) | |
comment_count = models.IntegerField() | |
comments_link = models.URLField() | |
date = models.DateTimeField() # datetime that HN post was posted | |
date_scraped = models.DateTimeField(auto_now_add = True) # date object was scraped from HN | |
date_modified = models.DateTimeField(auto_now = True) # date this object has been updated (rescraped) | |
# link the story is linked to -- HN links can be long so set max_length to 2000 | |
link = models.URLField(max_length=2000) | |
posted_by = models.CharField(max_length=100, null=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment