Recent Entries
- (no title) 2009/12/05 19:40
- (no title) 2009/11/11 21:19
- (no title) 2009/11/11 21:19
- rng 2009/10/29 16:13
- fsdfsdfds 2009/10/29 10:11
- jwin demo 2009/10/29 10:09
- sdc 2009/09/24 17:04
- empty 2009/08/28 07:44
- testingtest 2009/07/15 14:36
- java2 2009/06/25 13:42
Welcome to Code Base
This is a google app engine powered pastebin. Unfortunately the autodetect doesn't appear to be too good at recognizing python code - I'll work on it. For further questions, please use the contact form.
About
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from django.db import models
from django.contrib import admin
import tagging
from tagging.fields import TagField
class Project(models.Model):
title = models.CharField(max_length=200)
slug = models.SlugField(unique=True)
description = models.TextField()
url = models.URLField(verify_exists=False)
release_date = models.DateField()
tags = TagField()
def set_tags(self, tags):
Tag.objects.update_tags(self, tags)
def get_tags(self, tags):
return Tag.objects.get_for_object(self)
class Screenshot(models.Model):
img = models.ImageField(upload_to='../static/img/portfolio')
project = models.ForeignKey(Project)
|