project/scipycon/sponsor/models.py
changeset 94 87e77aa18610
equal deleted inserted replaced
93:e86755df35da 94:87e77aa18610
       
     1 # -*- coding: utf-8 -*-
       
     2 from __future__ import absolute_import
       
     3 
       
     4 #django
       
     5 from django.db import models
       
     6 from django.conf import settings
       
     7 
       
     8 TYPE_CHOICES = (
       
     9     ('gold', 'Gold'),
       
    10     ('silver', 'Silver'),
       
    11     ('schwag', 'Schwag'),
       
    12     )
       
    13 
       
    14 class Sponsor(models.Model):
       
    15     """Defines sponsors for *PyCon"""
       
    16     slug = models.SlugField()
       
    17     title = models.CharField(max_length=255)
       
    18     type = models.CharField(max_length=10, choices=TYPE_CHOICES)
       
    19     contact_name = models.CharField(max_length=255)
       
    20     contact_email = models.CharField(max_length=255)
       
    21     contact_phone = models.CharField(max_length=255)
       
    22     url = models.URLField(blank=True, verify_exists=False)
       
    23     logo = models.CharField(max_length=64, blank=True)
       
    24     guests = models.IntegerField()
       
    25 
       
    26     def __unicode__(self):
       
    27         return self.title
       
    28