text
stringlengths
0
1.05M
meta
dict
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from eat.models import Application, Child, Adult, PayFrequency, Ethnicity from django.forms import ModelForm class RegistrationForm(UserCreationForm): class Meta: model = User ...
{ "repo_name": "ask5/eatuxchallenge", "path": "eat/forms.py", "copies": "1", "size": "10430", "license": "mit", "hash": 7685249835439607000, "line_mean": 35.5964912281, "line_max": 120, "alpha_frac": 0.5891658677, "autogenerated": false, "ratio": 4.163672654690619, "config_test": false, "has_n...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from .models import Profile from js1kg.forms import BaseModelForm class UserRegisterForm(UserCreationForm): email = forms.EmailField(required=True) class Meta: model = User ...
{ "repo_name": "dazhaoniel/1kg-more", "path": "js1kg/user/forms.py", "copies": "1", "size": "1086", "license": "apache-2.0", "hash": -463058462231504300, "line_mean": 25.512195122, "line_max": 64, "alpha_frac": 0.635359116, "autogenerated": false, "ratio": 4.160919540229885, "config_test": false...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from .models import Profile class UserForm(UserCreationForm): #password = forms.CharField(label="Password", widget=forms.PasswordInput) class Meta: model = User fields =...
{ "repo_name": "joepetrini/bike-counter", "path": "webapp/account/forms.py", "copies": "1", "size": "1246", "license": "mit", "hash": 8897078813959781000, "line_mean": 27.976744186, "line_max": 77, "alpha_frac": 0.6316211878, "autogenerated": false, "ratio": 4.1952861952861955, "config_test": fa...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from nocaptcha_recaptcha.fields import NoReCaptchaField class MyRegistrationForm(UserCreationForm): captcha = NoReCaptchaField() class Meta: model = User fields = ('first_name', 'last_name...
{ "repo_name": "giantas/elibrary", "path": "reg/forms.py", "copies": "1", "size": "1528", "license": "mit", "hash": 3392420154753965000, "line_mean": 34.5581395349, "line_max": 76, "alpha_frac": 0.6976439791, "autogenerated": false, "ratio": 3.2236286919831225, "config_test": false, "has_no_ke...
from django import forms from django.contrib.auth.models import User #from django.contrib.auth.forms import UserCreationForm class NameForm(forms.Form): your_name = forms.CharField(label='Your name', max_length=100) #class UserCreateForm(UserCreationForm): # email = forms.EmailField(required=True) #passwo...
{ "repo_name": "gauravbose/digital-menu", "path": "digimenu2/restaurant/forms.py", "copies": "2", "size": "1144", "license": "bsd-3-clause", "hash": -8391213144434665000, "line_mean": 32.6470588235, "line_max": 76, "alpha_frac": 0.6590909091, "autogenerated": false, "ratio": 3.7755775577557755, ...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm class RegistrationForm(UserCreationForm): email = forms.EmailField(required=True) first_name = forms.CharField(required=True) last_name = forms.CharField(required=True) username =...
{ "repo_name": "raqsilva/VcfDataExporter", "path": "pytera/forms.py", "copies": "1", "size": "1503", "license": "apache-2.0", "hash": -5856316994074835000, "line_mean": 27.358490566, "line_max": 98, "alpha_frac": 0.6440452428, "autogenerated": false, "ratio": 4.407624633431085, "config_test": fa...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from forum_app.models import Profile, Category, Thread, Post, Conversation, Pm class CategoryForm(forms.ModelForm): image = forms.FileField(required=False) slug = forms.CharField(widget...
{ "repo_name": "JD-666/wwsc", "path": "forum_app/forms.py", "copies": "1", "size": "2782", "license": "apache-2.0", "hash": 8319681411820376000, "line_mean": 33.3456790123, "line_max": 78, "alpha_frac": 0.6232925953, "autogenerated": false, "ratio": 4.1214814814814815, "config_test": false, "h...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from .models import UserProfile class UserCreationFormTZ(UserCreationForm): tz = forms.ChoiceField(choices=UserProfile.TZ_CHOICES, initial='America/Los_Angeles', # Time zone ...
{ "repo_name": "clede/Radiotrack", "path": "users/forms.py", "copies": "1", "size": "1248", "license": "apache-2.0", "hash": -3700056729189507600, "line_mean": 39.2580645161, "line_max": 77, "alpha_frac": 0.6594551282, "autogenerated": false, "ratio": 4.244897959183674, "config_test": false, "...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm illegal_usernames=['friends', 'user', 'anon', 'all'] class Email(forms.EmailField): def clean(self, value): super(Email, self).clean(value) try: User.objects.get(...
{ "repo_name": "sleepers-anonymous/zscore", "path": "users/forms.py", "copies": "1", "size": "1388", "license": "mit", "hash": -4301671697526370300, "line_mean": 36.5135135135, "line_max": 142, "alpha_frac": 0.6577809798, "autogenerated": false, "ratio": 4.168168168168168, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm import hashlib class UserRegistrationForm(UserCreationForm): username = forms.EmailField(required = True) password1 = forms.CharField(widget=forms.PasswordInput()) p...
{ "repo_name": "odingrey/Django-Wink", "path": "wink/wink/forms/register.py", "copies": "1", "size": "1280", "license": "mit", "hash": -2536630444050182000, "line_mean": 31.8205128205, "line_max": 98, "alpha_frac": 0.73125, "autogenerated": false, "ratio": 3.5457063711911356, "config_test": fals...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm class RegistrationForm(UserCreationForm): email = forms.EmailField(required=True) first_name = forms.CharField(required=False) last_name = forms.CharField(required=...
{ "repo_name": "oss6/sigil", "path": "sigil/forms.py", "copies": "1", "size": "2159", "license": "mit", "hash": -6179726998885843000, "line_mean": 26, "line_max": 64, "alpha_frac": 0.6878184345, "autogenerated": false, "ratio": 3.89009009009009, "config_test": false, "has_no_keywords": false, ...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm class SGRegisterForm(UserCreationForm): # password1 = forms.CharField(widget=forms.PasswordInput()) # password2 = forms.CharField(widget=forms.PasswordInput()) email = forms.EmailFie...
{ "repo_name": "moniquemtucker/simply-good", "path": "simply_good_django/simply_good_django/forms.py", "copies": "1", "size": "1185", "license": "apache-2.0", "hash": 375991734283312400, "line_mean": 34.9393939394, "line_max": 108, "alpha_frac": 0.6548523207, "autogenerated": false, "ratio": 4.114...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm # Will be deprecated with django-registration class UserRegisterForm(UserCreationForm): class Meta: model = User fields = ('username', 'email', 'password1', 'password2') # U...
{ "repo_name": "dmallcott/C-Nutra", "path": "c_nutra/apps/users/forms.py", "copies": "1", "size": "1868", "license": "mit", "hash": -2189557956195330600, "line_mean": 27.7384615385, "line_max": 71, "alpha_frac": 0.567987152, "autogenerated": false, "ratio": 3.9161425576519915, "config_test": fal...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, UserChangeForm from localflavor.es.forms import * from models import * class ProfesorCreateForm(UserCreationForm): telefono = forms.CharField(required=False) class Meta: model = ...
{ "repo_name": "Etxea/gestion_eide_web", "path": "profesores/forms.py", "copies": "1", "size": "1125", "license": "mit", "hash": 4107932738496664600, "line_mean": 32.0882352941, "line_max": 96, "alpha_frac": 0.6524444444, "autogenerated": false, "ratio": 3.9198606271777003, "config_test": false,...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, UserChangeForm class RegistrationForm(UserCreationForm): email = forms.EmailField(required=True) first_name = forms.CharField(required=True) last_name = forms.CharField(required=Tru...
{ "repo_name": "gbarandiaran/ticksys", "path": "Ticketing_System/ticksys/forms.py", "copies": "1", "size": "1063", "license": "apache-2.0", "hash": -99969043463150560, "line_mean": 23.7209302326, "line_max": 70, "alpha_frac": 0.5738476011, "autogenerated": false, "ratio": 4.18503937007874, "conf...
from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate, login class LoginForm(forms.Form): email = forms.CharField(max_length=256,required=True, error_messages={'required': 'Please enter your email'}) password = forms.CharField(widget=forms.PasswordInp...
{ "repo_name": "TrainerProjectF13X/trainer_web_app", "path": "users/forms.py", "copies": "1", "size": "3258", "license": "mit", "hash": -6528545940154595000, "line_mean": 55.1724137931, "line_max": 166, "alpha_frac": 0.6933701657, "autogenerated": false, "ratio": 4.032178217821782, "config_test"...
from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.contrib.auth.hashers import make_password class RegistrationForm(forms.Form): first_name = forms.CharField() last_name = forms.CharField() username = forms.CharField(required=True)...
{ "repo_name": "miclovich/django-reg-noact", "path": "reg/forms.py", "copies": "1", "size": "1313", "license": "mit", "hash": 4103241055349223400, "line_mean": 37.6470588235, "line_max": 83, "alpha_frac": 0.6389946687, "autogenerated": false, "ratio": 4.4965753424657535, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.core.exceptions import ObjectDoesNotExist from accounts.models import Address login_wrong_username_password = "username/password combination was incorrect" registration_same_email_address = "U...
{ "repo_name": "bharathramh92/shop", "path": "accounts/forms.py", "copies": "1", "size": "7086", "license": "mit", "hash": 2605620470033666600, "line_mean": 36.2947368421, "line_max": 114, "alpha_frac": 0.5474174428, "autogenerated": false, "ratio": 5.108868060562365, "config_test": false, "ha...
from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate from django.utils.translation import ugettext as _ from common import constants class LoginForm(forms.Form): username = forms.EmailField(required = True, widget=forms.EmailInput(attrs={'placeholder':'...
{ "repo_name": "kantanand/insmartapps", "path": "server/learning/login/forms.py", "copies": "1", "size": "1320", "license": "mit", "hash": 1868260209574445800, "line_mean": 39.0303030303, "line_max": 109, "alpha_frac": 0.6666666667, "autogenerated": false, "ratio": 4.631578947368421, "config_tes...
from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate from .models import * class AskForm(forms.Form): title = forms.CharField(max_length=255) text = forms.CharField(widget=forms.Textarea) def save(self): if self._user is not None: self.cleaned_data[...
{ "repo_name": "fantomius/WebTechonologies", "path": "ask/qa/forms.py", "copies": "1", "size": "1316", "license": "mit", "hash": -3742577859729017300, "line_mean": 31.1219512195, "line_max": 123, "alpha_frac": 0.7462006079, "autogenerated": false, "ratio": 3.3743589743589744, "config_test": fals...
from django import forms from django.contrib.auth.models import User from django.contrib.auth import authenticate class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput()) email = forms.EmailField(required=True) class Meta: model = User fields = ('email', '...
{ "repo_name": "MajinBui/django-portal", "path": "portal/forms.py", "copies": "1", "size": "1301", "license": "mit", "hash": 1960476281810140200, "line_mean": 34.1621621622, "line_max": 82, "alpha_frac": 0.6287471176, "autogenerated": false, "ratio": 4.533101045296167, "config_test": false, "h...
from django import forms from django.contrib.auth.models import User from django.contrib.auth import password_validation from . import validators class RegisterForm(forms.ModelForm): email = forms.CharField( max_length=75, validators=[validators.emailUniqueValidator], required=True ) ...
{ "repo_name": "ava-project/ava-website", "path": "website/apps/user/forms.py", "copies": "1", "size": "1161", "license": "mit", "hash": -501780201251675460, "line_mean": 26, "line_max": 75, "alpha_frac": 0.645994832, "autogenerated": false, "ratio": 4.4653846153846155, "config_test": false, "...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.password_validation import validate_password from django.utils.translation import ugettext_lazy as _ from casepro.cases.models import Partner from .models import PARTNER_ROLES, ROLE_ORG_CHOICES, ROLE_PARTNER_CHOICES class ...
{ "repo_name": "rapidpro/casepro", "path": "casepro/profiles/forms.py", "copies": "1", "size": "3856", "license": "bsd-3-clause", "hash": 2911190449116619000, "line_mean": 34.376146789, "line_max": 118, "alpha_frac": 0.6556016598, "autogenerated": false, "ratio": 4.251378169790518, "config_test"...
from django import forms from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.core import urlresolvers from django.db import models from django.db.models import Q from django.views.generic import TemplateView from django_tables2_reports.tables import TableRe...
{ "repo_name": "weijia/django-auto-filter", "path": "django_auto_filter/views_django_auto_filter.py", "copies": "1", "size": "2741", "license": "bsd-3-clause", "hash": -8846341889660840000, "line_mean": 40.5303030303, "line_max": 118, "alpha_frac": 0.6756658154, "autogenerated": false, "ratio": 3....
from django import forms from django.contrib.auth.models import User from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, Http404, HttpResponseForbidden, HttpResponse from django.short...
{ "repo_name": "caiocsalvador/whats_the_craic", "path": "src/profiles/views.py", "copies": "1", "size": "9246", "license": "mit", "hash": 5099824102501224000, "line_mean": 32.6254545455, "line_max": 132, "alpha_frac": 0.7226908934, "autogenerated": false, "ratio": 3.2950819672131146, "config_tes...
from django import forms from django.contrib.auth.models import User from django.contrib.localflavor.us.forms import USPhoneNumberField from django.utils.translation import ugettext_lazy as _ from django.forms.util import ErrorList from django.utils.safestring import mark_safe from django.utils.html import conditional_...
{ "repo_name": "adamfeuer/ArtOfGratitude_app", "path": "gratitude/forms.py", "copies": "1", "size": "5868", "license": "mit", "hash": 9032846929339972, "line_mean": 44.488372093, "line_max": 196, "alpha_frac": 0.6850715746, "autogenerated": false, "ratio": 3.7906976744186047, "config_test": fals...
from django import forms from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.db.models import Q from kiki.models import MailingList, ListUserMetadata SUBSCRIPTION_USER_PASSWORD = '!KIKI!' class HoneypotForm(forms.Fo...
{ "repo_name": "melinath/django-kiki", "path": "kiki/forms.py", "copies": "1", "size": "2571", "license": "bsd-2-clause", "hash": 974888906993409200, "line_mean": 34.7222222222, "line_max": 194, "alpha_frac": 0.7362893816, "autogenerated": false, "ratio": 3.5075034106412004, "config_test": false...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import NON_FIELD_ERRORS from django.db import models from django.forms import HiddenInput from django.shortcuts import resolve_url from django.utils.translation import ugettext as _ class MunchedFeed(models.Model): us...
{ "repo_name": "daniboy/feedmuncher", "path": "app/models.py", "copies": "1", "size": "1465", "license": "isc", "hash": -2068635966498985000, "line_mean": 33.880952381, "line_max": 118, "alpha_frac": 0.6853242321, "autogenerated": false, "ratio": 3.795336787564767, "config_test": false, "has_n...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.core.validators import email_re from ietf.person.models import Email, Person import re class SearchForm(forms.Form): name = forms.CharField(max_length=50,required=False) emai...
{ "repo_name": "mcr/ietfdb", "path": "ietf/secr/rolodex/forms.py", "copies": "1", "size": "4004", "license": "bsd-3-clause", "hash": 7443940792151405000, "line_mean": 32.3666666667, "line_max": 141, "alpha_frac": 0.5946553447, "autogenerated": false, "ratio": 4.310010764262648, "config_test": fa...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.core.validators import validate_email from ietf.person.models import Email, Person import re class SearchForm(forms.Form): name = forms.CharField(max_length=50,required=False) ...
{ "repo_name": "wpjesus/codematch", "path": "ietf/secr/rolodex/forms.py", "copies": "1", "size": "3971", "license": "bsd-3-clause", "hash": 868155916246348200, "line_mean": 31.8181818182, "line_max": 141, "alpha_frac": 0.5900277008, "autogenerated": false, "ratio": 4.311617806731813, "config_tes...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from models import POINT_CHOICES class ChallengedUsersField(forms.Field): """ Field to input a comma separated list of users to challenge. """ def clean(self, value): """...
{ "repo_name": "SnacksOnAPlane/debately", "path": "forms.py", "copies": "1", "size": "1404", "license": "bsd-3-clause", "hash": -7146361481311367000, "line_mean": 28.8723404255, "line_max": 73, "alpha_frac": 0.6495726496, "autogenerated": false, "ratio": 4.129411764705883, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from videostore.forms import StripForm from userprofile.forms import USERNAME_MIN_LENGTH, USERNAME_MAX_LENGTH import payment.utils import userprofile.utils class GetFundsForm(StripForm): userna...
{ "repo_name": "apikler/VideoStore", "path": "site/admincp/forms.py", "copies": "1", "size": "2136", "license": "bsd-2-clause", "hash": -7896071829289592000, "line_mean": 29.9565217391, "line_max": 109, "alpha_frac": 0.7504681648, "autogenerated": false, "ratio": 3.602023608768971, "config_test"...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from django.forms import ModelForm from django.utils.translation import ugettext_lazy as _ from course.models.course import Course from course.models...
{ "repo_name": "fsr/course-management", "path": "course/forms.py", "copies": "1", "size": "4471", "license": "bsd-3-clause", "hash": 8123219485722672000, "line_mean": 28.2222222222, "line_max": 98, "alpha_frac": 0.5821963766, "autogenerated": false, "ratio": 4.41798418972332, "config_test": fals...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.db.models import Q from django.utils.translation import ugettext_lazy as _ from .models import Project, Snapshot, Membership class CatalogChoiceField(forms.ModelChoiceField): def l...
{ "repo_name": "DMPwerkzeug/DMPwerkzeug", "path": "rdmo/projects/forms.py", "copies": "1", "size": "2585", "license": "apache-2.0", "hash": -5923658896390141000, "line_mean": 30.1445783133, "line_max": 129, "alpha_frac": 0.6526112186, "autogenerated": false, "ratio": 4.149277688603531, "config_t...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from casepro.cases.models import Partner from .models import PARTNER_ROLES, ROLE_ORG_CHOICES, ROLE_PARTNER_CHOICES MIN_PASSWORD_LENGTH = 10 ...
{ "repo_name": "praekelt/casepro", "path": "casepro/profiles/forms.py", "copies": "1", "size": "3702", "license": "bsd-3-clause", "hash": 6285543147121205000, "line_mean": 31.7610619469, "line_max": 118, "alpha_frac": 0.6558616964, "autogenerated": false, "ratio": 4.197278911564626, "config_test...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import ValidationError from registration.models import RegistrationKey from django.conf import settings from datetime import datetime class RegistrationForm(forms.Form): error_css_class="error-field" required_css_c...
{ "repo_name": "benjamin-guillet/wmr-frontend", "path": "registration/forms.py", "copies": "2", "size": "2144", "license": "apache-2.0", "hash": -3583323858688761300, "line_mean": 35.9655172414, "line_max": 85, "alpha_frac": 0.6324626866, "autogenerated": false, "ratio": 4.839729119638826, "conf...
from django import forms from django.contrib.auth.models import User from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.urls import reverse from django.db.models import Q from django.utils.translation import gettext_lazy as _ from dal import autocomplete from crispy_forms.helper import ...
{ "repo_name": "django-danceschool/django-danceschool", "path": "danceschool/payments/payatdoor/forms.py", "copies": "1", "size": "6021", "license": "bsd-3-clause", "hash": 7076105612529849000, "line_mean": 33.8034682081, "line_max": 95, "alpha_frac": 0.6063776781, "autogenerated": false, "ratio":...
from django import forms from django.contrib.auth.models import User from django.core import validators from django.core.exceptions import ValidationError from django.utils.translation import ugettext as _ class TypedMultipleChoiceField(forms.MultipleChoiceField): """Coerce choices to a specific type and don't va...
{ "repo_name": "anushbmx/kitsune", "path": "kitsune/sumo/form_fields.py", "copies": "1", "size": "2930", "license": "bsd-3-clause", "hash": -652668618203938200, "line_mean": 38.0666666667, "line_max": 79, "alpha_frac": 0.6197952218, "autogenerated": false, "ratio": 4.703049759229534, "config_tes...
from django import forms from django.contrib.auth.models import User from django.core import validators from django.utils.translation import ugettext_lazy as _ from django.conf import settings class RegistrationForm(forms.Form): username = forms.CharField( widget = forms.TextInput ...
{ "repo_name": "CodeForTheCaribbean/HarvestAPI", "path": "farmers/forms.py", "copies": "1", "size": "4055", "license": "mit", "hash": -2685368666835054600, "line_mean": 37.619047619, "line_max": 94, "alpha_frac": 0.536621455, "autogenerated": false, "ratio": 4.945121951219512, "config_test": fal...
from django import forms from django.contrib.auth.models import User from django.core.paginator import Paginator from django.shortcuts import render from django.utils.translation import ugettext as _ from wagtail.admin import messages from wagtail.admin.forms.search import SearchForm from wagtail.admin.rich_text impor...
{ "repo_name": "nealtodd/wagtail", "path": "wagtail/contrib/styleguide/views.py", "copies": "4", "size": "3140", "license": "bsd-3-clause", "hash": -4311563020999505400, "line_mean": 37.2926829268, "line_max": 99, "alpha_frac": 0.6898089172, "autogenerated": false, "ratio": 4.142480211081794, "c...
from django import forms from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.test import TestCase from django_hstore.forms import ReferencesFieldWidget from django_hstore.utils import acquire_reference, serialize_references, unserialize_references from django_hstore_te...
{ "repo_name": "djangonauts/django-hstore", "path": "tests/django_hstore_tests/tests/test_reference_field.py", "copies": "1", "size": "8289", "license": "mit", "hash": -4214930173743887400, "line_mean": 42.171875, "line_max": 122, "alpha_frac": 0.6256484498, "autogenerated": false, "ratio": 3.6180...
from django import forms from django.contrib.auth.models import User from django.core.validators import EmailValidator # crispy forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Fieldset, Submit, Div, HTML class RegisterForm(forms.ModelForm): class Meta: model = User...
{ "repo_name": "pawel-wlk/ecommerce-site", "path": "mysite/info/registerform.py", "copies": "1", "size": "1717", "license": "mit", "hash": 4875256181966859000, "line_mean": 34.75, "line_max": 139, "alpha_frac": 0.6148018648, "autogenerated": false, "ratio": 4.333333333333333, "config_test": fals...
from django import forms from django.contrib.auth.models import User from django.core.validators import RegexValidator, MinLengthValidator, MaxLengthValidator class SignupFormRecaptcha(forms.Form): Username = forms.CharField(required=True, validators=[ RegexValidator('^[0-9a-zA-Z]*$', message='Usernames can only c...
{ "repo_name": "BryceBrown/LinkstrDjango", "path": "FrontEnd/forms.py", "copies": "1", "size": "1507", "license": "apache-2.0", "hash": 192410620032783400, "line_mean": 42.0571428571, "line_max": 123, "alpha_frac": 0.7531519575, "autogenerated": false, "ratio": 3.73019801980198, "config_test": f...
from django import forms from django.contrib.auth.models import User from django.core.validators import RegexValidator from django.forms import ModelForm, Form, ValidationError from django.forms.models import modelform_factory from django.utils.translation import ugettext as _ from bookswap.models import BookSwapPerso...
{ "repo_name": "tbpmig/mig-website", "path": "bookswap/forms.py", "copies": "1", "size": "4660", "license": "apache-2.0", "hash": -6953363506049607000, "line_mean": 37.2049180328, "line_max": 86, "alpha_frac": 0.5924892704, "autogenerated": false, "ratio": 4.15700267618198, "config_test": false,...
from django import forms from django.contrib.auth.models import User from django.core.validators import RegexValidator from .models import Testimonial, SiteUser validate_account = RegexValidator(r'^[0-9]{4}\-[0-9]{2}$', message="Account numbers must take the form ####-##") class LoginForm(forms.Form): account =...
{ "repo_name": "mgerst/cdc2-2015-www", "path": "cdc/forms.py", "copies": "2", "size": "2079", "license": "mit", "hash": 1478529406296317400, "line_mean": 28.2957746479, "line_max": 112, "alpha_frac": 0.6863876864, "autogenerated": false, "ratio": 3.7191413237924866, "config_test": false, "has_...
from django import forms from django.contrib.auth.models import User from django.core.validators import RegexValidator from .models import UserProfile, Poem, Word numeric = RegexValidator(r'^[0-9]*$', 'Only numeric characters are allowed.') class AForm(forms.Form): username = forms.CharField(max_length=4, min_leng...
{ "repo_name": "seriouscamp/frbb", "path": "web/frbb/forms.py", "copies": "1", "size": "7381", "license": "apache-2.0", "hash": 2637943611696624000, "line_mean": 44.006097561, "line_max": 120, "alpha_frac": 0.6205121257, "autogenerated": false, "ratio": 3.583009708737864, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.core.validators import RegexValidator from reddit.models import Submission from users.models import RedditUser class UserForm(forms.ModelForm): alphanumeric = RegexValidator(r'^[0-9a-zA-Z_]*$', 'Thi...
{ "repo_name": "Nikola-K/django_reddit", "path": "reddit/forms.py", "copies": "1", "size": "3513", "license": "apache-2.0", "hash": -5825890763244379000, "line_mean": 27.5609756098, "line_max": 73, "alpha_frac": 0.5351551381, "autogenerated": false, "ratio": 4.217286914765906, "config_test": fal...
from django import forms from django.contrib.auth.models import User from django.core.validators import RegexValidator # we should use email validation: http://stackoverflow.com/questions/3217682/checking-validity-of-email-in-django-python # http://stackoverflow.com/questions/20192144/creating-custom-user-registration...
{ "repo_name": "seadsystem/website", "path": "seadssite/forms.py", "copies": "2", "size": "2613", "license": "mit", "hash": 4704706706097331000, "line_mean": 42.55, "line_max": 144, "alpha_frac": 0.6708763873, "autogenerated": false, "ratio": 4.0828125, "config_test": false, "has_no_keywords":...
from django import forms from django.contrib.auth.models import User from django.db import models # ------------------------------------------------------------------------------ # MAIN ENTITY SETS # ------------------------------------------------------------------------------ class Event(models.Model): EVENT_TY...
{ "repo_name": "chriscyang/musicon", "path": "musicon/models.py", "copies": "2", "size": "4706", "license": "mit", "hash": 5898079082351976000, "line_mean": 35.2, "line_max": 121, "alpha_frac": 0.5597110072, "autogenerated": false, "ratio": 3.8012924071082392, "config_test": false, "has_no_key...
from django import forms from django.contrib.auth.models import User from django.db.models import Q from django.utils.translation import ugettext_lazy as _, ugettext from satchmo.configuration import config_value, config_get_group, SettingNotSet, SHOP_GROUP from satchmo.contact.models import Contact, AddressBook, Phone...
{ "repo_name": "roadhead/satchmo", "path": "satchmo/contact/forms.py", "copies": "2", "size": "16522", "license": "bsd-3-clause", "hash": -7524491406138465000, "line_mean": 42.3648293963, "line_max": 161, "alpha_frac": 0.5980510834, "autogenerated": false, "ratio": 4.265943712884069, "config_tes...
from django import forms from django.contrib.auth.models import User from django.db.models import Q from basicviz.constants import AVAILABLE_OPTIONS from basicviz.models import SystemOptions, Experiment, UserExperiment, BVFeatureSet, PublicExperiments from motifdb.models import MDBMotifSet class DocFilterForm(forms....
{ "repo_name": "sdrogers/ms2ldaviz", "path": "ms2ldaviz/basicviz/forms.py", "copies": "1", "size": "7618", "license": "mit", "hash": -43934027096019336, "line_mean": 61.9669421488, "line_max": 152, "alpha_frac": 0.6386190601, "autogenerated": false, "ratio": 4.368119266055046, "config_test": fal...
from django import forms from django.contrib.auth.models import User from django.db.models import Q from motifdb.models import MDBMotifSet from basicviz.models import Experiment,BVFeatureSet,UserExperiment,PublicExperiments class MatchMotifDBForm(forms.Form): motif_set = forms.ModelChoiceField(queryset = MDBMotif...
{ "repo_name": "sdrogers/ms2ldaviz", "path": "ms2ldaviz/motifdb/forms.py", "copies": "1", "size": "7350", "license": "mit", "hash": 2800799610446591500, "line_mean": 44.9375, "line_max": 128, "alpha_frac": 0.6455782313, "autogenerated": false, "ratio": 3.5976505139500734, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.forms.extras.widgets import SelectDateWidget from datetime import date from django.core import validators import re from django.utils.encoding import force_unicode from itertools import chain __all__ = [ 'UniqueEmailField','U...
{ "repo_name": "vivek2010/django_bolts", "path": "django_bolts/forms/fields.py", "copies": "1", "size": "5794", "license": "mit", "hash": -6763544194668459000, "line_mean": 36.6298701299, "line_max": 117, "alpha_frac": 0.5945806006, "autogenerated": false, "ratio": 4.219956300072833, "config_tes...
from django import forms from django.contrib.auth.models import User from django.forms.fields import IntegerField from django.forms.models import modelformset_factory, BaseModelFormSet from django.contrib.auth.models import User from issues.models import Project from issues.models import Milestone from issues.models i...
{ "repo_name": "encorehu/django-issues", "path": "issues/forms.py", "copies": "1", "size": "5085", "license": "mit", "hash": 3940406559222188000, "line_mean": 39.3571428571, "line_max": 129, "alpha_frac": 0.6680432645, "autogenerated": false, "ratio": 4.117408906882591, "config_test": false, "...
from django import forms from django.contrib.auth.models import User from django.forms.formsets import formset_factory from realestate.home.models import Contact from realestate.listing.models import Location, TYPES, OFFERS, Agent, Attribute, Listing, ListingImage, AttributeListing from constance import config, setting...
{ "repo_name": "wm3ndez/realestate", "path": "realestate/admin/forms.py", "copies": "1", "size": "3413", "license": "bsd-2-clause", "hash": -8780993008012078000, "line_mean": 41.1481481481, "line_max": 120, "alpha_frac": 0.6870788163, "autogenerated": false, "ratio": 3.9095074455899197, "config_...
from django import forms from django.contrib.auth.models import User from django.forms import BaseModelFormSet from .models import Profile class BaseUserFormSet(BaseModelFormSet): def __init__(self, *args, **kwargs): user = kwargs["form_kwargs"].pop("user") super(BaseUserFormSet, self).__init__(...
{ "repo_name": "Benoss/django-cookiecutter", "path": "{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/apps/profile/forms.py", "copies": "1", "size": "1147", "license": "apache-2.0", "hash": 6362361298240598000, "line_mean": 30.8611111111, "line_max": 79, "alpha_frac": 0.6085440279, "auto...
from django import forms from django.contrib.auth.models import User from django.forms import Form, ModelForm from models import Post, Category from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit class PostForm(ModelForm): categories = forms.ModelMul...
{ "repo_name": "Applied-GeoSolutions/threadedforum", "path": "forum/forms.py", "copies": "1", "size": "1642", "license": "mit", "hash": -3035621970062362600, "line_mean": 28.8545454545, "line_max": 98, "alpha_frac": 0.5889159562, "autogenerated": false, "ratio": 4.064356435643564, "config_test":...
from django import forms from django.contrib.auth.models import User from django.forms import ModelChoiceField from django.utils import timezone from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from .models import * from .constants import STATE_PROV_TUPLE, FLAG_CHOI...
{ "repo_name": "asterix135/infonex_crm", "path": "crm/forms.py", "copies": "1", "size": "18123", "license": "mit", "hash": -4110277808556129000, "line_mean": 33.9190751445, "line_max": 83, "alpha_frac": 0.4406003421, "autogenerated": false, "ratio": 4.878331090174966, "config_test": false, "ha...
from django import forms from django.contrib.auth.models import User from django.forms import ModelForm from artapp.models import Artist, Art from django.template.defaultfilters import slugify class RegistrationForm(ModelForm): username = forms.CharField(label=(u'User Name')) email = forms.EmailField(label=(u'Em...
{ "repo_name": "khenness/asciiartdatabase", "path": "artapp/forms.py", "copies": "1", "size": "2407", "license": "apache-2.0", "hash": -80668577666341220, "line_mean": 33.4, "line_max": 107, "alpha_frac": 0.7436643124, "autogenerated": false, "ratio": 3.508746355685131, "config_test": false, "...
from django import forms from django.contrib.auth.models import User from django.forms import ModelForm from django.contrib.auth.forms import UserCreationForm from ranker.models import Project, Item from multiupload.fields import MultiFileField class UserCreateForm(UserCreationForm): email = forms.EmailField(requi...
{ "repo_name": "cmaclell/humanranker", "path": "ranker/forms.py", "copies": "1", "size": "1963", "license": "mit", "hash": -8768433133617753000, "line_mean": 34.6909090909, "line_max": 77, "alpha_frac": 0.6036678553, "autogenerated": false, "ratio": 3.669158878504673, "config_test": false, "ha...
from django import forms from django.contrib.auth.models import User from django.forms import ModelForm from drinker.models import Drinker class RegistrationForm(ModelForm): username = forms.CharField(label=u'User Name') name = forms.CharField(label=u'Name') email = forms.EmailField(label=u'Email Address'...
{ "repo_name": "OckiFals/crud-django", "path": "drinker/forms.py", "copies": "1", "size": "1678", "license": "mit", "hash": -1890694458552517400, "line_mean": 31.9215686275, "line_max": 79, "alpha_frac": 0.6460071514, "autogenerated": false, "ratio": 4.358441558441559, "config_test": false, "h...
from django import forms from django.contrib.auth.models import User from django.forms import ModelForm from fox.models import Fox from django.contrib.auth import authenticate class RegistrationForm(ModelForm): """ Form that takes multiple inputs for a Fox object and a User object. """ username = forms.CharField(l...
{ "repo_name": "TechnicalFox/Fox-Latch", "path": "site/fox/forms.py", "copies": "1", "size": "4657", "license": "mit", "hash": 5053968291628203000, "line_mean": 31.7957746479, "line_max": 108, "alpha_frac": 0.6484861499, "autogenerated": false, "ratio": 4.439466158245948, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.forms import ModelForm from quizzer.models import Quizzer class RegistrationForm(ModelForm): username = forms.CharField(label=(u'User Name')) email = forms.EmailField(label=(u'Email Address')) password ...
{ "repo_name": "kaushiksk/Qrios", "path": "quizzer/forms.py", "copies": "1", "size": "1354", "license": "mit", "hash": 4653780336858788000, "line_mean": 42.6774193548, "line_max": 113, "alpha_frac": 0.6617429838, "autogenerated": false, "ratio": 4.42483660130719, "config_test": false, "has_no_...
from django import forms from django.contrib.auth.models import User from django.forms import ModelForm from django.contrib.auth.forms import UserCreationForm from survey.models.users import UserProfile class UserForm(UserCreationForm): mobile_number = forms.DecimalField(min_value=100000000, ...
{ "repo_name": "antsmc2/mics", "path": "survey/forms/users.py", "copies": "2", "size": "6451", "license": "bsd-3-clause", "hash": 6463188079183105000, "line_mean": 40.3525641026, "line_max": 104, "alpha_frac": 0.5803751356, "autogenerated": false, "ratio": 4.29208250166334, "config_test": false,...
from django import forms from django.contrib.auth.models import User from django.forms import ModelForm class UserRegistrationForm(ModelForm): password = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.CharField(label='Repeat password', widget=fo...
{ "repo_name": "le4ndro/homeinventory", "path": "homeinventory/accounts/forms.py", "copies": "1", "size": "1406", "license": "mit", "hash": -6529259279255312000, "line_mean": 29.5652173913, "line_max": 76, "alpha_frac": 0.6017069701, "autogenerated": false, "ratio": 4.326153846153846, "config_te...
from django import forms from django.contrib.auth.models import User from django.forms import Textarea from .models import JobPost class JobPostForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(JobPostForm, self).__init__(*args, **kwargs) self.fields["agree_to_terms"].required = T...
{ "repo_name": "chicagopython/chipy.org", "path": "chipy_org/apps/job_board/forms.py", "copies": "1", "size": "1949", "license": "mit", "hash": -4477436189860732000, "line_mean": 29.453125, "line_max": 142, "alpha_frac": 0.5074397127, "autogenerated": false, "ratio": 4.283516483516483, "config_t...
from django import forms from django.contrib.auth.models import User from django.forms import ValidationError from dal import autocomplete from mozillians.users.models import AbuseReport, ExternalAccount, UserProfile, Vouch class VouchAutocompleteForm(forms.ModelForm): class Meta: model = Vouch ...
{ "repo_name": "mozilla/mozillians", "path": "mozillians/users/admin_forms.py", "copies": "3", "size": "2623", "license": "bsd-3-clause", "hash": -924562105086815500, "line_mean": 32.6282051282, "line_max": 84, "alpha_frac": 0.647731605, "autogenerated": false, "ratio": 4.150316455696203, "confi...
from django import forms from django.contrib.auth.models import User from django.forms import widgets from django.forms.models import inlineformset_factory, formset_factory from recipe_app.models import Ingredient, Recipe, UserProfile, MealType, \ MEASUREMENTUNIT_CHOICES, Favorite class MealTypeForm(forms.Form):...
{ "repo_name": "mpollachek/Recipe_website_project", "path": "recipes/recipe_app/forms.py", "copies": "1", "size": "1732", "license": "apache-2.0", "hash": 40591580413453810, "line_mean": 28.3559322034, "line_max": 113, "alpha_frac": 0.6951501155, "autogenerated": false, "ratio": 3.7489177489177488...
from django import forms from django.contrib.auth.models import User from django.forms import widgets from django.utils.translation import ugettext_lazy as _ class CartForm(forms.Form): customer_name = forms.CharField(label=_("Name:"), required=True, widget=forms.TextInput(attrs={'placeholder': 'First and Last Name',...
{ "repo_name": "smhilde/dhhd_project", "path": "dhhd/store/forms.py", "copies": "1", "size": "1389", "license": "apache-2.0", "hash": 2071503009098648000, "line_mean": 91.6666666667, "line_max": 173, "alpha_frac": 0.7185025198, "autogenerated": false, "ratio": 3.7338709677419355, "config_test": ...
from django import forms from django.contrib.auth.models import User from django.forms.models import inlineformset_factory from django.core.exceptions import ValidationError from pontoon.base.models import ( Entity, ExternalResource, Locale, Project, Repository, Subpage, ) from pontoon.base.for...
{ "repo_name": "mathjazz/pontoon", "path": "pontoon/administration/forms.py", "copies": "2", "size": "3108", "license": "bsd-3-clause", "hash": -7852299642181990000, "line_mean": 25.7931034483, "line_max": 83, "alpha_frac": 0.6032818533, "autogenerated": false, "ratio": 4.251709986320109, "confi...
from django import forms from django.contrib.auth.models import User from django.forms.models import inlineformset_factory from pontoon.base.models import ( Entity, ExternalResource, Locale, Project, Repository, Subpage, ) from pontoon.base.forms import HtmlField from pontoon.tags.models import...
{ "repo_name": "jotes/pontoon", "path": "pontoon/administration/forms.py", "copies": "1", "size": "2675", "license": "bsd-3-clause", "hash": -493168139843927700, "line_mean": 24.4761904762, "line_max": 83, "alpha_frac": 0.5936448598, "autogenerated": false, "ratio": 4.1796875, "config_test": fal...
from django import forms from django.contrib.auth.models import User from django.forms.models import inlineformset_factory from pontoon.base.models import Project, Repository, Subpage, ExternalResource from pontoon.base.forms import HtmlField class ContactChoiceField(forms.ModelChoiceField): def label_from_insta...
{ "repo_name": "mastizada/pontoon", "path": "pontoon/administration/forms.py", "copies": "1", "size": "1806", "license": "bsd-3-clause", "hash": -8571204184816302000, "line_mean": 27.6666666667, "line_max": 83, "alpha_frac": 0.6428571429, "autogenerated": false, "ratio": 4.013333333333334, "conf...
from django import forms from django.contrib.auth.models import User from django.forms.models import inlineformset_factory from pontoon.base.models import Project, Repository, Subpage class ContactChoiceField(forms.ModelChoiceField): def label_from_instance(self, obj): return obj.email class ProjectFor...
{ "repo_name": "participedia/pontoon", "path": "pontoon/administration/forms.py", "copies": "1", "size": "1136", "license": "bsd-3-clause", "hash": -2408226572328447500, "line_mean": 28.8947368421, "line_max": 83, "alpha_frac": 0.6813380282, "autogenerated": false, "ratio": 3.8378378378378377, "...
from django import forms from django.contrib.auth.models import User from django.forms.widgets import HiddenInput from oncall.models import OncallTimestamp, OncallAssignment from oncall.constants import ONCALL_TYPES def make_choices(oncall_type): oncall_users = User.objects.filter(**{oncall_type: 1}) return ...
{ "repo_name": "rtucker-mozilla/mozilla_inventory", "path": "oncall/forms.py", "copies": "1", "size": "2509", "license": "bsd-3-clause", "hash": -3117135357323218000, "line_mean": 34.8428571429, "line_max": 79, "alpha_frac": 0.5731367079, "autogenerated": false, "ratio": 4.0144, "config_test": f...
from django import forms from django.contrib.auth.models import User from django.forms.widgets import SelectDateWidget from datetime import datetime from .models import Alumno, Profesor class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput()) class Meta: model = User ...
{ "repo_name": "Hikasgai/HikasgaiApp", "path": "usuarios/forms.py", "copies": "1", "size": "1728", "license": "mit", "hash": -3098399364963644000, "line_mean": 45.7027027027, "line_max": 116, "alpha_frac": 0.6429398148, "autogenerated": false, "ratio": 3.5121951219512195, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.utils.crypto import get_random_string from channels import Channel from .models import Invitation class InvitationForm(forms.ModelForm): share_book = forms.BooleanField(required=False) class Meta: model = Invitation ...
{ "repo_name": "phildini/logtacts", "path": "invitations/forms.py", "copies": "1", "size": "1541", "license": "mit", "hash": -8039868514935179, "line_mean": 29.2156862745, "line_max": 84, "alpha_frac": 0.649578196, "autogenerated": false, "ratio": 4.076719576719577, "config_test": false, "has_...
from django import forms from django.contrib.auth.models import User from django.utils.crypto import get_random_string from .models import Invitation class InvitationForm(forms.ModelForm): class Meta: model = Invitation fields = ['email'] def clean(self): try: existing_u...
{ "repo_name": "phildini/bockus", "path": "invites/forms.py", "copies": "1", "size": "1217", "license": "mit", "hash": -6978754414902189000, "line_mean": 26.0444444444, "line_max": 74, "alpha_frac": 0.6318816763, "autogenerated": false, "ratio": 4.139455782312925, "config_test": false, "has_no...
from django import forms from django.contrib.auth.models import User from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from .models import * from .widgets import MonthYearWidget from crm.models import Event from crm.constants import COMPANY_OPTIONS, BILLING_CURRENCY from .consta...
{ "repo_name": "asterix135/infonex_crm", "path": "registration/forms.py", "copies": "1", "size": "13954", "license": "mit", "hash": -4257329249707799000, "line_mean": 33.0341463415, "line_max": 79, "alpha_frac": 0.4854522001, "autogenerated": false, "ratio": 4.345686701962006, "config_test": fal...
from django import forms from django.contrib.auth.models import User from django.utils.safestring import mark_safe from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Field, Div, HTML, ButtonHolder from crispy_forms.bootstrap import InlineRadios, InlineCheckboxes from web.models...
{ "repo_name": "ocwc/directory", "path": "directory/web/forms.py", "copies": "1", "size": "6007", "license": "apache-2.0", "hash": 4259362983948328400, "line_mean": 40.1438356164, "line_max": 234, "alpha_frac": 0.5951390045, "autogenerated": false, "ratio": 3.9467805519053876, "config_test": fal...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from django.conf import settings import re username_re = re.compile('^[a-zA-Z0-9]+$') class RegistrationForm(forms.Form): """ Registration form for new users. """ username =...
{ "repo_name": "simonw/bugle_project", "path": "bugle_project/registration/forms.py", "copies": "1", "size": "2030", "license": "bsd-2-clause", "hash": -7252334679652603000, "line_mean": 36.5925925926, "line_max": 108, "alpha_frac": 0.6118226601, "autogenerated": false, "ratio": 4.432314410480349,...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from django.contrib.auth.forms import AuthenticationForm as AuthForm from django.contrib.auth import authenticate class RegistrationForm(forms.Form): email = forms.EmailField() password1 = f...
{ "repo_name": "agiliq/join.agiliq.com", "path": "user_profile/forms.py", "copies": "1", "size": "2492", "license": "bsd-3-clause", "hash": -5170669766911734000, "line_mean": 41.2372881356, "line_max": 79, "alpha_frac": 0.5987158909, "autogenerated": false, "ratio": 4.710775047258979, "config_te...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from inviter.models import OptOut class RegistrationForm(forms.ModelForm): """ The standard form that is displayed to users when registering. It gives a user the option to change their email...
{ "repo_name": "caffeinehit/django-inviter", "path": "inviter/forms.py", "copies": "1", "size": "1956", "license": "mit", "hash": -2324339357010224000, "line_mean": 35.9056603774, "line_max": 101, "alpha_frac": 0.6416155419, "autogenerated": false, "ratio": 4.327433628318584, "config_test": fals...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ #for translating to host language class RegistrationForm(forms.Form): username = forms.RegexField( regex=r'^\w+$', widget=forms.TextInput(attrs=dict(required=True, max_length=30)), labe...
{ "repo_name": "adam2392/smile", "path": "smile/accounts/forms.py", "copies": "1", "size": "1762", "license": "apache-2.0", "hash": -6409167508132395000, "line_mean": 40, "line_max": 98, "alpha_frac": 0.7133938706, "autogenerated": false, "ratio": 3.748936170212766, "config_test": false, "has_...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from ajax_select.fields import AutoCompleteSelectMultipleField, AutoCompleteSelectField from django.forms.extras.widgets import SelectDateWidget from django.contrib.localflavor.us.forms import US...
{ "repo_name": "swiharta/radres", "path": "radprofile/forms.py", "copies": "1", "size": "3689", "license": "mit", "hash": 7510522932450534000, "line_mean": 36.2727272727, "line_max": 153, "alpha_frac": 0.6627812415, "autogenerated": false, "ratio": 3.82279792746114, "config_test": false, "has_...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.utils.safestring import mark_safe class FormPureRender: def as_pure_aligned(self): html = '' for f in self: html += '<div class="pure-control-group">...
{ "repo_name": "CCrypto/ccvpn3", "path": "lambdainst/forms.py", "copies": "1", "size": "2071", "license": "mit", "hash": 5313282789925889000, "line_mean": 31.359375, "line_max": 83, "alpha_frac": 0.5557701593, "autogenerated": false, "ratio": 4.100990099009901, "config_test": false, "has_no_ke...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from oxybeles.models import PastedItem try: from notification import models as notification except ImportError: notification = None class PastedItemForm(forms.ModelForm): class Meta...
{ "repo_name": "fernandoacorreia/oxybeles", "path": "forms.py", "copies": "1", "size": "1839", "license": "bsd-3-clause", "hash": 3987357077617666000, "line_mean": 35.78, "line_max": 81, "alpha_frac": 0.6128330614, "autogenerated": false, "ratio": 4.1512415349887135, "config_test": false, "has...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ #form to display user registration class RegistrationForm(forms.Form): # form fields for user registration, use widget class which give us the opportunity to customize form field with diff...
{ "repo_name": "jmennen/group5", "path": "Code/buzzit/buzzit_app/forms.py", "copies": "1", "size": "2270", "license": "bsd-2-clause", "hash": -7981731949262264000, "line_mean": 69.9375, "line_max": 233, "alpha_frac": 0.7215859031, "autogenerated": false, "ratio": 4.157509157509158, "config_test"...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from Application.models import Section, UserProfile, Comment from Application.service.profile_services import exists_user from Application.service.feed_services import get_feeds_by_user class ...
{ "repo_name": "andjimrio/LTN", "path": "Application/forms.py", "copies": "1", "size": "3229", "license": "mit", "hash": 5288698325478160000, "line_mean": 40.3974358974, "line_max": 126, "alpha_frac": 0.6726540725, "autogenerated": false, "ratio": 4.182642487046632, "config_test": false, "has_...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from datetimewidget.widgets import DateTimeWidget from datetime import datetime from djangular.forms import NgFormValidationMixin, NgModelForm from djangular.styling.bootstrap3.forms import Bo...
{ "repo_name": "GeorgeZhukov/taskmanager", "path": "taskmanager/tasks/forms.py", "copies": "1", "size": "1988", "license": "mit", "hash": -8086811069836929000, "line_mean": 38, "line_max": 118, "alpha_frac": 0.615694165, "autogenerated": false, "ratio": 4.487584650112867, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from entities.models import Entity from chosen import forms as chosenforms from links.forms import add_link_fields, save_links from models import * class ProfileForm(forms.Form): first_nam...
{ "repo_name": "hasadna/open-shot", "path": "user/forms.py", "copies": "1", "size": "4299", "license": "bsd-3-clause", "hash": -566835254306295600, "line_mean": 45.2258064516, "line_max": 147, "alpha_frac": 0.5675738544, "autogenerated": false, "ratio": 4.45954356846473, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from logins.models import UserProfile class UserForm(forms.ModelForm): """ A form that creates a user, with no privileges, from the given username and password. """ error_m...
{ "repo_name": "adamwen/qdulab", "path": "logins/forms.py", "copies": "1", "size": "2451", "license": "mit", "hash": 2917184434679841000, "line_mean": 34.5217391304, "line_max": 79, "alpha_frac": 0.6054671563, "autogenerated": false, "ratio": 4.489010989010989, "config_test": false, "has_no_ke...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from .mailchimp import subscribe_user class RegistrationForm(forms.Form): username = forms.CharField(label=_('Username')) first_name = forms.CharField(label=_('First Name'), required=F...
{ "repo_name": "samitnuk/online_shop", "path": "apps/accounts/forms.py", "copies": "1", "size": "2739", "license": "mit", "hash": 6722709414075570000, "line_mean": 35.52, "line_max": 78, "alpha_frac": 0.589996349, "autogenerated": false, "ratio": 4.847787610619469, "config_test": false, "has_n...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from profiles.models import Profile class ProfileForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(ProfileForm, self).__init__(*args, **kwargs) self.fi...
{ "repo_name": "pythonchelle/opencomparison", "path": "apps/profiles/forms.py", "copies": "1", "size": "1053", "license": "mit", "hash": -5060416021672378000, "line_mean": 29.0857142857, "line_max": 100, "alpha_frac": 0.5451092118, "autogenerated": false, "ratio": 4.538793103448276, "config_test...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from registration.forms import RegistrationForm, ActivationForm class ExampleRegistrationForm(RegistrationForm): def clean_email(self): if User.objects.filter(email__iexact=self.cle...
{ "repo_name": "rafaduran/django-pluggable-registration", "path": "example/exampleapp/forms.py", "copies": "1", "size": "1594", "license": "bsd-3-clause", "hash": 1426300249941345000, "line_mean": 42.0810810811, "line_max": 81, "alpha_frac": 0.6148055207, "autogenerated": false, "ratio": 4.7440476...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from utils import email_to_username class RegistrationForm(forms.Form): """ Our form for registering a new account. This uses the user's email as their credentials. """ erro...
{ "repo_name": "paulcwatts/django-auth-utils", "path": "auth_utils/forms.py", "copies": "1", "size": "2089", "license": "bsd-3-clause", "hash": 5258595514186520000, "line_mean": 37.6851851852, "line_max": 121, "alpha_frac": 0.6208712303, "autogenerated": false, "ratio": 4.69438202247191, "config...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ class InviteForm(forms.Form): email = forms.EmailField() def clean_email(self): email = self.cleaned_data['email'] users = User.objects.filter(email=email) if u...
{ "repo_name": "django-stars/dash2011", "path": "presence/apps/people/forms.py", "copies": "1", "size": "1674", "license": "bsd-3-clause", "hash": -3799192540546429000, "line_mean": 29.4363636364, "line_max": 77, "alpha_frac": 0.6152927121, "autogenerated": false, "ratio": 4.475935828877005, "co...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ class ProfileForm(forms.ModelForm): first_name = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'}), max_length=30, label=_('First Name'), required=Fal...
{ "repo_name": "qulc/bootcamp", "path": "bootcamp/core/forms.py", "copies": "2", "size": "2844", "license": "mit", "hash": 824369489564376300, "line_mean": 37.9589041096, "line_max": 75, "alpha_frac": 0.6336146273, "autogenerated": false, "ratio": 3.9665271966527196, "config_test": false, "has...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ try: from notification import models as notification except ImportError: notification = None from announcements.models import Announcement class AnnouncementAdminForm(forms.ModelForm)...
{ "repo_name": "brosner/django-announcements", "path": "announcements/forms.py", "copies": "1", "size": "1316", "license": "mit", "hash": -4310952512276529000, "line_mean": 31.9, "line_max": 77, "alpha_frac": 0.6588145897, "autogenerated": false, "ratio": 4.617543859649123, "config_test": false,...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext, ugettext_lazy as _ class SignupForm(forms.ModelForm): password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput()) password2 = forms.CharField(label=_("Password Confirmation"),...
{ "repo_name": "skeuomorf/Binge", "path": "binge/accounts/forms.py", "copies": "1", "size": "1067", "license": "mit", "hash": 1896988621251058200, "line_mean": 33.4193548387, "line_max": 95, "alpha_frac": 0.633552015, "autogenerated": false, "ratio": 4.355102040816327, "config_test": false, "h...
from django import forms from django.contrib.auth.models import User from djview.models import Category from djview.models import Page from djview.models import UserProfile class CategoryForm(forms.ModelForm): name = forms.CharField(max_length=128, help_text='Please enter the category name.') views =...
{ "repo_name": "rklabs/djaaks", "path": "djview/forms.py", "copies": "1", "size": "1569", "license": "mit", "hash": 6152018735577296000, "line_mean": 29.1730769231, "line_max": 83, "alpha_frac": 0.6469088591, "autogenerated": false, "ratio": 4.172872340425532, "config_test": false, "has_no_key...