:::: MENU ::::

The Project: Django Models

Alright, this seems a little embarassing. I’ve never put up code before for public scrutiny. I put up podcasts all the time that may be a little iffy, I make blog posts, but this seems different. I’m learning this and so I feel very naked posting this. But here it is any way. I’m not putting in any user authentication as of yet. I’m going to get the meat of the application done and then I’m going to put the polish on afterward. Again, I’m learning.

I haven’t found a good way to include code in WordPress. If you have a solution, please let me know.

Here’s the model file:

from django.db import models

    ('TE', 'Technology'),
    ('HF', 'Health'),
    ('MU', 'Music'),
    ('PB', 'Podiobook'),
    ('OU', 'Outdoor'),
    ('EN', 'Entertainment'),
    ('WA', 'World Affairs'),
    ('LS', 'Lifestyle'),

class Podcast(models.Model):
   album_art=models.URLField(null=True, blank=True)
   itunes_feed_id=models.IntegerField(null=True, blank=True, maxlength=10)
   sample_podcast=models.URLField(null=True, blank=True)
   genre=models.CharField(maxlength=2, choices=PODCAST_GENRE_CHOICES)

   def __str__(self):
       return self.title

   class Admin:

       list_display = ('title', 'url')

   def get_absolute_url(self):
    return "/podcasts/%i/" %self.id

Here’s a link to the file: Django Model

Well, that’s the model for the podcasts. I’m not planning on reading in the Feeds and displaying the episodes as of yet. One step at a time, right?

So you Pythonistas, Djangonauts…

What’s wrong with this?
What’s right with it?
What am I missing?

Next post will be a little about the generic views that I’ll be using to create the podcast listing and the detail pages. I’ve already got the podcast list done and the detail. I’ll post that soon. After that, I’ll tackle the CRUD of making changes to the podcast details. Finally, I’ll implement user login and then I’ll go from there.

I’ve selected a template from freecsstemplates.org to use in the site, just so it’s not so darn plain. I’ll also get that server up so others can add their data to the database and try out the application.

The Project: Podcast Directory

I’ve had a bug in my bonnet to create a web application with Python/Django.

I started this blog, under a different name, to get me started learning Python. That didn’t work so well, but the one thing that it did get me excited about is Django. I would like to build something in Django, I need a project. That’s the way most things get done in my life, publicly state that I’m going to build something and then make it happen. The project is a podcast directory.

A Django site.I’m a podcaster. I have had a podcast of some sort for the last 3 years. The latest one is Fat 2 Fit Radio. As I’ve tried to promote the podcast, I’ve been surprised at the crappiness of the podcast directories out there. There are a bunch of them, but none are great. The idea is create a podcast directory that is super simple, lists podcasts by topic, separate video and audio podcasts, and generally make it a place to find and not subscribe to podcasts. Subscribing is better done on an aggregator.

I’m going to be repurposing one of my domain names to get this project going. The domain name is podcastersfriend.com. Previously/currently it is a WordPress blog with some pages of audio equipment that a podcaster might be interested in. I’ll probably add these pages to the new site, but for now it will be going bye-bye.

So there it is. A podcast directory written with Django. I’ll chronicle the progress, post code, and generally solicit help from anyone reading these posts.

Here goes!

Hello World!

Welcome to my new blog. I’m going to be pulling all my online endeavors into one place on the web. This place. I’m tired of having so many places to post. This is going to be the one. Right here.

I hope you’ll join me.