from django.db import models
from random import choice


# Create your models here.

STATUS_CHOICES = (
    ("NEW", "Nieuw"),
    ("ACCEPTED", "Geaccepteerd"),
    ("DENIED", "Afgewezen"),
)
CHARSET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"

class AmendementComment(models.Model):
    amendement = models.ForeignKey('Amendement')
    time = models.DateTimeField(auto_now=True)
    author = models.CharField(max_length=64)
    text = models.TextField()

    class Meta:
        verbose_name_plural = "Amendement Comments"

    def __unicode__(self):
        return (u"%s: %s" % (self.author, self.text))[:128]


class Amendement(models.Model):
    key = models.SlugField()
    title = models.CharField(max_length=256)
    status = models.CharField(
                                max_length=16, 
                                choices=STATUS_CHOICES,
                                default="NEW")
    email = models.EmailField()

    class Meta:
        verbose_name_plural = "Amendementen"

    def __unicode__(self):
        return self.title

    def gen_random_key(self):
        self.key = "".join([choice(CHARSET) for i in range(32)])



7ac103ff355924975b0681b537ff3be7897875a5
<mask token>


class AmendementComment(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>


    class Meta:
        verbose_name_plural = 'Amendement Comments'
    <mask token>


class Amendement(models.Model):
    key = models.SlugField()
    title = models.CharField(max_length=256)
    status = models.CharField(max_length=16, choices=STATUS_CHOICES,
        default='NEW')
    email = models.EmailField()


    class Meta:
        verbose_name_plural = 'Amendementen'

    def __unicode__(self):
        return self.title

    def gen_random_key(self):
        self.key = ''.join([choice(CHARSET) for i in range(32)])

<mask token>


class AmendementComment(models.Model):
    <mask token>
    <mask token>
    <mask token>
    <mask token>


    class Meta:
        verbose_name_plural = 'Amendement Comments'

    def __unicode__(self):
        return (u'%s: %s' % (self.author, self.text))[:128]


class Amendement(models.Model):
    key = models.SlugField()
    title = models.CharField(max_length=256)
    status = models.CharField(max_length=16, choices=STATUS_CHOICES,
        default='NEW')
    email = models.EmailField()


    class Meta:
        verbose_name_plural = 'Amendementen'

    def __unicode__(self):
        return self.title

    def gen_random_key(self):
        self.key = ''.join([choice(CHARSET) for i in range(32)])

<mask token>
STATUS_CHOICES = ('NEW', 'Nieuw'), ('ACCEPTED', 'Geaccepteerd'), ('DENIED',
    'Afgewezen')
CHARSET = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'


class AmendementComment(models.Model):
    amendement = models.ForeignKey('Amendement')
    time = models.DateTimeField(auto_now=True)
    author = models.CharField(max_length=64)
    text = models.TextField()


    class Meta:
        verbose_name_plural = 'Amendement Comments'

    def __unicode__(self):
        return (u'%s: %s' % (self.author, self.text))[:128]


class Amendement(models.Model):
    key = models.SlugField()
    title = models.CharField(max_length=256)
    status = models.CharField(max_length=16, choices=STATUS_CHOICES,
        default='NEW')
    email = models.EmailField()


    class Meta:
        verbose_name_plural = 'Amendementen'

    def __unicode__(self):
        return self.title

    def gen_random_key(self):
        self.key = ''.join([choice(CHARSET) for i in range(32)])

from django.db import models
from random import choice
STATUS_CHOICES = ('NEW', 'Nieuw'), ('ACCEPTED', 'Geaccepteerd'), ('DENIED',
    'Afgewezen')
CHARSET = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'


class AmendementComment(models.Model):
    amendement = models.ForeignKey('Amendement')
    time = models.DateTimeField(auto_now=True)
    author = models.CharField(max_length=64)
    text = models.TextField()


    class Meta:
        verbose_name_plural = 'Amendement Comments'

    def __unicode__(self):
        return (u'%s: %s' % (self.author, self.text))[:128]


class Amendement(models.Model):
    key = models.SlugField()
    title = models.CharField(max_length=256)
    status = models.CharField(max_length=16, choices=STATUS_CHOICES,
        default='NEW')
    email = models.EmailField()


    class Meta:
        verbose_name_plural = 'Amendementen'

    def __unicode__(self):
        return self.title

    def gen_random_key(self):
        self.key = ''.join([choice(CHARSET) for i in range(32)])

from django.db import models
from random import choice


# Create your models here.

STATUS_CHOICES = (
    ("NEW", "Nieuw"),
    ("ACCEPTED", "Geaccepteerd"),
    ("DENIED", "Afgewezen"),
)
CHARSET = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"

class AmendementComment(models.Model):
    amendement = models.ForeignKey('Amendement')
    time = models.DateTimeField(auto_now=True)
    author = models.CharField(max_length=64)
    text = models.TextField()

    class Meta:
        verbose_name_plural = "Amendement Comments"

    def __unicode__(self):
        return (u"%s: %s" % (self.author, self.text))[:128]


class Amendement(models.Model):
    key = models.SlugField()
    title = models.CharField(max_length=256)
    status = models.CharField(
                                max_length=16, 
                                choices=STATUS_CHOICES,
                                default="NEW")
    email = models.EmailField()

    class Meta:
        verbose_name_plural = "Amendementen"

    def __unicode__(self):
        return self.title

    def gen_random_key(self):
        self.key = "".join([choice(CHARSET) for i in range(32)])


