from django.db import models # Create your models here. PODCAST_GENRE_CHOICES = ( ('TE', 'Technology'), ('HF', 'Health'), ('MU', 'Music'), ('PB', 'Podiobook'), ('OU', 'Outdoor'), ('EN', 'Entertainment'), ('WA', 'World Affairs'), ('LS', 'Lifestyle'), ) class Podcast(models.Model): url=models.URLField() feed_url=models.URLField() album_art=models.URLField(blank=True) itunes_feed_id=models.IntegerField(null=True, blank=True, maxlength=10) title=models.CharField(maxlength=255) description=models.TextField() sample_podcast=models.URLField(null=True, blank=True) genre=models.CharField(maxlength=2, choices=PODCAST_GENRE_CHOICES) created_date=models.DateField(auto_now_add=True) modified_date=models.DateField(auto_now=True) def __str__(self): return self.title class Admin: pass list_display = ('title', 'url') def get_absolute_url(self): return "/podcasts/%i/" %self.id