0xC0DEBA5E

Recent Entries

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)

Paste below

Title
Code
Language
To verify that you're not an automated script, please type the word human below in ALL CAPITALS
Word