# Path: profiles/modules/codes/models.py
# class Code(models.Model):
#     """
#     Registration codes
#     """
#     code = models.CharField(max_length=255, unique=True)
#     is_active = models.BooleanField(default=True)
# 
#     class Meta:
#         app_label = 'profiles'
#         ordering = ('code',)
# 
#     def __unicode__(self):
#         return mark_safe(self.code)


import string
import random
from django import forms
from django.contrib import admin
from django.contrib.admin.options import csrf_protect_m
from django.core.urlresolvers import reverse
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from .models import Code
        from django.conf.urls import patterns, include, url




class AutoGenerateForm(forms.Form):
    number = forms.IntegerField(label=_('Number of codes to generate'))
    length = forms.IntegerField(
            label=_('Length of codes to generate'),
            initial=8,
            max_value=255,

# Path: profiles/modules/codes/models.py
# class Code(models.Model):
#     """
#     Registration codes
#     """
#     code = models.CharField(max_length=255, unique=True)
#     is_active = models.BooleanField(default=True)
# 
#     class Meta:
#         app_label = 'profiles'
#         ordering = ('code',)
# 
#     def __unicode__(self):
#         return mark_safe(self.code)


# Path: profiles/modules/codes/admin.py
import string
import random
from django import forms
from django.contrib import admin
from django.contrib.admin.options import csrf_protect_m
from django.core.urlresolvers import reverse
from django.core.exceptions import PermissionDenied
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext_lazy as _
from .models import Code
        from django.conf.urls import patterns, include, url





class AutoGenerateForm(forms.Form):
    number = forms.IntegerField(label=_('Number of codes to generate'))
    length = forms.IntegerField(
            label=_('Length of codes to generate'),
            initial=8,
            max_value=255,

            min_value=1)