Last active
December 15, 2017 12:21
-
-
Save ronaldlangeveld/d9377ef83af0a389f33edab7942ffb23 to your computer and use it in GitHub Desktop.
RSS Feed Models
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
from __future__ import unicode_literals | |
from django.db import models | |
from django.utils import timezone | |
# CREATE MODELS HERE | |
class RSSJFeed(models.Model): | |
id = models.AutoField(primary_key=True) | |
time = models.DateTimeField(default=timezone.now) | |
title = models.CharField(max_length=60) | |
link = models.URLField(unique=True) | |
timestamp = models.DateTimeField(null=True) | |
def __str__(self): | |
return str(self.title) | |
def __unicode__(self): | |
return str(self.title) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment