# Path: opendiamond/scopeserver/gatekeeper/models.py
# class Collection(models.Model):
#     name = models.CharField(max_length=100)
#     gid = models.CharField(max_length=23)
#     allowed_users = models.ManyToManyField(User, blank=True)
#     servers = models.ManyToManyField(Server)
# 
#     def __unicode__(self):
#         return self.name
# 
# Path: opendiamond/scopeserver/cocktail/models.py
# class CocktailBase(models.Model):
#     name = models.CharField(max_length=256)
#     dataset = models.CharField(max_length=256)
#     allowed_users = models.ManyToManyField(User, blank=True)
#     servers = models.ManyToManyField(Server)
# 
#     def __unicode__(self):
#         return self.name


from builtins import object
from django import forms
from django.contrib.auth.models import User
from opendiamond.scopeserver.gatekeeper.models import Collection
from .models import CocktailBase
    classes = forms.CharField(label='Classes: ',
                               help_text='Comma-separated Classes. '
                                         'All selected if left blank',
                               required=False)  # no 'strip' in Django 1.3

    TYPE_CHOICES = (
        ('d', 'DETERMINISTIC'),
        ('r', 'RANDOM'),
    )

    mixing_type = forms.ChoiceField(label='Type: ',
    							  widget=forms.Select(),
                                  choices=TYPE_CHOICES,
                                  initial='d')

    seed = forms.IntegerField(label='Seed: ',
                                 help_text='Integer',
                                 initial=42)

    percentage = forms.FloatField(label='Percentage: ',
                                  help_text='%',
                                  initial=1,
                                  min_value=0,
                                  max_value=100,
                                  required=False)


class ManageForm(forms.Form):
    user = forms.ModelChoiceField(queryset=User.objects.all())
    bases = forms.ModelMultipleChoiceField(

# Path: opendiamond/scopeserver/gatekeeper/models.py
# class Collection(models.Model):
#     name = models.CharField(max_length=100)
#     gid = models.CharField(max_length=23)
#     allowed_users = models.ManyToManyField(User, blank=True)
#     servers = models.ManyToManyField(Server)
# 
#     def __unicode__(self):
#         return self.name
# 
# Path: opendiamond/scopeserver/cocktail/models.py
# class CocktailBase(models.Model):
#     name = models.CharField(max_length=256)
#     dataset = models.CharField(max_length=256)
#     allowed_users = models.ManyToManyField(User, blank=True)
#     servers = models.ManyToManyField(Server)
# 
#     def __unicode__(self):
#         return self.name


# Path: opendiamond/scopeserver/cocktail/forms.py
from builtins import object
from django import forms
from django.contrib.auth.models import User
from opendiamond.scopeserver.gatekeeper.models import Collection
from .models import CocktailBase

    classes = forms.CharField(label='Classes: ',
                               help_text='Comma-separated Classes. '
                                         'All selected if left blank',
                               required=False)  # no 'strip' in Django 1.3

    TYPE_CHOICES = (
        ('d', 'DETERMINISTIC'),
        ('r', 'RANDOM'),
    )

    mixing_type = forms.ChoiceField(label='Type: ',
    							  widget=forms.Select(),
                                  choices=TYPE_CHOICES,
                                  initial='d')

    seed = forms.IntegerField(label='Seed: ',
                                 help_text='Integer',
                                 initial=42)

    percentage = forms.FloatField(label='Percentage: ',
                                  help_text='%',
                                  initial=1,
                                  min_value=0,
                                  max_value=100,
                                  required=False)


class ManageForm(forms.Form):
    user = forms.ModelChoiceField(queryset=User.objects.all())
    bases = forms.ModelMultipleChoiceField(

        queryset=CocktailBase.objects.all(),