37 lines
1000 B
Python
37 lines
1000 B
Python
|
|
from django.db import models
|
||
|
|
from django.core.files.storage import FileSystemStorage
|
||
|
|
from django.contrib.auth.models import User
|
||
|
|
|
||
|
|
from events.models import Organization
|
||
|
|
|
||
|
|
class JobOpening(models.Model):
|
||
|
|
title = models.CharField(max_length=128, blank=True, null=True)
|
||
|
|
organization = models.ForeignKey(Organization)
|
||
|
|
link = models.URLField(blank=True, null=True)
|
||
|
|
show_date = models.DateTimeField()
|
||
|
|
abstract = models.TextField()
|
||
|
|
|
||
|
|
class Meta:
|
||
|
|
verbose_name_plural = "Job Openings"
|
||
|
|
ordering = ['title']
|
||
|
|
|
||
|
|
def __unicode__(self):
|
||
|
|
return "%s" % self.show_title
|
||
|
|
|
||
|
|
def __str__(self):
|
||
|
|
return u'%s' % self.show_title
|
||
|
|
|
||
|
|
|
||
|
|
class Tag(models.Model):
|
||
|
|
name = models.CharField(max_length=64)
|
||
|
|
description = models.TextField(blank=True, null=True)
|
||
|
|
slug = models.SlugField()
|
||
|
|
|
||
|
|
class Meta:
|
||
|
|
verbose_name_plural = "Tags"
|
||
|
|
|
||
|
|
def __unicode__(self):
|
||
|
|
return "%s" % self.name
|
||
|
|
|
||
|
|
def __str__(self):
|
||
|
|
return u'%s' % self.name
|