Created
July 27, 2008 14:26
-
-
Save leachim6/2778 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 django.db import models | |
from django.contrib import admin | |
POST_TYPES = ( | |
('A', 'Audio'), | |
('V', 'Video'), | |
('U', 'URL'), | |
('Q', 'Quote'), | |
('I', 'Image'), | |
) | |
class Post(models.Model): | |
title = models.CharField(max_length=100) | |
body = models.TextField() | |
type = models.CharField(max_length=1, choices=POST_TYPES) | |
admin.site.register(Post) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment