text
stringlengths
0
1.05M
meta
dict
from django import forms from django.contrib.auth import get_user_model from crispy_forms.helper import FormHelper from crispy_forms.layout import Div, Layout from .models import UserProfile class UserProfileForm(forms.ModelForm): class Meta: model = UserProfile fields = ("timezone", 'maximum_d...
{ "repo_name": "tndatacommons/tndata_backend", "path": "tndata_backend/userprofile/forms.py", "copies": "2", "size": "2053", "license": "mit", "hash": -2048048927171505000, "line_mean": 30.1060606061, "line_max": 78, "alpha_frac": 0.5338528982, "autogenerated": false, "ratio": 4.386752136752137, ...
from django import forms from django.contrib.auth import get_user_model from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Field, Submit from . import models class Invoice(forms.ModelForm): cc = forms.ModelMultipleChoiceField( queryset=get_user_model().objects.all(), ...
{ "repo_name": "linovia/wight-invoices", "path": "wightinvoices/invoice/forms.py", "copies": "1", "size": "2525", "license": "mit", "hash": 3381986839971845600, "line_mean": 27.6931818182, "line_max": 65, "alpha_frac": 0.5885148515, "autogenerated": false, "ratio": 4.020700636942675, "config_tes...
from django import forms from django.contrib.auth import get_user_model from decisiontree.multitenancy.forms import TenancyModelForm from .. import models from .fields import TagField MAX_LENGTH_CHOICES = ( (160, 'English'), (70, 'Arabic'), ) class AnswerCreateUpdateForm(TenancyModelForm): class Meta...
{ "repo_name": "caktus/rapidsms-decisiontree-app", "path": "decisiontree/forms/forms.py", "copies": "1", "size": "5306", "license": "bsd-3-clause", "hash": -4182576983386758700, "line_mean": 34.8513513514, "line_max": 90, "alpha_frac": 0.635883905, "autogenerated": false, "ratio": 3.88717948717948...
from django import forms from django.contrib.auth import get_user_model from .hooks import hookset from .models import Message class UserModelChoiceField(forms.ModelChoiceField): def label_from_instance(self, obj): return hookset.display_name(obj) class UserModelMultipleChoiceField(forms.ModelMultiple...
{ "repo_name": "pinax/pinax-messages", "path": "pinax/messages/forms.py", "copies": "1", "size": "2585", "license": "mit", "hash": -1233269215145651700, "line_mean": 30.5243902439, "line_max": 87, "alpha_frac": 0.6243713733, "autogenerated": false, "ratio": 3.801470588235294, "config_test": fals...
from django import forms from django.contrib.auth import get_user_model from . import widgets User = get_user_model() class PageForm(forms.Form): @classmethod def setup(cls, page): cls.base_fields = { question.field_id: question.make_field() for question in page.questions ...
{ "repo_name": "SexualHealthInnovations/django-wizard-builder", "path": "wizard_builder/forms.py", "copies": "1", "size": "1295", "license": "bsd-3-clause", "hash": -1135455595764036700, "line_mean": 28.4318181818, "line_max": 71, "alpha_frac": 0.6277992278, "autogenerated": false, "ratio": 4.0468...
from django import forms from django.contrib.auth import get_user_model from .models import UserAddress User = get_user_model() class GuestCheckoutForm(forms.Form): email = forms.EmailField() email2 = forms.EmailField(label='Verify Email') def clean_email2(self): email = self.cleaned_data.get('e...
{ "repo_name": "loafbaker/django_ecommerce2", "path": "orders/forms.py", "copies": "1", "size": "1328", "license": "mit", "hash": -2062780291466493200, "line_mean": 28.5333333333, "line_max": 99, "alpha_frac": 0.6174698795, "autogenerated": false, "ratio": 4.270096463022508, "config_test": false...
from django import forms from django.contrib.auth import get_user_model from .models import UserAddress User = get_user_model() class GuestCheckoutForm(forms.Form): email = forms.EmailField() email2 = forms.EmailField(label="Confirm Email") def clean_email2(self): email = self.cleaned_data.get(...
{ "repo_name": "elegant-solutions/django-webstore", "path": "invoice/forms.py", "copies": "2", "size": "1285", "license": "mit", "hash": -778350484374054700, "line_mean": 26.9347826087, "line_max": 89, "alpha_frac": 0.5976653696, "autogenerated": false, "ratio": 4.370748299319728, "config_test":...
from django import forms from django.contrib.auth import get_user_model from .models import UserAddress User = get_user_model() class GuestCheckoutForm(forms.Form): email = forms.EmailField() email2 = forms.EmailField(label='Verify Email') def clean_email2(self): email = self.cleaned_data.get("email") email2 ...
{ "repo_name": "DiptoDas8/Biponi", "path": "src/orders/forms.py", "copies": "5", "size": "1147", "license": "mit", "hash": -1668387688513474600, "line_mean": 19.8545454545, "line_max": 82, "alpha_frac": 0.7105492589, "autogenerated": false, "ratio": 3.3343023255813953, "config_test": false, "h...
from django import forms from django.contrib.auth import get_user_model from orders.models import UserCheckout from .models import UserAddress User = get_user_model() class GuestCheckoutForm(forms.Form): email = forms.EmailField() email_confirmation = forms.EmailField(label="Verify Email") # Don't call c...
{ "repo_name": "jbaek7023/CustomEcommerce", "path": "src/orders/forms.py", "copies": "1", "size": "1531", "license": "mit", "hash": 8379995803375954000, "line_mean": 31.5744680851, "line_max": 98, "alpha_frac": 0.6453298498, "autogenerated": false, "ratio": 4.3742857142857146, "config_test": fal...
from django import forms from django.contrib.auth import get_user_model from .send import send_templated_mail from . import models class MailForm(forms.Form): template_name = forms.CharField() users = forms.ModelMultipleChoiceField( queryset=get_user_model().objects.all(), widget=forms.Checkb...
{ "repo_name": "AvocadoCoop/avocado-templated-mail", "path": "templated_mail/forms.py", "copies": "1", "size": "1112", "license": "bsd-3-clause", "hash": 6661434543896307000, "line_mean": 26.8, "line_max": 100, "alpha_frac": 0.5980215827, "autogenerated": false, "ratio": 4.520325203252033, "conf...
from django import forms from django.contrib.auth import get_user_model from simplemooc.accounts.models import PasswordReset from simplemooc.core.mail import send_mail_template from simplemooc.core.utils import generate_hash_key User = get_user_model() class PasswordResetForm(forms.Form): email = forms.EmailFie...
{ "repo_name": "willsilvano/django-simplemooc", "path": "simplemooc/accounts/forms.py", "copies": "1", "size": "1937", "license": "mit", "hash": 409449347702530370, "line_mean": 33.4642857143, "line_max": 89, "alpha_frac": 0.6699481865, "autogenerated": false, "ratio": 3.806706114398422, "config...
from django import forms from django.contrib.auth import get_user_model from thatforum.forms import ThatForumBaseForm class LoginForm(forms.ModelForm): """ Form for users to log in to the site """ def __init__(self, *args, **kwargs): super(LoginForm, self).__init__(*args, **kwargs) s...
{ "repo_name": "hellsgate1001/thatforum_django", "path": "forumuser/forms.py", "copies": "1", "size": "3447", "license": "mit", "hash": 4787045088432601000, "line_mean": 28.4615384615, "line_max": 76, "alpha_frac": 0.6013925152, "autogenerated": false, "ratio": 3.9942062572421784, "config_test":...
from django import forms from django.contrib.auth import get_user_model from wagtail.admin.forms import WagtailAdminPageForm from wagtail.admin.widgets import AdminDateInput class ValidatedPageForm(WagtailAdminPageForm): def clean_foo(self): if 'foo' not in self.cleaned_data: return ...
{ "repo_name": "wagtail/wagtail", "path": "wagtail/tests/testapp/forms.py", "copies": "4", "size": "1403", "license": "bsd-3-clause", "hash": -1265921266733019000, "line_mean": 27.6326530612, "line_max": 76, "alpha_frac": 0.6756949394, "autogenerated": false, "ratio": 4.200598802395209, "config_...
from django import forms from django.contrib.auth import get_user_model User = get_user_model() class RegistrationForm(forms.Form): username = forms.CharField() email = forms.EmailField() password = forms.CharField(widget=forms.PasswordInput) password2 = forms.CharField(label="Confirm Password", ...
{ "repo_name": "gauthamsunjay/shopnow", "path": "accounts/forms.py", "copies": "1", "size": "1049", "license": "apache-2.0", "hash": 8673942726136429000, "line_mean": 31.78125, "line_max": 66, "alpha_frac": 0.7073403241, "autogenerated": false, "ratio": 4.264227642276423, "config_test": false, ...
from django import forms from django.contrib.auth import get_user_model, password_validation from django.contrib.auth.forms import ( AuthenticationForm as _AuthenticationForm, PasswordChangeForm as _PasswordChangeForm, PasswordResetForm as _PasswordResetForm, SetPasswordForm as _SetPasswordForm, Use...
{ "repo_name": "leprikon-cz/leprikon", "path": "leprikon/forms/user.py", "copies": "1", "size": "4247", "license": "bsd-3-clause", "hash": -1949713739369904400, "line_mean": 30.9323308271, "line_max": 101, "alpha_frac": 0.6519896397, "autogenerated": false, "ratio": 4.163725490196079, "config_te...
from django import forms from django.contrib.auth import login, authenticate from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _, ugettext from satchmo_store.accounts.mai...
{ "repo_name": "DrOctogon/Satchmo", "path": "satchmo/apps/satchmo_store/accounts/forms.py", "copies": "4", "size": "7167", "license": "bsd-3-clause", "hash": 3591511771443577300, "line_mean": 37.5322580645, "line_max": 111, "alpha_frac": 0.6280173015, "autogenerated": false, "ratio": 4.32789855072...
from django import forms from django.contrib.auth import login, authenticate from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _, ugettext from satchmo.accounts.mail import send_welcome_email from satchmo.configurat...
{ "repo_name": "sankroh/satchmo", "path": "satchmo/accounts/forms.py", "copies": "2", "size": "5384", "license": "bsd-3-clause", "hash": -8891204984478149000, "line_mean": 35.3851351351, "line_max": 98, "alpha_frac": 0.63948737, "autogenerated": false, "ratio": 4.317562149157979, "config_test": ...
from django import forms from django.contrib.auth import login, authenticate from django.contrib.auth.forms import AuthenticationForm from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Field, HTML, Div from crispy_forms.bootstrap import FormActions class SurmandlAuthForm(Authen...
{ "repo_name": "dsimandl/teamsurmandl", "path": "teamsurmandl/forms.py", "copies": "1", "size": "2690", "license": "mit", "hash": -713614621017927400, "line_mean": 47.0357142857, "line_max": 142, "alpha_frac": 0.6494423792, "autogenerated": false, "ratio": 4.183514774494557, "config_test": false...
from django import forms from django.contrib.auth import login, authenticate from django.contrib.auth import forms as django_forms from django.utils.translation import pgettext from saleor.userprofile.models import User class LoginForm(django_forms.AuthenticationForm): username = forms.EmailField( label=...
{ "repo_name": "itbabu/saleor", "path": "saleor/registration/forms.py", "copies": "2", "size": "1776", "license": "bsd-3-clause", "hash": 7473614883805066000, "line_mean": 33.1538461538, "line_max": 77, "alpha_frac": 0.6233108108, "autogenerated": false, "ratio": 4.120649651972157, "config_test"...
from django import forms from django.contrib.auth import login, logout from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.models import User from django.forms import modelform_factory from django.urls import reverse, reverse_lazy from django.views.generic import FormView, RedirectView, Cr...
{ "repo_name": "Tusky/DjangoSample", "path": "user/views.py", "copies": "1", "size": "2097", "license": "mit", "hash": -1274926910404937700, "line_mean": 29.8382352941, "line_max": 86, "alpha_frac": 0.6595135908, "autogenerated": false, "ratio": 3.876155268022181, "config_test": false, "has_no...
from django import forms from django.contrib.auth import logout from django.contrib.auth.forms import AuthenticationForm, UserCreationForm from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext ...
{ "repo_name": "markrcote/tipjar", "path": "broker/views.py", "copies": "1", "size": "2547", "license": "mit", "hash": 592074248630211800, "line_mean": 42.1694915254, "line_max": 106, "alpha_frac": 0.5182567727, "autogenerated": false, "ratio": 5.219262295081967, "config_test": false, "has_no_...
from django import forms from django.contrib.auth import( authenticate, get_user_model, login, logout, ) from result.models import ( College, Branch, Course, TotalMarks, Subject, Student, Marks, ) class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget...
{ "repo_name": "rpsingh21/resultanalysis", "path": "resultAnalysis/account/forms.py", "copies": "1", "size": "1336", "license": "mit", "hash": 9220403671503200000, "line_mean": 29.3636363636, "line_max": 141, "alpha_frac": 0.744760479, "autogenerated": false, "ratio": 3.3233830845771144, "config...
from django import forms from django.contrib.auth import ( authenticate, get_user_model, login, logout, ) from .models import Visitor User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clean...
{ "repo_name": "revaxl/library", "path": "users/forms.py", "copies": "2", "size": "2606", "license": "mit", "hash": 8162887793689772000, "line_mean": 30.7804878049, "line_max": 83, "alpha_frac": 0.6036070606, "autogenerated": false, "ratio": 4.129952456418383, "config_test": false, "has_no_key...
from django import forms from django.contrib.auth import ( authenticate, get_user_model, login, logout, ) User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clean(self, *args, **kwargs): ...
{ "repo_name": "timle1/try_django_1_10", "path": "accounts/forms.py", "copies": "1", "size": "2285", "license": "mit", "hash": -221259243183548930, "line_mean": 33.1044776119, "line_max": 83, "alpha_frac": 0.6118161926, "autogenerated": false, "ratio": 4.162112932604736, "config_test": false, ...
from django import forms from django.contrib.auth import ( authenticate, get_user_model, login, logout ) User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField(widget=forms.TextInput(attrs={'class': 'form-control'})) password = forms.CharField(widget=forms.Passwor...
{ "repo_name": "shawon922/django-blog", "path": "accounts/forms.py", "copies": "1", "size": "2039", "license": "mit", "hash": -2939083572664645000, "line_mean": 30.859375, "line_max": 91, "alpha_frac": 0.6189308485, "autogenerated": false, "ratio": 4.413419913419913, "config_test": false, "has...
from django import forms from django.contrib.auth import ( authenticate, get_user_model, ) from django.utils.translation import ugettext_lazy as _ User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clea...
{ "repo_name": "tyagow/FacebookBot", "path": "src/accounts/forms.py", "copies": "1", "size": "2916", "license": "mit", "hash": 7404068479226068000, "line_mean": 33.6547619048, "line_max": 84, "alpha_frac": 0.6265888011, "autogenerated": false, "ratio": 3.982216142270862, "config_test": false, ...
from django import forms from django.contrib.auth import ( authenticate, get_user_model, ) User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clean(self, *args, **kwargs): username = self.c...
{ "repo_name": "DJMedhaug/BizSprint", "path": "signin/forms.py", "copies": "1", "size": "2280", "license": "bsd-3-clause", "hash": 6426407288583181000, "line_mean": 27.8607594937, "line_max": 83, "alpha_frac": 0.6083333333, "autogenerated": false, "ratio": 4.18348623853211, "config_test": false,...
from django import forms from django.contrib.auth import ( authenticate, get_user_model, ) User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clean(self, *args, **kwargs): username = self.clean...
{ "repo_name": "FeodorM/splitmoney", "path": "accounts/forms.py", "copies": "1", "size": "1656", "license": "mit", "hash": -2111940474282393300, "line_mean": 30.2452830189, "line_max": 81, "alpha_frac": 0.6225845411, "autogenerated": false, "ratio": 4.427807486631016, "config_test": false, "ha...
from django import forms from django.contrib.auth import ( authenticate, get_user_model, login, logout, ) User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clean(self, *args, **kwargs): username = self.cleaned_da...
{ "repo_name": "tyagow/AdvancingTheBlog", "path": "src/accounts/forms.py", "copies": "1", "size": "2113", "license": "mit", "hash": 7101760008976574000, "line_mean": 28.3472222222, "line_max": 79, "alpha_frac": 0.7108376716, "autogenerated": false, "ratio": 3.3015625, "config_test": false, "ha...
from django import forms from django.contrib.auth import ( authenticate, get_user_model, login, logout, ) User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clean(self, *args, **kwargs): username = self.cleaned_da...
{ "repo_name": "rohitkyadav/blog-api", "path": "src/accounts/forms.py", "copies": "1", "size": "1966", "license": "mit", "hash": 1480618086539717000, "line_mean": 29.734375, "line_max": 75, "alpha_frac": 0.7110885046, "autogenerated": false, "ratio": 3.3097643097643097, "config_test": false, "...
from django import forms from django.contrib.auth import ( authenticate, get_user_model, login, logout, ) User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clean(self, *args, **kwargs): username = self.cleaned_d...
{ "repo_name": "autarkist/enhanced_post", "path": "src/account/forms.py", "copies": "1", "size": "2007", "license": "mit", "hash": -2884702397146518000, "line_mean": 22.8928571429, "line_max": 75, "alpha_frac": 0.7025411061, "autogenerated": false, "ratio": 3.221508828250401, "config_test": fals...
from django import forms from django.contrib.auth import password_validation from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.contrib.auth.password_validation import validate_password, password_validators_help_texts from user.models import User from user import models USR_CHOICES_CHANGE = {...
{ "repo_name": "hackupc/backend", "path": "user/forms.py", "copies": "1", "size": "6547", "license": "mit", "hash": 5408733753142674000, "line_mean": 36.6264367816, "line_max": 119, "alpha_frac": 0.6386131052, "autogenerated": false, "ratio": 4.221147646679562, "config_test": false, "has_no_ke...
from django import forms from django.contrib.auth import password_validation from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.utils import timezone def check_existing_email(value): emails = User.object...
{ "repo_name": "bruecksen/isimip", "path": "isi_mip/invitation/forms.py", "copies": "1", "size": "1949", "license": "mit", "hash": 3527633375459263500, "line_mean": 31.4833333333, "line_max": 96, "alpha_frac": 0.6552077989, "autogenerated": false, "ratio": 4.283516483516483, "config_test": false...
from django import forms from django.contrib.auth import password_validation from django.contrib.auth.models import User from django.core.exceptions import ValidationError import re # hard phone number template: +xx (xxx) xxxx-xx-xx PHONE_RG = re.compile(r'^\+\d{,2}\s?\(\d{3}\)\s?\d{3}-?\d{2}-?\d{2}$', re.IGNORECASE) ...
{ "repo_name": "z0rr0/eshop", "path": "shop/accounts/forms.py", "copies": "1", "size": "3379", "license": "mit", "hash": -890482139023789200, "line_mean": 33.8350515464, "line_max": 103, "alpha_frac": 0.6217815922, "autogenerated": false, "ratio": 3.9154113557358055, "config_test": false, "has...
from django import forms from django.contrib.auth import views as auth_views from myhpom import models, validators class SetPasswordForm(auth_views.SetPasswordForm): def __init__(self, user, *args, **kwargs): super(SetPasswordForm, self).__init__(user, *args, **kwargs) self.fields['new_password1...
{ "repo_name": "ResearchSoftwareInstitute/MyHPOM", "path": "myhpom/forms/signup.py", "copies": "1", "size": "2698", "license": "bsd-3-clause", "hash": 4689192844166161000, "line_mean": 37, "line_max": 100, "alpha_frac": 0.6323202372, "autogenerated": false, "ratio": 4.3099041533546325, "config_t...
from django import forms from django.contrib.auth.mixins import PermissionRequiredMixin from django.contrib.auth.models import User from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView from base.widgets import Sel...
{ "repo_name": "Strassengezwitscher/Strassengezwitscher", "path": "crowdgezwitscher/users/views.py", "copies": "1", "size": "2680", "license": "mit", "hash": 4796844332564488000, "line_mean": 32.0864197531, "line_max": 87, "alpha_frac": 0.6742537313, "autogenerated": false, "ratio": 3.964497041420...
from django import forms from django.contrib.auth.mixins import PermissionRequiredMixin from django.views.generic.list import ListView from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView from django.urls import reverse_lazy from facebook.forms imp...
{ "repo_name": "Strassengezwitscher/Strassengezwitscher", "path": "crowdgezwitscher/facebook/views.py", "copies": "1", "size": "1534", "license": "mit", "hash": -837244172182091800, "line_mean": 33.8636363636, "line_max": 72, "alpha_frac": 0.7809647979, "autogenerated": false, "ratio": 4.168478260...
from django import forms from django.contrib.auth.models import AnonymousUser from django.utils.translation import ugettext_lazy as _ from ..order.models import DigitalDeliveryGroup from ..userprofile.forms import AddressForm class ShippingForm(AddressForm): use_billing = forms.BooleanField(initial=True) clas...
{ "repo_name": "kyasui/store", "path": "saleor/checkout/forms.py", "copies": "1", "size": "1281", "license": "bsd-3-clause", "hash": -410880064047095040, "line_mean": 28.1136363636, "line_max": 66, "alpha_frac": 0.669008587, "autogenerated": false, "ratio": 4.172638436482084, "config_test": fals...
from django import forms from django.contrib.auth.models import AnonymousUser from cabot.cabotapp.views import StatusCheckForm from cabot.metricsapp.api import get_status_check_fields from cabot.metricsapp.models import GrafanaInstance, GrafanaDataSource # Model forms for admin site from cabot.metricsapp.models.grafa...
{ "repo_name": "Affirm/cabot", "path": "cabot/metricsapp/forms/grafana.py", "copies": "1", "size": "7156", "license": "mit", "hash": 3057077185932633000, "line_mean": 38.7555555556, "line_max": 117, "alpha_frac": 0.6344326439, "autogenerated": false, "ratio": 4.042937853107345, "config_test": fa...
from django import forms from django.contrib.auth.models import AnonymousUser from django.contrib.contenttypes.models import ContentType from dialogos.models import Comment class CommentForm(forms.ModelForm): class Meta: model = Comment fields = [ "name", "email", "website", "co...
{ "repo_name": "georgedorn/dialogos", "path": "dialogos/forms.py", "copies": "1", "size": "1240", "license": "bsd-3-clause", "hash": -9040114469433957000, "line_mean": 30, "line_max": 74, "alpha_frac": 0.5935483871, "autogenerated": false, "ratio": 4.203389830508475, "config_test": false, "has...
from django import forms from django.contrib.auth.models import check_password from django.contrib.auth.models import User from models import * from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit from django.template import RequestContext from django.utils.t...
{ "repo_name": "tfiers/arenberg-online", "path": "core/forms.py", "copies": "1", "size": "10944", "license": "mit", "hash": 7471719719375142000, "line_mean": 34.6482084691, "line_max": 143, "alpha_frac": 0.7165570175, "autogenerated": false, "ratio": 3.427497651111807, "config_test": false, "h...
from django import forms from django.contrib.auth.models import Group from django.contrib.auth.admin import UserAdmin from django.contrib.auth.forms import ReadOnlyPasswordHashField from .models import CustUser class UserCreationForm(forms.ModelForm): """A form for creating new users. Includes all the required ...
{ "repo_name": "jimbeaudoin/django-custuser", "path": "custuser/forms.py", "copies": "1", "size": "1841", "license": "mit", "hash": 7719610611366332000, "line_mean": 35.0980392157, "line_max": 90, "alpha_frac": 0.6865833786, "autogenerated": false, "ratio": 4.3729216152019, "config_test": false,...
from django import forms from django.contrib.auth.models import Group from django.utils.translation import gettext as _ from django.utils.translation import gettext_lazy from wagtail.core.models import BaseViewRestriction class BaseViewRestrictionForm(forms.ModelForm): restriction_type = forms.ChoiceField( ...
{ "repo_name": "FlipperPA/wagtail", "path": "wagtail/admin/forms/view_restrictions.py", "copies": "10", "size": "1361", "license": "bsd-3-clause", "hash": 7840157971304691000, "line_mean": 39.0294117647, "line_max": 102, "alpha_frac": 0.6936076414, "autogenerated": false, "ratio": 4.46229508196721...
from django import forms from django.contrib.auth.models import Group from django.utils.translation import ugettext as _ from django.utils.translation import ugettext_lazy from wagtail.core.models import BaseViewRestriction class BaseViewRestrictionForm(forms.ModelForm): restriction_type = forms.ChoiceField( ...
{ "repo_name": "mikedingjan/wagtail", "path": "wagtail/admin/forms/view_restrictions.py", "copies": "8", "size": "1364", "license": "bsd-3-clause", "hash": -3752826127656565000, "line_mean": 39.1176470588, "line_max": 102, "alpha_frac": 0.6942815249, "autogenerated": false, "ratio": 4.472131147540...
from django import forms from django.contrib.auth.models import Group from core.constants import NAME_SELECT_DEFAULT, STATUS_MODEL1, SELECT_DEFAULT from .models import ( GroupState, GroupModule, GroupSubModule, SubModule) class GroupForm(forms.ModelForm): current_status = forms.ChoiceField( widget=fo...
{ "repo_name": "jonaqp/heroku", "path": "apps/menu/forms.py", "copies": "1", "size": "3655", "license": "mit", "hash": -8755900486960081000, "line_mean": 35.9191919192, "line_max": 81, "alpha_frac": 0.6120383037, "autogenerated": false, "ratio": 4.120631341600902, "config_test": false, "has_no...
from django import forms from django.contrib.auth.models import Group from frequencia.accounts.models import User from .models import Setor, Coordenadoria, Vinculo class AdicionarVinculoForm(forms.ModelForm): class Meta: model = Vinculo fields = ['group', 'setor', 'coordenadoria', 'carga_horaria_diaria', 'inic...
{ "repo_name": "bczmufrn/frequencia", "path": "frequencia/vinculos/forms.py", "copies": "1", "size": "2696", "license": "mit", "hash": -3228623462918287400, "line_mean": 33.5256410256, "line_max": 127, "alpha_frac": 0.7113670134, "autogenerated": false, "ratio": 2.8041666666666667, "config_test"...
from django import forms from django.contrib.auth.models import Group from questionnaire.models import Region, Organization, Country, Theme, Questionnaire from questionnaire.utils.answer_type import AnswerTypes class UserFilterForm(forms.Form): organization = forms.ModelChoiceField(queryset=Organization.objects....
{ "repo_name": "eJRF/ejrf", "path": "questionnaire/forms/filter.py", "copies": "1", "size": "2895", "license": "bsd-3-clause", "hash": 9185143891690018000, "line_mean": 51.6545454545, "line_max": 119, "alpha_frac": 0.6155440415, "autogenerated": false, "ratio": 4.595238095238095, "config_test": ...
from django import forms from django.contrib.auth.models import Permission from django.core import validators from django.db.models import get_model from django.utils.translation import ugettext_lazy as _ from oscar.apps.customer.forms import EmailUserCreationForm, CommonPasswordValidator from oscar.core.compat import...
{ "repo_name": "saadbinakhlaq/django-oscar", "path": "oscar/apps/dashboard/partners/forms.py", "copies": "2", "size": "4256", "license": "bsd-3-clause", "hash": -5716293565274259000, "line_mean": 33.3225806452, "line_max": 84, "alpha_frac": 0.6282894737, "autogenerated": false, "ratio": 4.13203883...
from django import forms from django.contrib.auth.models import Permission from django.core import validators from oscar.core.loading import get_model from django.utils.translation import ugettext_lazy as _ from oscar.apps.customer.forms import (EmailUserCreationForm, CommonPassw...
{ "repo_name": "MrReN/django-oscar", "path": "oscar/apps/dashboard/partners/forms.py", "copies": "2", "size": "4299", "license": "bsd-3-clause", "hash": 1306922068343699700, "line_mean": 33.392, "line_max": 79, "alpha_frac": 0.6224703419, "autogenerated": false, "ratio": 4.157640232108317, "conf...
from django import forms from django.contrib.auth.models import Permission from django.utils.translation import ugettext_lazy as _ from django.utils.translation import pgettext_lazy from oscar.apps.customer.forms import EmailUserCreationForm from oscar.core.compat import existing_user_fields, get_user_model from oscar...
{ "repo_name": "ka7eh/django-oscar", "path": "src/oscar/apps/dashboard/partners/forms.py", "copies": "20", "size": "4834", "license": "bsd-3-clause", "hash": 6488842634393965000, "line_mean": 34.0289855072, "line_max": 79, "alpha_frac": 0.6284650393, "autogenerated": false, "ratio": 4.079324894514...
from django import forms from django.contrib.auth.models import Permission from django.utils.translation import ugettext_lazy as _ from oscar.core.loading import get_model from oscar.core.compat import existing_user_fields, get_user_model from oscar.apps.customer.forms import EmailUserCreationForm from oscar.core.vali...
{ "repo_name": "DrOctogon/unwash_ecom", "path": "oscar/apps/dashboard/partners/forms.py", "copies": "1", "size": "4288", "license": "bsd-3-clause", "hash": -15237800414405490, "line_mean": 33.304, "line_max": 79, "alpha_frac": 0.6273320896, "autogenerated": false, "ratio": 4.103349282296651, "co...
from django import forms from django.contrib.auth.models import Permission from django.utils.translation import ugettext_lazy as _, pgettext_lazy from oscar.core.loading import get_model from oscar.core.compat import existing_user_fields, get_user_model from oscar.apps.customer.forms import EmailUserCreationForm from ...
{ "repo_name": "ademuk/django-oscar", "path": "src/oscar/apps/dashboard/partners/forms.py", "copies": "12", "size": "4445", "license": "bsd-3-clause", "hash": 7980097095826052000, "line_mean": 33.7265625, "line_max": 79, "alpha_frac": 0.6278965129, "autogenerated": false, "ratio": 4.06678865507776...
from django import forms from django.contrib.auth.models import User, check_password from django.utils.translation import ugettext_lazy as _ from django.core import validators as valids from registration.forms import RegistrationFormUniqueEmail from igg.marathon.models import * class NoUsernameRegistrationForm(Regist...
{ "repo_name": "IndieGamesForGood/IGG-v2", "path": "src/igg/marathon/forms.py", "copies": "1", "size": "4668", "license": "bsd-2-clause", "hash": 8074541408216391000, "line_mean": 39.5913043478, "line_max": 125, "alpha_frac": 0.6480291345, "autogenerated": false, "ratio": 3.9425675675675675, "co...
from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm, forms from .models import C_Owner C_OWNER_GROUP = 'Contest Owner' APPLICANT_GROUP = 'Applicant' class COwnerCreationForm(UserCreationForm): website = forms.CharField(label='Website', ma...
{ "repo_name": "altayaydemir/nextfornow", "path": "nfn_user/forms.py", "copies": "2", "size": "2834", "license": "apache-2.0", "hash": 5954707003245634000, "line_mean": 34, "line_max": 104, "alpha_frac": 0.7427664079, "autogenerated": false, "ratio": 3.3341176470588234, "config_test": false, "...
from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm from datetime import timedelta from main.models import UserEvent, UserProfile, Organization, Event import pytz class MyUserCreate(UserCreationForm): email = forms.EmailField(required=...
{ "repo_name": "mattr555/AtYourService", "path": "main/forms.py", "copies": "1", "size": "4645", "license": "mit", "hash": 3180253890284151300, "line_mean": 38.7008547009, "line_max": 117, "alpha_frac": 0.6290635091, "autogenerated": false, "ratio": 3.8167625308134756, "config_test": false, "h...
from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm from django.db.models import Q from secure_witness.models import UserProfile, Report from django.forms.models import inlineformset_factory from secure_witness.models import ( Folder, ...
{ "repo_name": "mgstigler/cs3240-s15-team19", "path": "secure_witness/forms.py", "copies": "1", "size": "2327", "license": "mit", "hash": -3412109564408642600, "line_mean": 35.375, "line_max": 112, "alpha_frac": 0.6755479158, "autogenerated": false, "ratio": 4.125886524822695, "config_test": fal...
from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm from django.utils.translation import ugettext_lazy as _ from knesset.mks.models import GENDER_CHOICES from knesset.user.models import NOTIFICATION_PERIOD_CHOICES class RegistrationForm(Us...
{ "repo_name": "livni/old-OK", "path": "src/knesset/user/forms.py", "copies": "1", "size": "4571", "license": "bsd-3-clause", "hash": -8980405500815561000, "line_mean": 47.6276595745, "line_max": 147, "alpha_frac": 0.5727411945, "autogenerated": false, "ratio": 4.516798418972332, "config_test": ...
from django import forms from django.contrib.auth.models import User, Group from django.contrib.auth.forms import UserCreationForm from django.utils.translation import ugettext_lazy as _ from mks.models import Party from models import NOTIFICATION_PERIOD_CHOICES from persons.models import GENDER_CHOICES class Registra...
{ "repo_name": "alonisser/Open-Knesset", "path": "user/forms.py", "copies": "6", "size": "6032", "license": "bsd-3-clause", "hash": -1474118261571206000, "line_mean": 48.0406504065, "line_max": 147, "alpha_frac": 0.5653183024, "autogenerated": false, "ratio": 4.643571978444958, "config_test": fa...
from django import forms from django.contrib.auth.models import User, Group from django.contrib.sites.models import Site from django.contrib.gis import admin from django.utils.translation import ugettext_lazy as _ from stringfield import StringField from api.models import * from transitapis.models import Stop as API_S...
{ "repo_name": "MobilityLab/TransitNearMe", "path": "tnm/api/admin.py", "copies": "2", "size": "2679", "license": "mit", "hash": 4183622445035683000, "line_mean": 26.3367346939, "line_max": 66, "alpha_frac": 0.7028742068, "autogenerated": false, "ratio": 3.986607142857143, "config_test": false, ...
from django import forms from django.contrib.auth.models import User, Group from django.core.exceptions import ObjectDoesNotExist from django.db.models.fields import BLANK_CHOICE_DASH from web import models, raw from django.utils.translation import ugettext_lazy as _, string_concat class _UserCheckEmailForm(forms.Mode...
{ "repo_name": "SchoolIdolTomodachi/frgl", "path": "web/forms.py", "copies": "1", "size": "10316", "license": "apache-2.0", "hash": -6313098505613884000, "line_mean": 41.106122449, "line_max": 264, "alpha_frac": 0.645792943, "autogenerated": false, "ratio": 4.015570260801868, "config_test": fals...
from django import forms from django.contrib.auth.models import User,Group from django.core.validators import EmailValidator from django.db.models import Q from django.utils.translation import ugettext_lazy as _ from invitation.models import Invitation class UserOrEmailField(forms.EmailField): def clean(self, val...
{ "repo_name": "zdanozdan/django-invitation", "path": "invitation/forms.py", "copies": "1", "size": "1172", "license": "bsd-3-clause", "hash": 1873022877372292400, "line_mean": 29.0512820513, "line_max": 139, "alpha_frac": 0.6604095563, "autogenerated": false, "ratio": 3.919732441471572, "config...
from django import forms from django.contrib.auth.models import User, Group from django.forms import ModelForm from django.conf import settings from django.contrib.auth.forms import UserCreationForm from survey.models.users import UserProfile class UserForm(UserCreationForm): mobile_number = forms.CharField( ...
{ "repo_name": "unicefuganda/uSurvey", "path": "survey/forms/users.py", "copies": "1", "size": "6394", "license": "bsd-3-clause", "hash": -4137386955824200000, "line_mean": 37.7515151515, "line_max": 112, "alpha_frac": 0.5910228339, "autogenerated": false, "ratio": 4.1251612903225805, "config_te...
from django import forms from django.contrib.auth.models import User, Group from .models import report from .models import folder from .models import Document from django.forms import ModelForm class ReportForm(forms.Form): title = forms.CharField(max_length=100) short_description = forms.CharField(max_length=3...
{ "repo_name": "vsc-squared/FileShareHeroku", "path": "reports/forms.py", "copies": "1", "size": "2320", "license": "mit", "hash": -7945024765641638000, "line_mean": 41.962962963, "line_max": 140, "alpha_frac": 0.6663793103, "autogenerated": false, "ratio": 4.157706093189964, "config_test": fals...
from django import forms from django.contrib.auth.models import User class RegForm(forms.Form): username = forms.CharField(label='Username', max_length=100) password = forms.CharField(label='Password', widget=forms.PasswordInput()) check_pass = forms.CharField(label='Re-type Password', widget=forms.Password...
{ "repo_name": "sdzharkov/tripSplit", "path": "tripapp/forms.py", "copies": "3", "size": "1030", "license": "mit", "hash": -3434491473367323000, "line_mean": 45.8181818182, "line_max": 88, "alpha_frac": 0.6980582524, "autogenerated": false, "ratio": 4.007782101167315, "config_test": false, "ha...
from django import forms from django.contrib.auth.models import User from account.models import UserProfile from addressbook.models import Address from invoice.models import Invoice class InvoiceAdminForm(forms.ModelForm): def __init__(self, *args, **kwargs): try: address = args[0]['address'] ...
{ "repo_name": "simonluijk/django-invoice", "path": "invoice/forms.py", "copies": "2", "size": "1298", "license": "bsd-3-clause", "hash": 1839190704989640700, "line_mean": 33.1578947368, "line_max": 79, "alpha_frac": 0.6032357473, "autogenerated": false, "ratio": 4.772058823529412, "config_test"...
from django import forms from django.contrib.auth.models import User from accounts.models import UserProfile from race.models import Map, Run, BestRun class UserGetByNameForm(forms.Form): username = forms.CharField(max_length=30) class ValidateUserTokenForm(forms.Form): api_token = forms.CharField(min_length=24, ...
{ "repo_name": "SushiTee/teerace", "path": "teerace/api/forms.py", "copies": "1", "size": "2701", "license": "bsd-3-clause", "hash": -661311764542012900, "line_mean": 24.0185185185, "line_max": 68, "alpha_frac": 0.7108478341, "autogenerated": false, "ratio": 3.011148272017837, "config_test": fal...
from django import forms from django.contrib.auth.models import User from apps.accounts.models import Profile class CreateAccountForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput()) password2 = forms.CharField(max_length=30, required=True, label="Password (again)", widget=forms.Passw...
{ "repo_name": "tiradoe/fourteeners-updated", "path": "fourteeners/apps/accounts/forms.py", "copies": "1", "size": "1724", "license": "mit", "hash": 8791090519419105000, "line_mean": 37.3111111111, "line_max": 117, "alpha_frac": 0.5881670534, "autogenerated": false, "ratio": 4.215158924205379, "...
from django import forms from django.contrib.auth.models import User # # from authentication.models import User from iq_app.models import Registration class UserForm(forms.ModelForm): firstname = forms.CharField(max_length=32, required=True, help_text="firstname") username = forms.CharField(max_length=32, required=T...
{ "repo_name": "donkripton/IQ-test", "path": "iq_project/iq_app/forms.py", "copies": "1", "size": "1032", "license": "mit", "hash": 7572414066518718000, "line_mean": 31.25, "line_max": 94, "alpha_frac": 0.7277131783, "autogenerated": false, "ratio": 3.2452830188679247, "config_test": false, "h...
from django import forms from django.contrib.auth.models import User from bootcamp.core.forms import IHealthUser class ProfileForm(forms.ModelForm): first_name = forms.CharField(widget=forms.TextInput(attrs={'class':'form-control'}), max_length=30, required=False) last_name = forms.CharFi...
{ "repo_name": "o5k/bootcamp-ihealth", "path": "bootcamp/ihealth/forms.py", "copies": "1", "size": "2778", "license": "mit", "hash": 1684616812703147500, "line_mean": 38.7, "line_max": 99, "alpha_frac": 0.6310295176, "autogenerated": false, "ratio": 3.9742489270386265, "config_test": false, "h...
from django import forms from django.contrib.auth.models import User from bootstrap_toolkit.widgets import BootstrapDateInput, BootstrapTextInput, BootstrapUneditableInput class TestForm(forms.Form): date = forms.DateField( widget=BootstrapDateInput(), ) title = forms.CharField( max_length=...
{ "repo_name": "shaoweizhang/mysite", "path": "demo_app/forms.py", "copies": "1", "size": "3314", "license": "apache-2.0", "hash": -3442409259352932400, "line_mean": 28.0789473684, "line_max": 102, "alpha_frac": 0.5669885335, "autogenerated": false, "ratio": 3.9879663056558363, "config_test": fa...
from django import forms from django.contrib.auth.models import User from BRWRY_bootstrap.models import Hardware, PORT_CHOICES, Instruction, PID_CHOICES, ONOFF_CHOICES from bootstrap_toolkit.widgets import BootstrapDateInput class HardwareForm(forms.ModelForm): temp_bk = forms.CharField(max_length=3,widget=forms.Sele...
{ "repo_name": "oehokie/BRWRY-old", "path": "BRWRY_django/BRWRY_bootstrap/forms.py", "copies": "1", "size": "6915", "license": "mit", "hash": 7456745050808382000, "line_mean": 38.9768786127, "line_max": 104, "alpha_frac": 0.6590021692, "autogenerated": false, "ratio": 3.519083969465649, "config_...
from django import forms from django.contrib.auth.models import User #from captcha.fields import ReCaptchaField from bgundead.users.models import * from bgundead.game.models import Game, Player class UserRegistrationForm(forms.ModelForm): #captcha = ReCaptchaField(attrs={'theme' : 'blackglass'}) class Meta: mode...
{ "repo_name": "Pitkid/bgundead", "path": "bgundead/users/forms.py", "copies": "1", "size": "3802", "license": "mit", "hash": -8291745850103929000, "line_mean": 42.2045454545, "line_max": 132, "alpha_frac": 0.7175170963, "autogenerated": false, "ratio": 3.2974848222029487, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from .CaptchaSecuredForm import CaptchaSecuredForm class RegistrationForm(CaptchaSecuredForm): email = forms.EmailField(label='E-mail address') firstName = forms.CharField(label='First name') lastName = forms.CharField(label='Last name')...
{ "repo_name": "danrg/RGT-tool", "path": "src/RGT/authentication/forms/RegistrationForm.py", "copies": "1", "size": "1488", "license": "mit", "hash": 6425109565653890000, "line_mean": 32.0666666667, "line_max": 90, "alpha_frac": 0.6048387097, "autogenerated": false, "ratio": 4.635514018691588, "...
from django import forms from django.contrib.auth.models import User from clients.models import Client CHOICES = (('Ho','Hombre'), ('Mu','Mujer'),) CHOICESM = (('casado', 'Casado'), ('soltero', 'Soltero'),) class UserRegistrationForm(forms.ModelForm): password = forms.CharField(label="Password", widget=forms.Passwor...
{ "repo_name": "SurielRuano/backend-autonomo", "path": "accounts/forms.py", "copies": "1", "size": "3703", "license": "mit", "hash": -4083099102263907300, "line_mean": 30.5897435897, "line_max": 139, "alpha_frac": 0.6143437077, "autogenerated": false, "ratio": 3.4023941068139965, "config_test": ...
from django import forms from django.contrib.auth.models import User from communityfund.widgets import BSTextInput, BSEmailInput, BSPasswordInput, glyphicon class SignupForm(forms.ModelForm): """ A form that creates a user, with no privileges, from the given username, email, password, first name and last ...
{ "repo_name": "dylanseago/CommunityFund", "path": "server/communityfund/apps/accounts/forms.py", "copies": "1", "size": "2903", "license": "apache-2.0", "hash": 6641342562279390000, "line_mean": 40.4857142857, "line_max": 120, "alpha_frac": 0.6482948674, "autogenerated": false, "ratio": 4.1118980...
from django import forms from django.contrib.auth.models import User from ControlMode.models import ComRoom, Cabinet, Cabinet_inner_IP, Cabinet_outer_IP, Equipments, Customers class RegisterForm(forms.ModelForm): class Meta: model = User fields = ['username', 'password', 'groups'] class LoginFor...
{ "repo_name": "maho-1996/DatabaseExp", "path": "ControlMode/forms.py", "copies": "1", "size": "1510", "license": "mit", "hash": 4555119851386774000, "line_mean": 28.0384615385, "line_max": 117, "alpha_frac": 0.6324503311, "autogenerated": false, "ratio": 4.070080862533692, "config_test": false,...
from django import forms from django.contrib.auth.models import User from core.models import Post, Category # forms will go here. create account has been added, new post form will probably go here class CreateAccForm(forms.ModelForm): #form labels #first_name = forms.CharField(label="First Name:", max_length=30) ...
{ "repo_name": "dishad/deanslist", "path": "core/forms.py", "copies": "1", "size": "1757", "license": "mit", "hash": -8251278497292474000, "line_mean": 33.4509803922, "line_max": 103, "alpha_frac": 0.6852589641, "autogenerated": false, "ratio": 3.378846153846154, "config_test": false, "has_no_...
from django import forms from django.contrib.auth.models import User from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout from passwords.fields import PasswordField # django-password class RegisterForm(forms.Form): username = forms.CharField( label="Username", max_le...
{ "repo_name": "cs411-entree-app/entree", "path": "entree_project/entree/forms.py", "copies": "1", "size": "2277", "license": "apache-2.0", "hash": -4827803275845108000, "line_mean": 23.2234042553, "line_max": 61, "alpha_frac": 0.5551163812, "autogenerated": false, "ratio": 4.162705667276051, "c...
from django import forms from django.contrib.auth.models import User from crispy_forms.helper import FormHelper from crispy_forms.layout import * from inventory.user.models import Experimenter, Reader, Subject class UserForm(forms.Form): '''Form for creating a new User. ''' USER_TYPE_CHOICES = ( ...
{ "repo_name": "sloria/device-inventory", "path": "inventory/user/forms.py", "copies": "1", "size": "3771", "license": "bsd-3-clause", "hash": 1011869467529067800, "line_mean": 37.8865979381, "line_max": 85, "alpha_frac": 0.5372580217, "autogenerated": false, "ratio": 4.483947681331748, "config_...
from django import forms from django.contrib.auth.models import User from datetimewidget.widgets import DateTimeWidget from django.contrib.auth.password_validation import validate_password from SubmitExperiment.models import * import re class AddUserForm(forms.Form): username = forms.CharField( label='Use...
{ "repo_name": "crocs-muni/RTTWebInterface", "path": "Administration/forms.py", "copies": "1", "size": "6595", "license": "mit", "hash": -947268233000996100, "line_mean": 32.8205128205, "line_max": 102, "alpha_frac": 0.6344200152, "autogenerated": false, "ratio": 4.249355670103093, "config_test"...
from django import forms from django.contrib.auth.models import User from django.apps import apps from base.models import Person, Hospital class logFilter(forms.Form): """ @class: logFilter @description: This form is used to decide how the log is ordered """ startDate = forms.DateField(widget=form...
{ "repo_name": "blackpan2/HealthNet", "path": "src/healthnet/viewLog/forms.py", "copies": "1", "size": "4259", "license": "mit", "hash": -5678873026054868000, "line_mean": 41.6, "line_max": 117, "alpha_frac": 0.569852078, "autogenerated": false, "ratio": 4.212660731948565, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.conf import settings from django.db.models import Q from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from onadata.apps.fieldsight.models import Organization from onadata.apps.field...
{ "repo_name": "awemulya/fieldsight-kobocat", "path": "onadata/apps/userrole/forms.py", "copies": "1", "size": "1948", "license": "bsd-2-clause", "hash": -4708628162552508000, "line_mean": 38.7551020408, "line_max": 107, "alpha_frac": 0.6801848049, "autogenerated": false, "ratio": 4.06680584551148...
from django import forms from django.contrib.auth.models import User from django.conf import settings from django.db.models import Q from django.core.exceptions import ValidationError from onadata.apps.staff.models import Team, StaffProject, Bank, Staff, Attendance from onadata.apps.userrole.models import UserRole cla...
{ "repo_name": "awemulya/fieldsight-kobocat", "path": "onadata/apps/staff/forms.py", "copies": "1", "size": "2305", "license": "bsd-2-clause", "hash": 7478585786788357000, "line_mean": 41.6851851852, "line_max": 241, "alpha_frac": 0.6542299349, "autogenerated": false, "ratio": 3.688, "config_tes...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import AuthenticationForm from django.utils.translation import ugettext_lazy as _ class AnswerForm(forms.Form): content = forms.CharField(label='Answer content', max_length=2048) class _EmailForm(forms.ModelForm): ...
{ "repo_name": "Jucyio/Jucy", "path": "web/forms.py", "copies": "1", "size": "1361", "license": "apache-2.0", "hash": -2373920097992430600, "line_mean": 35.7837837838, "line_max": 140, "alpha_frac": 0.634092579, "autogenerated": false, "ratio": 4.279874213836478, "config_test": false, "has_no_...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import PasswordResetForm from inventory.models import App from core.db.manager import DataHubManager from django.core.validators import RegexValidator from django.conf import settings def validate_unique_username(valu...
{ "repo_name": "RogerTangos/datahub-stub", "path": "src/account/forms.py", "copies": "3", "size": "6325", "license": "mit", "hash": 3185103456461972000, "line_mean": 30.783919598, "line_max": 79, "alpha_frac": 0.6333596838, "autogenerated": false, "ratio": 4.508196721311475, "config_test": false...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.contrib.admin import widgets from django.utils.translation import ugettext_lazy as _ class OneToOneUserAdminForm(forms.ModelForm): error_messages = { "duplicate_...
{ "repo_name": "ministryofjustice/cla_backend", "path": "cla_backend/apps/core/admin/forms.py", "copies": "1", "size": "5487", "license": "mit", "hash": -7356964769812783000, "line_mean": 38.7608695652, "line_max": 115, "alpha_frac": 0.623473665, "autogenerated": false, "ratio": 4.263403263403263,...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import ReadOnlyPasswordHashField from users.models import User from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import get_user_model User = get_user_model() class UserCreationForm(form...
{ "repo_name": "jeromecc/doctoctocbot", "path": "src/users/forms.py", "copies": "1", "size": "1344", "license": "mpl-2.0", "hash": -6917096176890978000, "line_mean": 30.2790697674, "line_max": 87, "alpha_frac": 0.6867559524, "autogenerated": false, "ratio": 4.213166144200627, "config_test": fals...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import SetPasswordForm, UserChangeForm from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Submit from .models import Profile class UpdateForm(forms.ModelForm): class Meta: m...
{ "repo_name": "pyladieshre/pyladies", "path": "profiles/forms.py", "copies": "1", "size": "1922", "license": "mit", "hash": -3157633955681775000, "line_mean": 32.7192982456, "line_max": 119, "alpha_frac": 0.6248699272, "autogenerated": false, "ratio": 3.5526802218114604, "config_test": false, ...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserChangeForm from django.forms import ModelForm from .models import Mensaje class SignUpForm(ModelForm): username = forms.CharField(min_length=5) email = forms.EmailField(required=True) password = ...
{ "repo_name": "acs-um/deptos", "path": "deptos/usuarios/forms.py", "copies": "1", "size": "2794", "license": "apache-2.0", "hash": -2894303615709072000, "line_mean": 33.4691358025, "line_max": 133, "alpha_frac": 0.6393266476, "autogenerated": false, "ratio": 3.8299039780521262, "config_test": f...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm as BaseUserCreationForm from django.utils.translation import ugettext_lazy as _ # extend Django's UserCreationForm with an 'is_superuser' field class UserCreationForm(BaseUserCreationForm): ...
{ "repo_name": "CreativeOutbreak/wagtail", "path": "wagtail/wagtailusers/forms.py", "copies": "3", "size": "4164", "license": "bsd-3-clause", "hash": 6082732004588423000, "line_mean": 35.5263157895, "line_max": 104, "alpha_frac": 0.6320845341, "autogenerated": false, "ratio": 4.279547790339158, ...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from django.core.mail import send_mail from .models import Subscriber class SubscribeForm(forms.ModelForm): class Meta: model = Subscriber fields = ('email',) ...
{ "repo_name": "zrisher/webapp-public", "path": "webapp/apps/register/forms.py", "copies": "1", "size": "1753", "license": "mit", "hash": -1129400676061636100, "line_mean": 30.3035714286, "line_max": 110, "alpha_frac": 0.6577296064, "autogenerated": false, "ratio": 4.183770883054892, "config_tes...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, AuthenticationForm from utils import HTML5RequiredMixin from models import BucketList, BucketListItem class SignupForm(HTML5RequiredMixin, UserCreationForm): """ Form that creates a u...
{ "repo_name": "andela-uawili/django-bucketlist-application", "path": "bucketlist/dashboard/forms.py", "copies": "1", "size": "1530", "license": "mit", "hash": 7319398065379281000, "line_mean": 26.8181818182, "line_max": 79, "alpha_frac": 0.6784313725, "autogenerated": false, "ratio": 4.5, "conf...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.forms import AuthenticationForm from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth import authenticate, login from django.contrib.admin import ...
{ "repo_name": "Sult/daf", "path": "apps/users/forms.py", "copies": "1", "size": "2996", "license": "mit", "hash": 3259307338492933000, "line_mean": 32.2888888889, "line_max": 109, "alpha_frac": 0.6562082777, "autogenerated": false, "ratio": 4.412371134020619, "config_test": false, "has_no_key...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.contrib.auth import authenticate from django_countries.widgets import CountrySelectWidget from .models import ContactMail, Profile from apis.models import Api from characters.models i...
{ "repo_name": "Sult/evehub", "path": "users/forms.py", "copies": "1", "size": "6200", "license": "mit", "hash": 7136829668303541000, "line_mean": 30.1557788945, "line_max": 79, "alpha_frac": 0.5977419355, "autogenerated": false, "ratio": 4.0129449838187705, "config_test": false, "has_no_keywo...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.core.validators import MinLengthValidator, MaxLengthValidator from django_registration import validators from django_registration.forms import RegistrationForm class CustomRegistrat...
{ "repo_name": "project-lovelace/lovelace-website", "path": "src/lovelace/forms.py", "copies": "1", "size": "2079", "license": "mit", "hash": -9182836879827981000, "line_mean": 41.4285714286, "line_max": 214, "alpha_frac": 0.6902356902, "autogenerated": false, "ratio": 4.470967741935484, "config...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django_countries import countries from .models import * class UserForm(UserCreationForm): """ IT is the user creation form called be the signup page """ first_name = forms.Ch...
{ "repo_name": "cs251-eclipse/EclipseOJ", "path": "EclipseOJ/core/forms.py", "copies": "1", "size": "2021", "license": "mit", "hash": 6127913019016947000, "line_mean": 37.1320754717, "line_max": 148, "alpha_frac": 0.6531420089, "autogenerated": false, "ratio": 3.931906614785992, "config_test": f...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.forms import EmailField from django.utils.translation import gettext_lazy as _ class UserCreationForm(UserCreationForm): email = EmailField(label=_('Email address'), required=Tru...
{ "repo_name": "ellmetha/django-machina", "path": "example_project/main/apps/auth/forms.py", "copies": "1", "size": "1546", "license": "bsd-3-clause", "hash": -9135147748467595000, "line_mean": 30.5510204082, "line_max": 93, "alpha_frac": 0.6332470893, "autogenerated": false, "ratio": 4.1783783783...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.shortcuts import (render_to_response, render) from django.http import HttpResponseRedirect from django.template.context_processors import csrf from django.contrib.auth.decorators impor...
{ "repo_name": "sanal-cem/heritago", "path": "heritago/heritages/forms.py", "copies": "1", "size": "1263", "license": "mit", "hash": 6879553530045466000, "line_mean": 23.2884615385, "line_max": 75, "alpha_frac": 0.6951702296, "autogenerated": false, "ratio": 4.310580204778157, "config_test": fal...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.utils.translation import ugettext_lazy as _ from oauth2_provider.models import Application class UserCreateForm(UserCreationForm): email = forms.EmailField(required=True) cl...
{ "repo_name": "burnash/NeuroVault", "path": "neurovault/apps/users/forms.py", "copies": "4", "size": "1924", "license": "mit", "hash": 1464497512611352000, "line_mean": 30.5409836066, "line_max": 76, "alpha_frac": 0.604989605, "autogenerated": false, "ratio": 4.076271186440678, "config_test": f...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.utils.translation import ugettext_lazy as _ from cmdbox.core.validators import validate_forbidden_slug class SignupForm(UserCreationForm): email = forms.EmailField( help...
{ "repo_name": "vitorfs/cmdbox", "path": "cmdbox/core/forms.py", "copies": "1", "size": "1366", "license": "mit", "hash": 4664896983955925000, "line_mean": 35.9189189189, "line_max": 111, "alpha_frac": 0.682284041, "autogenerated": false, "ratio": 4.164634146341464, "config_test": false, "has_...