Skip to content

Commit 7121cab

Browse files
author
Steve Ivy
committed
InviteCode.code is now default up to 256 chars.
Should not need to be changed by the user.
1 parent a9ab17a commit 7121cab

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

invitation/models.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
from django.db import models
22
from django.utils.translation import ugettext_lazy as _
33
from django.contrib.auth.models import User
4+
import random
5+
import string
46

57

68
class InvitationCode(models.Model):
79
"""Invitation code model"""
8-
code = models.CharField(blank=True, max_length=5, unique=True,
10+
code = models.CharField(blank=True, max_length=256, unique=True,
911
verbose_name=_(u"Invitation code"))
1012
is_used = models.BooleanField(default=False,
1113
verbose_name=_(u"Is code used?"))
1214
user = models.ForeignKey(User, blank=True, null=True)
1315
used_date = models.DateTimeField(blank=True, null=True, auto_now_add=True,
1416
verbose_name=_(u"Used on"))
17+

0 commit comments

Comments
 (0)