Skip to content

Instantly share code, notes, and snippets.

@EdwardIII
Last active December 14, 2015 19:08
Show Gist options
  • Save EdwardIII/5134003 to your computer and use it in GitHub Desktop.
Save EdwardIII/5134003 to your computer and use it in GitHub Desktop.
import datetime
from django.db import models
from django.contrib.auth.models import User
from django.db.models import Sum
from django.db.models.signals import post_init
from django import forms
from django.utils.translation import ugettext_lazy as _
from feincms.module.page.models import Page
from feincms.content.richtext.models import RichTextContent
from feincms.content.medialibrary.models import MediaFileContent
class Category(models.Model):
""" Umbrella that helps sort Organisers, e.g. University """
name = models.CharField(max_length=500)
def __unicode__(self):
return self.name
class Organiser(models.Model):
""" The organiser that manages an event, e.g. Society """
user = models.ForeignKey(User, unique=True)
name = models.CharField(max_length=500)
category = models.ForeignKey(Category)
top_organiser = models.BooleanField()
def __unicode__(self):
return self.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment