text
stringlengths
0
1.05M
meta
dict
from django import forms class PlaceholderForm(forms.Form): """ A base form for automatically adding placeholder text. Forms that extend this form will by default have all text, password, and date input widgets display placeholder text equal to their label. This can be overridden per form field b...
{ "repo_name": "Kromey/fbxnano", "path": "helpers/forms.py", "copies": "2", "size": "3093", "license": "mit", "hash": -4102439786586875400, "line_mean": 34.9651162791, "line_max": 115, "alpha_frac": 0.5822825736, "autogenerated": false, "ratio": 4.254470426409903, "config_test": false, "has_no...
from django import forms class PrefixedField(object): """Special field that accepts an operator as prefix in the value. Removes the prefix from the initial value before the validation process starts, and put it back in a different attribute once the validation process is finished. The cleaned value i...
{ "repo_name": "AdrianGaudebert/socorro-crashstats", "path": "crashstats/supersearch/form_fields.py", "copies": "1", "size": "3038", "license": "mpl-2.0", "hash": 2796632019424432600, "line_mean": 32.3846153846, "line_max": 79, "alpha_frac": 0.6260697828, "autogenerated": false, "ratio": 4.5960665...
from django import forms class PrintRequestForm(forms.Form): STATUS_CHOICES = ( ('Faculty', 'Faculty'), ('Undergraduate Student', 'Undergraduate Student'), ('Graduate Student', 'Graduate Student'), ('Visiting Scholar', 'Visiting Scholar'), ('Staff Member', 'Staff Member'),...
{ "repo_name": "gwu-libraries/launchpad", "path": "lp/ui/forms.py", "copies": "1", "size": "1489", "license": "mit", "hash": -8841811962931713000, "line_mean": 47.0322580645, "line_max": 79, "alpha_frac": 0.5540631296, "autogenerated": false, "ratio": 4.539634146341464, "config_test": false, "...
from django import forms class PullFundsFormGet(forms.Form): status_id = forms.CharField(label='Status ID', required=True) class PullFundsFormPost(forms.Form): sender_pan = forms.CharField(label='Sender card PAN', max_length=16, required=True, initial='4005520000011126') sender_expiry_date = forms.CharF...
{ "repo_name": "ppokrovsky/pyvdp", "path": "demo/demo/forms/visadirect/fundstransfer.py", "copies": "1", "size": "1729", "license": "mit", "hash": 4751517519811094000, "line_mean": 48.4, "line_max": 121, "alpha_frac": 0.7501445922, "autogenerated": false, "ratio": 3.55761316872428, "config_test"...
from django import forms class RegisterForm(forms.Form): username = forms.CharField(max_length=30, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Username'})) password = forms.CharField(max_length=20, widget=forms.PasswordIn...
{ "repo_name": "vincentfung13/TwitterRepManagement", "path": "user_handle/forms.py", "copies": "1", "size": "1038", "license": "mit", "hash": 8500621784154372000, "line_mean": 48.4285714286, "line_max": 118, "alpha_frac": 0.6387283237, "autogenerated": false, "ratio": 4.254098360655738, "config_...
from django import forms class ResponseForm(forms.Form): ################# # Required params # ACTION_MODE_INTERACTIVE, ACTION_MODE_SILENT = ('INTERACTIVE', 'SILENT') ACTION_MODE_CHOICES = ( (ACTION_MODE_INTERACTIVE, 'INTERACTIVE'), (ACTION_MODE_SILENT, 'SILENT'), ...
{ "repo_name": "dulaccc/django-oscar-systempay", "path": "systempay/forms.py", "copies": "1", "size": "10113", "license": "mit", "hash": 8989488285293740000, "line_mean": 46.2570093458, "line_max": 133, "alpha_frac": 0.6936616237, "autogenerated": false, "ratio": 3.326644736842105, "config_test"...
from django import forms class ScenarioForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) qs = self.fields['documents'].queryset # Select the Corpus to prevent queries being fired on the __str__ method qs = qs.select_related('corpus') ...
{ "repo_name": "UUDigitalHumanitieslab/timealign", "path": "stats/forms.py", "copies": "1", "size": "2952", "license": "mit", "hash": -2563864326928167000, "line_mean": 41.1714285714, "line_max": 116, "alpha_frac": 0.6077235772, "autogenerated": false, "ratio": 4.054945054945055, "config_test": ...
from django import forms class SearchBarForm(forms.Form): """ This is the form that ends up in your templates """ def __init__(self, data, fields): from django_searchbar.utils import listify fields = listify(fields) if __debug__: for field in fields: ...
{ "repo_name": "arsham/django-searchbar", "path": "django_searchbar/forms.py", "copies": "1", "size": "1605", "license": "bsd-3-clause", "hash": -5780461203289514000, "line_mean": 38.1463414634, "line_max": 125, "alpha_frac": 0.5526479751, "autogenerated": false, "ratio": 4.6253602305475505, "co...
from django import forms class SearchForm(forms.Form): processes = (('concordance', 'Concordance'), ('collocations', 'Collocation'), ('NGram', 'NGram')) scoring_algos = ( ('None', 'Choose...'), ('log_likelihood', 'log likelihood'), ('mutual_informatio...
{ "repo_name": "myaser/DAPOS_corpus_browser", "path": "corpus_browser/browser/forms.py", "copies": "1", "size": "1779", "license": "mit", "hash": -1010354005203598100, "line_mean": 39.4318181818, "line_max": 83, "alpha_frac": 0.6082068578, "autogenerated": false, "ratio": 4.195754716981132, "con...
from django import forms class signinform(forms.Form): Username = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'})) Password = forms.CharField( widget=forms.TextInput(attrs={'class': 'form-control'})) class signupform(forms.Form): CHOICES = (('Company', 'Company')...
{ "repo_name": "frankmaina/django2fa", "path": "accounts/forms.py", "copies": "1", "size": "1030", "license": "mit", "hash": 1888291543925916700, "line_mean": 41.9166666667, "line_max": 126, "alpha_frac": 0.6660194175, "autogenerated": false, "ratio": 4.0234375, "config_test": false, "has_no_k...
from django import forms class StdRegForm(forms.Form): email = forms.EmailField(label="Email", initial="", required=True) password = forms.CharField(label="Password", initial="", min_length=4, max_length=128, widget=forms.PasswordInput(), required=True) name = forms.CharField(label="Name", initial=""...
{ "repo_name": "TheAmbitiousInc/com.theambitious.qrtrace.web", "path": "web/registration/forms.py", "copies": "1", "size": "1510", "license": "mit", "hash": 6474825279310483000, "line_mean": 37.7435897436, "line_max": 135, "alpha_frac": 0.698013245, "autogenerated": false, "ratio": 3.6919315403422...
from django import forms class SuccessForm(forms.Form): pgw_trace_ref = forms.CharField() pgw_transaction_id = forms.CharField() pgw_order_id = forms.CharField() pgw_amount = forms.CharField() pgw_installments = forms.CharField() pgw_card_type_id = forms.CharField() pgw_signature = forms.C...
{ "repo_name": "logithr/django-htpayway", "path": "htpayway/forms.py", "copies": "1", "size": "1705", "license": "mit", "hash": 1384198755572409600, "line_mean": 36.8888888889, "line_max": 60, "alpha_frac": 0.6873900293, "autogenerated": false, "ratio": 3.2109227871939736, "config_test": false, ...
from django import forms class TaskForm(forms.Form): """ A simple form to read a url from the user in order to find out its length and either run it asynchronously or schedule it schedule_times times, every schedule_interval seconds. """ url = forms.CharField(label='URL', max_length=128, help_text...
{ "repo_name": "spapas/django-test-rq", "path": "tasks/forms.py", "copies": "1", "size": "1212", "license": "unlicense", "hash": -3121318047486443500, "line_mean": 56.7142857143, "line_max": 164, "alpha_frac": 0.7037953795, "autogenerated": false, "ratio": 4.193771626297578, "config_test": false...
from django import forms class TrustPayForm(forms.Form): action_url = None # required fields AID = forms.CharField(required=True, widget=forms.HiddenInput(), max_length=10) # Merchant account ID assigned by TrustPay AMT = forms.DecimalField(required=True, widget=forms.HiddenInput(), decimal_places=2...
{ "repo_name": "PragmaticMates/django-trustpay", "path": "trustpay/forms.py", "copies": "1", "size": "1888", "license": "bsd-3-clause", "hash": 1311788966932869000, "line_mean": 81.0869565217, "line_max": 168, "alpha_frac": 0.7521186441, "autogenerated": false, "ratio": 3.9747368421052633, "conf...
from django import forms class TypeSearchForm(forms.Form): search_name = forms.CharField( required=False, label='Search sig type name', widget=forms.TextInput(attrs={'placeholder': 'search here'}), ) search_comment = forms.CharField( required=False, label='comment'...
{ "repo_name": "charlesflannery73/sigma", "path": "web/forms.py", "copies": "1", "size": "1251", "license": "apache-2.0", "hash": -9210535062994851000, "line_mean": 22.6037735849, "line_max": 70, "alpha_frac": 0.5995203837, "autogenerated": false, "ratio": 4.26962457337884, "config_test": false,...
from django import forms class UnicodeWithAttr(unicode): deleted_files = None moved_files = None class FilesFormField(forms.MultiValueField): def __init__(self, max_length=None, **kwargs): super(FilesFormField, self).__init__(**kwargs) def compress(self, data_list): files = UnicodeW...
{ "repo_name": "dellax/django-files-widget", "path": "topnotchdev/files_widget/forms/fields.py", "copies": "1", "size": "2193", "license": "mit", "hash": 605060830228412800, "line_mean": 36.1694915254, "line_max": 87, "alpha_frac": 0.5937072503, "autogenerated": false, "ratio": 4.587866108786611, ...
from django import forms class UnstyledForm(forms.Form): def __init__(self, *args, **kwargs): kwargs.setdefault('label_suffix', '') super(UnstyledForm, self).__init__(*args, **kwargs) class OrderForm(UnstyledForm): PRODUCT_CHOICES = [ ('Song and Slideshow', 'Song and Slideshow'), ('Song only', 'Song only'...
{ "repo_name": "SarahJaine/say-it", "path": "sayit/forms.py", "copies": "1", "size": "1809", "license": "mit", "hash": 8581821571415452000, "line_mean": 28.6557377049, "line_max": 77, "alpha_frac": 0.6860143726, "autogenerated": false, "ratio": 3.081771720613288, "config_test": false, "has_no_...
from django import forms class UploadFileForm(forms.Form): def __init__(self, *args, **kwargs): super(UploadFileForm, self).__init__(*args, **kwargs) for i in range(1, 5): self.fields['file%d' % i] = forms.FileField(label="File %d" % i) class SelectAlgorithmForm(forms.Form): algo...
{ "repo_name": "curioswati/crypt-analyzer", "path": "cryptanalyzer/base/forms.py", "copies": "1", "size": "1867", "license": "isc", "hash": -6705270943642465000, "line_mean": 39.5869565217, "line_max": 81, "alpha_frac": 0.4681306909, "autogenerated": false, "ratio": 4.738578680203045, "config_te...
from django import forms class UploadForm(forms.Form): outline_file = forms.FileField(label="Outline layer file") solderpaste_file = forms.FileField(label="Solder paste layer file") stencil_thickness = forms.FloatField( label='Thickness (in mm) of the stencil. Make sure this is a multiple of the l...
{ "repo_name": "kirberich/gerber_to_scad_service", "path": "gts/forms.py", "copies": "1", "size": "1143", "license": "mit", "hash": -979483595353696500, "line_mean": 41.3333333333, "line_max": 151, "alpha_frac": 0.6745406824, "autogenerated": false, "ratio": 3.8614864864864864, "config_test": fa...
from django import forms # define form fields and specify what data types to expect class ContactForm(forms.Form): name = forms.CharField(required=True) name.widget.attrs = {'class': "form-control input-lg"} organisation = forms.CharField(required=True) organisation.widget.attrs = {'class': "form-con...
{ "repo_name": "okfn/website", "path": "sendemail/forms.py", "copies": "1", "size": "1042", "license": "mit", "hash": -6045795508356873000, "line_mean": 32.6129032258, "line_max": 93, "alpha_frac": 0.6641074856, "autogenerated": false, "ratio": 3.9770992366412212, "config_test": false, "has_no...
from django import forms def validate_users(form, field='users'): """Validates that the users all have valid, matching LocalSites. This will compare the LocalSite associated with the form to that of each added User. If the form has a LocalSite set, then all Users are required to be a part of that Loc...
{ "repo_name": "Khan/reviewboard", "path": "reviewboard/site/validation.py", "copies": "3", "size": "1347", "license": "mit", "hash": -8739753891678000000, "line_mean": 33.5384615385, "line_max": 76, "alpha_frac": 0.6488492947, "autogenerated": false, "ratio": 4.222570532915361, "config_test": f...
from django import forms DURABILITY_TIME_PROFILES = [('BOXDURABILITY', 'Box Durability'), ('DECAYDURABILITY', 'Decay Durability'), ('BOXDECAYDURABILITY', 'Box Decay Durability')] BEDNET_TYPES = [('Barrier', 'Barrier'), ('ITN', 'ITN'), ...
{ "repo_name": "tph-thuering/vnetsource", "path": "ts_emod2/forms/InterventionForms.py", "copies": "2", "size": "9589", "license": "mpl-2.0", "hash": 3976413679796466700, "line_mean": 51.1195652174, "line_max": 140, "alpha_frac": 0.7113359057, "autogenerated": false, "ratio": 3.416102600641254, ...
from django import forms from basicviz.models import Experiment, BVFeatureSet from decomposition.models import MotifSet from motifdb.models import MDBMotifSet from basicviz.constants import EXPERIMENT_DECOMPOSITION_SOURCE from django.core.exceptions import ValidationError from django.utils.translation import ugettext...
{ "repo_name": "sdrogers/ms2ldaviz", "path": "ms2ldaviz/uploads/forms.py", "copies": "1", "size": "8370", "license": "mit", "hash": 5678365592720423000, "line_mean": 48.2411764706, "line_max": 176, "alpha_frac": 0.5973715651, "autogenerated": false, "ratio": 4.014388489208633, "config_test": fal...
from django import forms from django.urls import reverse from amon.apps.files.models import files_model # from amon.apps.cloudservers.models import ( # google_integration_model # ) class LinodeForm(forms.Form): def __init__(self, *args, **kwargs): self.form_data = kwargs.pop('provider_data', None) ...
{ "repo_name": "martinrusev/amonone", "path": "amon/apps/cloudservers/forms.py", "copies": "1", "size": "5613", "license": "mit", "hash": 373928726446385150, "line_mean": 31.08, "line_max": 96, "alpha_frac": 0.5791911634, "autogenerated": false, "ratio": 3.836637047163363, "config_test": false, ...
from django import forms from helpers.forms import PirouteForm from . import formsets, services class InterfacesForm(PirouteForm): internal_nic = forms.CharField() external_nic = forms.CharField() class RuleForm(PirouteForm): action = forms.ChoiceField(choices=(('accept','Allow'),('drop','Ignore'),(...
{ "repo_name": "Kromey/piroute", "path": "iptables/forms.py", "copies": "1", "size": "1254", "license": "mit", "hash": 4692705303859145000, "line_mean": 32, "line_max": 123, "alpha_frac": 0.6858054226, "autogenerated": false, "ratio": 3.9558359621451102, "config_test": false, "has_no_keywords"...
from django import forms from .models import UserAccount class UserCreationForm(forms.ModelForm): """ A form for creating new users. Includes all the required fields, plus a repeated password. """ password1 = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.Cha...
{ "repo_name": "cloudartisan/dojomaster", "path": "apps/accounts/forms.py", "copies": "1", "size": "1268", "license": "mit", "hash": -203305310102911330, "line_mean": 29.1904761905, "line_max": 90, "alpha_frac": 0.6585173502, "autogenerated": false, "ratio": 4.433566433566433, "config_test": fal...
from django import forms # google.appengine.ext.db.djangoforms does not # support Django 1.11 # As a result, use native Django forms instead: # https://docs.djangoproject.com/en/1.11/topics/forms/ class PostForm(forms.Form): """Represents a post form.""" title = forms.CharField( label='Title', ...
{ "repo_name": "alexeikostevich/python-blog", "path": "gae_blog/blog/forms.py", "copies": "1", "size": "1096", "license": "unlicense", "hash": 1140254445625733100, "line_mean": 26.4, "line_max": 77, "alpha_frac": 0.5401459854, "autogenerated": false, "ratio": 4.151515151515151, "config_test": fa...
from django import forms CHOICES = (('video', 'Video',), ('audio', 'Audio',)) class ConnexionForm(forms.Form): username = forms.CharField(label="Username", max_length=30) password = forms.CharField(label="Password", widget=forms.PasswordInput) class UserForm(forms.Form): username = forms.CharField(lab...
{ "repo_name": "rachidoulasri/django_projectwebpage", "path": "authentification/forms.py", "copies": "1", "size": "1371", "license": "mit", "hash": 1875645583868539400, "line_mean": 37.0833333333, "line_max": 96, "alpha_frac": 0.7242888403, "autogenerated": false, "ratio": 3.6174142480211082, "c...
from django import forms OPERATOR_CHOICES = ( ('>', '>'), ('>=', '>='), ('<=', '<='), ('<', '<'), ('!=', '!='), ) AGGREGATOR_CHOICES = ( ('avg', 'average'), ('max', 'maximum'), ) class ScaleForm(forms.Form): metric = forms.ChoiceField() aggregator = forms.ChoiceField(AGGREGATOR...
{ "repo_name": "tsuru/tsuru-autoscale-dashboard", "path": "tsuru_autoscale/wizard/forms.py", "copies": "1", "size": "1099", "license": "bsd-3-clause", "hash": 2520355372261325300, "line_mean": 26.475, "line_max": 119, "alpha_frac": 0.6123748863, "autogenerated": false, "ratio": 3.434375, "config...
from django import forms OPERATORS = ( '__true__', '__null__', '$', '~', '^', '=', '<=', '>=', '<', '>', '!__true__', '!__null__', '!$', '!~', '!^', '!=', '!' ) def split_on_operator(value): for operator in sorted(OPERATORS, key=len, reverse=True): if value.startswith(operator): valu...
{ "repo_name": "bsmedberg/socorro", "path": "webapp-django/crashstats/supersearch/form_fields.py", "copies": "2", "size": "4545", "license": "mpl-2.0", "hash": 807618350920472200, "line_mean": 31.6978417266, "line_max": 79, "alpha_frac": 0.6325632563, "autogenerated": false, "ratio": 4.44281524926...
from django import forms operation_choices = ( ('Solve a system of linear equation', 'Solve a system of linear equation'), ('Compute eigenvalues', 'Compute eigenvalues'), ) class petsc_problem_form(forms.Form): operations = forms.MultipleChoiceField( choices=operation_choices, label='Which of the following ope...
{ "repo_name": "LighthouseHPC/lighthouse", "path": "src/Dlighthouse/lighthouse/forms/petsc_le.py", "copies": "1", "size": "1947", "license": "mit", "hash": -2288618317381926100, "line_mean": 56.2647058824, "line_max": 212, "alpha_frac": 0.7231638418, "autogenerated": false, "ratio": 3.6875, "con...
from django import forms # place form definition here from uuid import uuid4 from django import forms from django.forms.extras.widgets import SelectDateWidget from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django.contrib.staticfiles.storage import staticfiles_sto...
{ "repo_name": "goldhand/onegreek", "path": "onegreek/core/forms.py", "copies": "1", "size": "5469", "license": "bsd-3-clause", "hash": 2155220566764565000, "line_mean": 34.7516339869, "line_max": 78, "alpha_frac": 0.6063265679, "autogenerated": false, "ratio": 3.917621776504298, "config_test": ...
from django import forms term_choices = (('fall', 'Fall'), ('winter', 'Winter'), ('spring', 'Spring'), ('summer', 'Summer')) class CourseForm(forms.Form): year = forms.CharField(label='Year', required=True) term = forms.ChoiceField(label='Term', widget=forms.RadioSelect, choices=term_choices, required=...
{ "repo_name": "osu-mist/catalog-api-demo", "path": "catalog_api_demo/catalog_api_demo/forms.py", "copies": "1", "size": "1442", "license": "apache-2.0", "hash": -1362564124284226600, "line_mean": 54.4615384615, "line_max": 128, "alpha_frac": 0.7122052705, "autogenerated": false, "ratio": 3.433333...
from django import forms THRESHOLD_CHOICES = ( (0.1, "Very-Low"), (0.3, "Low"), (0.5, "Moderate"), (0.7, "High"), (0.9, "Very-High"), ) class Token(forms.Form): slack = forms.CharField(max_length=100) class ToneForm(forms.Form): joy = forms.ChoiceField(choices=THRESHOLD_CHOICES) joy_responses = form...
{ "repo_name": "closers-2015/Closers-2015_BOTS-_Final_Byte_Project", "path": "frontend/bots/forms.py", "copies": "1", "size": "1602", "license": "mit", "hash": 7176647649165218000, "line_mean": 28.6666666667, "line_max": 59, "alpha_frac": 0.7690387016, "autogenerated": false, "ratio": 3.0398481973...
from django import forms # TODO: Captcha class LoginForm(forms.Form): login = forms.CharField(20, 4, label='Login:') password = forms.CharField(widget=forms.PasswordInput, label='Password:') class RegisterForm(forms.Form): first_name = forms.CharField(20, 4, label='First name:') last_name = forms.C...
{ "repo_name": "araksin/leandiary", "path": "leandiary/forms.py", "copies": "1", "size": "1074", "license": "mit", "hash": -3755725594876665300, "line_mean": 33.6774193548, "line_max": 77, "alpha_frac": 0.6862197393, "autogenerated": false, "ratio": 3.7291666666666665, "config_test": false, "h...
from django import forms # todo proper B3 Handle from crispy_forms.bootstrap import StrictButton from crispy_forms import layout as crispy from crispy_forms.helper import FormHelper from django.utils.translation import ugettext from corehq.apps.style import crispy as hqcrispy class PrimeRestoreCacheForm(forms.Form):...
{ "repo_name": "qedsoftware/commcare-hq", "path": "corehq/apps/ota/forms.py", "copies": "1", "size": "3580", "license": "bsd-3-clause", "hash": 7962242687634750000, "line_mean": 35.1616161616, "line_max": 106, "alpha_frac": 0.5810055866, "autogenerated": false, "ratio": 4.105504587155964, "confi...
from django import forms TOOLS = [ ('all', 'All the tools'), ('travel', 'Where you could travel for work'), ('sectors', 'Discover jobs you could do'), ('discovery', 'Find jobs to apply for'), ] FEEDBACK_TYPES = [ ('not_working', 'Something isn\'t working'), ('new_idea', 'I would like to suggest...
{ "repo_name": "lm-tools/situational", "path": "situational/apps/home_page/forms.py", "copies": "1", "size": "1999", "license": "bsd-3-clause", "hash": -7086109771824979000, "line_mean": 29.7538461538, "line_max": 79, "alpha_frac": 0.5927963982, "autogenerated": false, "ratio": 4.226215644820296, ...
from django import forms TOTAL_WEIGHT = 100 MIN_RATING = 1 MAX_RATING = 5 class GeneralsForm(forms.Form): grid_name = forms.CharField(widget=forms.TextInput(attrs={'size':'45'})) description = forms.CharField(widget=forms.Textarea(), required=False) class AlternativesForm(forms.Form): # Override the in...
{ "repo_name": "danrg/RGT-tool", "path": "src/RGT/gridMng/wizard/forms.py", "copies": "1", "size": "9681", "license": "mit", "hash": 2617277476661533000, "line_mean": 52.4861878453, "line_max": 149, "alpha_frac": 0.5889887408, "autogenerated": false, "ratio": 4.2497805092186125, "config_test": f...
from django import forms try: from account.utils import user_display except ImportError: def user_display(user): return user.username from .models import Folder class FolderCreateForm(forms.Form): name = forms.CharField(max_length=140) parent = forms.ModelChoiceField( queryset=Folde...
{ "repo_name": "rizumu/pinax-documents", "path": "pinax/documents/forms.py", "copies": "1", "size": "1992", "license": "mit", "hash": -4995803959183529000, "line_mean": 26.2876712329, "line_max": 77, "alpha_frac": 0.6345381526, "autogenerated": false, "ratio": 4.167364016736402, "config_test": f...
from django import forms YES_NO_CHOICES = [ ('yes', 'Yes'), ('no', 'No') ] class OneTextFieldForm(forms.Form): text = forms.CharField(required=False, widget=forms.Textarea) class CurrentWorkStatusForm(forms.Form): WORK_STATUS_CHOICES = [ ('full_time', 'Full time'), ('part_time', 'Pa...
{ "repo_name": "lm-tools/situational", "path": "situational/apps/detailed_history/forms.py", "copies": "1", "size": "1217", "license": "bsd-3-clause", "hash": 3304833264016852500, "line_mean": 26.0444444444, "line_max": 72, "alpha_frac": 0.64831553, "autogenerated": false, "ratio": 3.6990881458966...
from django import forms # See: https://docs.djangoproject.com/en/1.8/topics/auth/default/#built-in-forms from django.contrib.auth.forms import UserCreationForm as BaseUserCreationForm from django.contrib.auth.forms import UserChangeForm as BaseUserChangeForm from django.contrib.auth.forms import AuthenticationForm as ...
{ "repo_name": "Traviskn/django_starter_template", "path": "{{cookiecutter.project_name}}/accounts/forms.py", "copies": "1", "size": "6748", "license": "mit", "hash": -5931915972373647000, "line_mean": 29.1160714286, "line_max": 114, "alpha_frac": 0.589534539, "autogenerated": false, "ratio": 4.58...
from django import forms try: from collections import OrderedDict except ImportError: # python 2.6 or earlier, use backport from ordereddict import OrderedDict from django.contrib.auth import authenticate, login from etc.toolbox import set_form_widgets_attrs class FlowsBase(object): """Base class fo...
{ "repo_name": "imposeren/django-sitegate", "path": "sitegate/flows_base.py", "copies": "1", "size": "4886", "license": "bsd-3-clause", "hash": -1258922543670261000, "line_mean": 36.5846153846, "line_max": 117, "alpha_frac": 0.6187065084, "autogenerated": false, "ratio": 4.179640718562874, "conf...
from django import forms try: from django.urls import reverse_lazy, reverse except expression as identifier: from django.core.urlresolvers import reverse_lazy, reverse try: from django_select2.forms import Select2Widget _select2 = True except ImportError: _select2 = False from popupcrud.widgets im...
{ "repo_name": "harikvpy/django-popupcrud", "path": "test/views.py", "copies": "1", "size": "3854", "license": "bsd-3-clause", "hash": 9174243521933502000, "line_mean": 28.6461538462, "line_max": 82, "alpha_frac": 0.6351842242, "autogenerated": false, "ratio": 3.6845124282982793, "config_test": ...
from django import forms try: import autocomplete_light AUTOCOMPLETE_LIGHT_INSTALLED = True except ImportError: AUTOCOMPLETE_LIGHT_INSTALLED = False from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Image, Album class ImageForm(forms.ModelForm): cla...
{ "repo_name": "goldhand/onegreek", "path": "onegreek/images/forms.py", "copies": "1", "size": "1380", "license": "bsd-3-clause", "hash": -1805855008822501000, "line_mean": 33.5, "line_max": 103, "alpha_frac": 0.6355072464, "autogenerated": false, "ratio": 4.131736526946108, "config_test": false...
from django import forms from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext, ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$', help_text=_("E...
{ "repo_name": "letouriste001/SmartForest_2.0", "path": "python3.4Smartforest/lib/python3.4/site-packages/django/contrib/flatpages/forms.py", "copies": "1", "size": "2024", "license": "mit", "hash": -1408733759745342200, "line_mean": 36.4814814815, "line_max": 94, "alpha_frac": 0.5543478261, "autoge...
from django import forms from accounts.models import UserGroup, UserProfile from django.contrib.auth.models import Group, User from django.http import Http404 class GroupCreationForm(forms.Form): groupname = forms.CharField(max_length=254) error_messages = { } def __init__(self, request=...
{ "repo_name": "vivianbuan/cs3240-s15-team20", "path": "SecureWitness/accounts/forms.py", "copies": "1", "size": "3034", "license": "mit", "hash": 1989775227945369000, "line_mean": 28.0396039604, "line_max": 92, "alpha_frac": 0.5748187212, "autogenerated": false, "ratio": 4.267229254571027, "con...
from django import forms from batchimport.util import get_model_list, get_column_choice_list, get_model_fields import batchimport.batchimport_settings import_model_list = get_model_list() class UploadImportFileForm(forms.Form): model_for_import = forms.ChoiceField(import_model_list, label='What are you impo...
{ "repo_name": "venkatesh22/django-batchimport", "path": "sample_project/batchimport/forms.py", "copies": "4", "size": "7152", "license": "bsd-3-clause", "hash": -2399509921195184000, "line_mean": 46.3378378378, "line_max": 150, "alpha_frac": 0.6984060403, "autogenerated": false, "ratio": 3.285254...
from django import forms from django.apps import apps from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse, NoReverseMatch from django.template.context_processors import csrf from django.db.models.base import ModelBase from django.forms.forms import DeclarativeFieldsMet...
{ "repo_name": "LennonChin/Django-Practices", "path": "MxOnline/extra_apps/xadmin/views/dashboard.py", "copies": "1", "size": "24137", "license": "apache-2.0", "hash": 1417059612146069000, "line_mean": 34.2417417417, "line_max": 134, "alpha_frac": 0.5681733438, "autogenerated": false, "ratio": 3.9...
from django import forms from django.conf import settings from django.conf.urls import url from django.contrib import admin from django.contrib.sites.models import Site from django.contrib import messages from django.utils.translation import ungettext, ugettext_lazy as _ from django.conf.urls import patterns fr...
{ "repo_name": "anderdl/test3repo", "path": "photologue/admin.py", "copies": "2", "size": "10870", "license": "bsd-3-clause", "hash": -7843328719436237000, "line_mean": 36.2746478873, "line_max": 97, "alpha_frac": 0.5735970561, "autogenerated": false, "ratio": 4.129939209726444, "config_test": f...
from django import forms from django.conf import settings from django.contrib.admin.util import flatten_fieldsets, lookup_field from django.contrib.admin.util import display_for_field, label_for_field from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist ...
{ "repo_name": "rimbalinux/MSISDNArea", "path": "django/contrib/admin/helpers.py", "copies": "3", "size": "13667", "license": "bsd-3-clause", "hash": 9221901478047612000, "line_mean": 37.8454810496, "line_max": 133, "alpha_frac": 0.5872539694, "autogenerated": false, "ratio": 4.1756798044607395, ...
from django import forms from django.conf import settings from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from ajax_select.fields import AutoCompleteSelectMultipleField from tinymce.widgets import TinyMCE from iss...
{ "repo_name": "caseywstark/colab", "path": "colab/apps/issues/forms.py", "copies": "1", "size": "3669", "license": "mit", "hash": 8439115920922142000, "line_mean": 39.595505618, "line_max": 132, "alpha_frac": 0.6524938675, "autogenerated": false, "ratio": 4.12247191011236, "config_test": false,...
from django import forms from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext, ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$', help_t...
{ "repo_name": "diego-d5000/MisValesMd", "path": "env/lib/python2.7/site-packages/django/contrib/flatpages/forms.py", "copies": "1", "size": "2090", "license": "mit", "hash": 2409107628423198700, "line_mean": 36.7037037037, "line_max": 94, "alpha_frac": 0.5406698565, "autogenerated": false, "ratio...
from django import forms from django.conf import settings from django.contrib import admin from django.contrib.sites.models import Site from django.contrib import messages from django.utils.translation import ungettext, ugettext_lazy as _ from .models import Gallery, Photo, GalleryUpload, PhotoEffect, PhotoSize...
{ "repo_name": "seedwithroot/django-photologue-clone", "path": "photologue/admin.py", "copies": "1", "size": "10061", "license": "bsd-3-clause", "hash": 8353977534055854000, "line_mean": 36.8455598456, "line_max": 96, "alpha_frac": 0.5935791671, "autogenerated": false, "ratio": 4.0244, "config_t...
from django import forms from django.conf import settings from django.contrib import admin from django.core.urlresolvers import reverse from django.utils.encoding import smart_unicode from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from django.contrib.admin.widget...
{ "repo_name": "jumoconnect/openjumo", "path": "jumodjango/cust_admin/widgets.py", "copies": "1", "size": "3880", "license": "mit", "hash": -3188335508698854000, "line_mean": 43.6470588235, "line_max": 166, "alpha_frac": 0.5987113402, "autogenerated": false, "ratio": 3.8076545632973504, "config_...
from django import forms from django.conf import settings from django.db import models from django.utils.safestring import mark_safe class Coordinates: def __init__(self, lat, lng): self.lat = float(lat) self.lng = float(lng) def __repr__(self): return ','.join([str(self.lat),...
{ "repo_name": "albatrossandco/brubeck_cms", "path": "brubeck/common/geography/fields.py", "copies": "1", "size": "3949", "license": "bsd-3-clause", "hash": -2206755710120254500, "line_mean": 37.49, "line_max": 125, "alpha_frac": 0.5545707774, "autogenerated": false, "ratio": 3.732514177693762, ...
from django import forms from django.conf import settings from django.db import models from django.utils.safestring import mark_safe class Coordinates(): def __init__(self, lat, lng): self.lat = float(lat) self.lng = float(lng) def __repr__(self): return ','.join([str(self.lat...
{ "repo_name": "albatrossandco/brubeck_cms", "path": "brubeck/mapping/fields.py", "copies": "1", "size": "3951", "license": "bsd-3-clause", "hash": 72748692312989550, "line_mean": 37.51, "line_max": 125, "alpha_frac": 0.5542900532, "autogenerated": false, "ratio": 3.734404536862004, "config_test...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from calculator.models import * from . import templater ################################################################ ### Main calculator page functionality def process_request...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "manager/views/calc.py", "copies": "1", "size": "2703", "license": "apache-2.0", "hash": 2863636188843783000, "line_mean": 30.987804878, "line_max": 85, "alpha_frac": 0.6152423233, "autogenerated": false, "ratio": 4.046407185628743, "config_test": ...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.contrib.auth import authenticate, login from manager import models as pmod from . import templater from django.conf import settings import decimal, datetime from ldap3 import...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "manager/views/login.py", "copies": "1", "size": "1453", "license": "apache-2.0", "hash": -8183874737522304000, "line_mean": 38.4166666667, "line_max": 195, "alpha_frac": 0.7185134205, "autogenerated": false, "ratio": 3.5612745098039214, "config_te...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.db.models import Q from manager import models as pmod from . import templater import decimal, datetime from django.core.mail import send_mail import requests from base_app i...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "shop/views/completeorder.py", "copies": "1", "size": "5022", "license": "apache-2.0", "hash": -5682085002044735000, "line_mean": 29.5849056604, "line_max": 193, "alpha_frac": 0.6985264835, "autogenerated": false, "ratio": 3.384097035040431, "confi...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from django.db.models import Q from manager import models as pmod import decimal, datetime from . import templater # This view calculates the commissions and later displays the total co...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "manager/views/calculatecommissions.py", "copies": "1", "size": "1269", "license": "apache-2.0", "hash": 1649424506143995000, "line_mean": 28.2619047619, "line_max": 87, "alpha_frac": 0.7407407407, "autogenerated": false, "ratio": 3.4021447721179623,...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from . import templater from django.conf import settings from manager import models as pmod import decimal, datetime def process_request(request): if not request.user.is_authenticated...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "shop/views/shipping_details.py", "copies": "1", "size": "2609", "license": "apache-2.0", "hash": 2974593927515792000, "line_mean": 34.7746478873, "line_max": 116, "alpha_frac": 0.6696052127, "autogenerated": false, "ratio": 3.353470437017995, "con...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from . import templater from django.conf import settings import decimal, datetime def process_request(request): '''handles the form for a customer to edit and add their credit card inf...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "shop/views/card_details.py", "copies": "1", "size": "1828", "license": "apache-2.0", "hash": 3986825747468364000, "line_mean": 44.9230769231, "line_max": 186, "alpha_frac": 0.6794310722, "autogenerated": false, "ratio": 3.6055226824457596, "config...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from manage import models as mmod from . import templater from django.contrib.auth.decorators import user_passes_test @user_passes_test(lambda u: u.is_superuser) def process_request(req...
{ "repo_name": "brayden2544/Mystuff-final", "path": "manage/views/edit_brand.py", "copies": "1", "size": "1407", "license": "apache-2.0", "hash": 8266686161669782000, "line_mean": 27.9787234043, "line_max": 91, "alpha_frac": 0.65742715, "autogenerated": false, "ratio": 3.823369565217391, "config...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from manager import models as pmod from . import templater from django.conf import settings import decimal, datetime def process_request(request): user = pmod.User() user.email = ...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "manager/views/new_customer.py", "copies": "1", "size": "3167", "license": "apache-2.0", "hash": -2529059513922391000, "line_mean": 39.1558441558, "line_max": 133, "alpha_frac": 0.6956109883, "autogenerated": false, "ratio": 3.298958333333333, "con...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from manager import models as pmod from . import templater import datetime from django.core.mail import send_mail # This view checks and grabs all the overdue rentals. It also allows an...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "manager/views/overdue_rentals.py", "copies": "1", "size": "3097", "license": "apache-2.0", "hash": 182042792678773250, "line_mean": 59.98, "line_max": 273, "alpha_frac": 0.6945431062, "autogenerated": false, "ratio": 2.8543778801843316, "config_te...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from manager import models as pmod from . import templater def process_request(request): if not request.user.is_authenticated(): return HttpResponseRedirect('/shop/login') ...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "shop/views/accountspaces.py", "copies": "1", "size": "6920", "license": "apache-2.0", "hash": -4188611320079913000, "line_mean": 43.8410596026, "line_max": 142, "alpha_frac": 0.5947976879, "autogenerated": false, "ratio": 4.261083743842365, "confi...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from manager import models as pmod from . import templater def process_request(request): '''this py handles the customer's account information, including ability to reset password a...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "shop/views/account.py", "copies": "1", "size": "8699", "license": "apache-2.0", "hash": 6637080044445483000, "line_mean": 38.8497652582, "line_max": 139, "alpha_frac": 0.6961719738, "autogenerated": false, "ratio": 3.467118373854125, "config_test"...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from manager import models as pmod from . import templater # This view displays the categories def process_request(request): if not request.user.is_authenticated(): return HttpR...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "manager/views/categories.py", "copies": "1", "size": "1164", "license": "apache-2.0", "hash": -8159866482991479000, "line_mean": 27.15, "line_max": 71, "alpha_frac": 0.7130584192, "autogenerated": false, "ratio": 3.4954954954954953, "config_test":...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from shop import models as pmod from . import templater from django.conf import settings import decimal, datetime def process_request(request): if not request.user.is_authenticated():...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "shop/views/catalog_product_details.py", "copies": "1", "size": "3084", "license": "apache-2.0", "hash": 4701151114246583000, "line_mean": 39.7027027027, "line_max": 137, "alpha_frac": 0.7182230869, "autogenerated": false, "ratio": 3.5205479452054793...
from django import forms from django.conf import settings from django.http import HttpResponse, HttpResponseRedirect, Http404 from shop import models as pmod from . import templater def process_request(request): if not request.user.is_authenticated(): return HttpResponseRedirect('/manager/login') if r...
{ "repo_name": "odrolliv13/Hex-Photos", "path": "shop/views/stores.py", "copies": "1", "size": "1087", "license": "apache-2.0", "hash": -4893433770676349000, "line_mean": 26.6578947368, "line_max": 67, "alpha_frac": 0.7046918123, "autogenerated": false, "ratio": 3.407523510971787, "config_test":...
from django import forms from django.conf import settings from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse_lazy from django.contrib.auth.decorators import login_required from djforms.sustainability.green.forms import PledgeForm from d...
{ "repo_name": "carthage-college/django-djforms", "path": "djforms/sustainability/green/views.py", "copies": "2", "size": "1912", "license": "unlicense", "hash": 8293060651964850000, "line_mean": 26.9696969697, "line_max": 61, "alpha_frac": 0.5957112971, "autogenerated": false, "ratio": 3.96680497...
from django import forms from django.conf import settings from django.utils import simplejson from django.utils.safestring import mark_safe from tagging.models import Tag from cmsplugin_blog.models import Entry class AutoCompleteTagInput(forms.TextInput): class Media: css = { 'all': (...
{ "repo_name": "wlanslovenija/cmsplugin-blog", "path": "cmsplugin_blog/widgets.py", "copies": "3", "size": "2884", "license": "bsd-3-clause", "hash": 1499136152552174800, "line_mean": 38.0555555556, "line_max": 83, "alpha_frac": 0.4507628294, "autogenerated": false, "ratio": 5.050788091068301, "...
from django import forms from django.conf import settings from django.utils.safestring import mark_safe from django.utils.text import truncate_words from django.template.loader import render_to_string from django.contrib.admin.widgets import ForeignKeyRawIdWidget class ForeignKeySearchInput(ForeignKeyRawIdWidge...
{ "repo_name": "commtrack/temp-aquatest", "path": "apps/django_extensions/admin/widgets.py", "copies": "1", "size": "3090", "license": "bsd-3-clause", "hash": 4809690722479495000, "line_mean": 38.6578947368, "line_max": 100, "alpha_frac": 0.5854368932, "autogenerated": false, "ratio": 4.0339425587...
from django import forms from django.conf.urls import url from django.contrib import messages from django.contrib.messages.views import SuccessMessageMixin from django.http import HttpResponse, HttpResponseRedirect from django.template import engines from django.template.response import TemplateResponse from dja...
{ "repo_name": "yephper/django", "path": "tests/messages_tests/urls.py", "copies": "1", "size": "2636", "license": "bsd-3-clause", "hash": -5259051419008390000, "line_mean": 30.95, "line_max": 92, "alpha_frac": 0.6760242792, "autogenerated": false, "ratio": 4.055384615384615, "config_test": fals...
from django import forms from django.contrib.auth.forms import AuthenticationForm from django.contrib.auth.models import User class LoginForm(AuthenticationForm): class Meta: model = User username = forms.CharField(label="Username", max_length=30, widget...
{ "repo_name": "raydodds/eh-print-queue", "path": "ehPrintQueue/users/forms.py", "copies": "1", "size": "3006", "license": "mit", "hash": -1815352053468644000, "line_mean": 48.9830508475, "line_max": 119, "alpha_frac": 0.5755156354, "autogenerated": false, "ratio": 4.864077669902913, "config_tes...
from django import forms from django.contrib.auth.forms import UserCreationForm from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.forms import ( UserCreationForm, UserChangeForm, AuthenticationForm, PasswordResetForm, SetPasswordForm, PasswordChangeForm,...
{ "repo_name": "flavoi/diventi", "path": "diventi/accounts/forms.py", "copies": "1", "size": "7638", "license": "apache-2.0", "hash": 369967948959109900, "line_mean": 32.0982142857, "line_max": 97, "alpha_frac": 0.5467399843, "autogenerated": false, "ratio": 4.271812080536913, "config_test": fal...
from django import forms from django.contrib.auth.hashers import make_password from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from account.models import School, Profile class RegistrationForm(forms.Form): required_css_class = 'required' use...
{ "repo_name": "ace-han/quanquan", "path": "authx/forms.py", "copies": "1", "size": "3387", "license": "bsd-3-clause", "hash": -5916599561065094000, "line_mean": 46.4142857143, "line_max": 136, "alpha_frac": 0.5338057278, "autogenerated": false, "ratio": 4.710709318497914, "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.cleaned_data.get("use...
{ "repo_name": "arnaudoff/watcher", "path": "users/forms.py", "copies": "1", "size": "1921", "license": "mit", "hash": 5177516605223733000, "line_mean": 28.046875, "line_max": 89, "alpha_frac": 0.7038001041, "autogenerated": false, "ratio": 3.6800766283524906, "config_test": false, "has_no_key...
from django import forms from django.contrib.auth import authenticate from django.contrib.auth.models import User class LoginForm(forms.Form): username = forms.CharField(max_length=100, label='', widget=forms.TextInput(attrs={'placeholder': 'Username'})) password = forms.CharField(max_length=100, label...
{ "repo_name": "SWE574-Nerds/friendly-eureka", "path": "backend/eureka/accounts/forms.py", "copies": "1", "size": "1783", "license": "mit", "hash": 6830806644671374000, "line_mean": 41.487804878, "line_max": 129, "alpha_frac": 0.6483454851, "autogenerated": false, "ratio": 4.4575, "config_test":...
from django import forms from django.contrib.auth import forms as authForms from account.models import UserProfile from django.utils.translation import ugettext, ugettext_lazy as _ class ProfileForm(forms.Form): weibo_id = forms.CharField(max_length=64, required=False) weixin_id = forms.CharField(max_le...
{ "repo_name": "AKBQuiz/Web", "path": "account/forms.py", "copies": "1", "size": "3348", "license": "mit", "hash": -2230962281017860600, "line_mean": 43.8904109589, "line_max": 112, "alpha_frac": 0.6164874552, "autogenerated": false, "ratio": 4.41688654353562, "config_test": false, "has_no_key...
from django import forms from django.contrib.auth import get_user_model from django.contrib.auth.forms import PasswordResetForm from django.contrib.auth.password_validation import validate_password from django.contrib.auth.tokens import default_token_generator from django.contrib.sites.shortcuts import get_current...
{ "repo_name": "kbarnes3/BaseDjangoSite", "path": "web/users/forms.py", "copies": "1", "size": "2372", "license": "bsd-2-clause", "hash": 4370619933254183000, "line_mean": 38.8965517241, "line_max": 90, "alpha_frac": 0.686762226, "autogenerated": false, "ratio": 4.500948766603416, "config_test":...
from django import forms from django.contrib.auth import get_user_model from django.contrib.auth import authenticate from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.forms.models import modelformset_factory, inlineformset_factory from slugify import slugify i...
{ "repo_name": "tiagoarasilva/django-boilerplate", "path": "project_name/accounts/forms.py", "copies": "1", "size": "5088", "license": "mit", "hash": -9112939738120433000, "line_mean": 33.3333333333, "line_max": 111, "alpha_frac": 0.5992531447, "autogenerated": false, "ratio": 4.443668122270743, ...
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, *arg...
{ "repo_name": "gschua/COMP3297-Fume-Community-Platform", "path": "vapoursite/accounts/forms.py", "copies": "1", "size": "1853", "license": "mit", "hash": -6592921601100386000, "line_mean": 27.4126984127, "line_max": 85, "alpha_frac": 0.6125202375, "autogenerated": false, "ratio": 4.56403940886699...
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,...
{ "repo_name": "iharsh234/eElectronics", "path": "accounts/forms.py", "copies": "1", "size": "2391", "license": "mit", "hash": -2347291296431171600, "line_mean": 27.5185185185, "line_max": 83, "alpha_frac": 0.5846925972, "autogenerated": false, "ratio": 4.28494623655914, "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...
{ "repo_name": "neldom/qessera", "path": "accounts/forms.py", "copies": "1", "size": "2563", "license": "mit", "hash": 1955840463251503400, "line_mean": 32.1733333333, "line_max": 74, "alpha_frac": 0.604369879, "autogenerated": false, "ratio": 4.677007299270073, "config_test": false, "has_no_k...
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=...
{ "repo_name": "shawon922/django-blog-api", "path": "accounts/forms.py", "copies": "1", "size": "2103", "license": "mit", "hash": 6547772844877535000, "line_mean": 30.859375, "line_max": 91, "alpha_frac": 0.6000951022, "autogenerated": false, "ratio": 4.532327586206897, "config_test": false, "...
from django import forms from django.contrib.auth.models import User, Group class AddSqlWorkflow(forms.Form): workflow_name = forms.CharField(required=True) reviewer = forms.MultipleChoiceField(choices=((u.email, u.username) for u in User.objects.filter(groups__name='dba'))) backup = forms.CharField(...
{ "repo_name": "mingziV5/opsweb_test", "path": "inception/form.py", "copies": "1", "size": "1266", "license": "apache-2.0", "hash": -6400537784785567000, "line_mean": 37.8709677419, "line_max": 122, "alpha_frac": 0.6620745543, "autogenerated": false, "ratio": 3.6508875739644973, "config_test": f...
from django import forms from django.contrib.auth.models import User #from django.contrib.auth import models from django.contrib.auth.forms import UserCreationForm, UserChangeForm from .models import (UserProfile, RecruitmentForm, Questionnaire, Regi...
{ "repo_name": "dinhkute/Incisive-AIESEC", "path": "webroot/Pj/mysite/polls/form.py", "copies": "1", "size": "2793", "license": "apache-2.0", "hash": -7029965579371826000, "line_mean": 26.5204081633, "line_max": 72, "alpha_frac": 0.537414966, "autogenerated": false, "ratio": 4.59375, "config_tes...
from django import forms from django.contrib.auth.models import User class LoginPage(forms.Form): username = forms.CharField(label='Username', max_length=32, required=True, error_messages={'required': 'Please enter your Username'}, widget=forms.TextInput(attrs={'placeholder': 'Username', 'class' : 'form-control'}...
{ "repo_name": "drfrink/adminLTE_Django", "path": "loginManager/forms.py", "copies": "1", "size": "2920", "license": "mit", "hash": 5789556606453886000, "line_mean": 74.8421052632, "line_max": 229, "alpha_frac": 0.7400684932, "autogenerated": false, "ratio": 3.8070404172099086, "config_test": fa...
from django import forms from django.contrib.auth.models import User from domain import Permissions from domain.forms import RegistrationRequestForm # Reuse to capture new user info ######################################################################################################## # # From http://www.p...
{ "repo_name": "commtrack/temp-aquatest", "path": "apps/domain/user_registration_backend/forms.py", "copies": "1", "size": "3004", "license": "bsd-3-clause", "hash": 3384270913849892400, "line_mean": 47.2786885246, "line_max": 117, "alpha_frac": 0.5362849534, "autogenerated": false, "ratio": 4.791...
from django import forms from django.contrib.auth.models import User class UserForm(forms.ModelForm): POSITIONS = ( ('student', 'Студент'), ('professor', 'Преподаватель'), ('cooperator', 'Сотрудник'), ('scientific_director', 'Научный руководитель'), ) username = ...
{ "repo_name": "Roomanidzee/DistribSystem", "path": "distrib_system/userroles/forms.py", "copies": "1", "size": "1121", "license": "mit", "hash": 5852630761785259000, "line_mean": 43.9545454545, "line_max": 113, "alpha_frac": 0.6795252226, "autogenerated": false, "ratio": 3.0269461077844313, "co...
from django import forms from django.contrib.comments.forms import CommentForm from django.utils.html import strip_tags from django.utils.translation import ugettext as _ from block_comment.models import BlockComment class BlockCommentForm(CommentForm): index = forms.IntegerField(min_value=0, required=Fal...
{ "repo_name": "gabrielhurley/django-block-comment", "path": "block_comment/forms.py", "copies": "1", "size": "1671", "license": "bsd-3-clause", "hash": -2097556485821366800, "line_mean": 35.1333333333, "line_max": 107, "alpha_frac": 0.6307600239, "autogenerated": false, "ratio": 4.362924281984334...
from django import forms from django.contrib import admin from django.contrib.admin import site from django.utils.translation import ugettext_lazy as _ from issues import models from meetings.models import AgendaItem, Meeting class IssueAgendaItemInline(admin.TabularInline): model = AgendaItem extra...
{ "repo_name": "hasadna/OpenCommunity", "path": "src/issues/admin.py", "copies": "1", "size": "6002", "license": "bsd-3-clause", "hash": 8886607861326356000, "line_mean": 25.2818181818, "line_max": 83, "alpha_frac": 0.4326891036, "autogenerated": false, "ratio": 5.1652323580034425, "config_test"...
from django import forms from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from django.forms.util import ErrorList from django.utils.translation import ugettext_lazy as _ from slotmachine.luckydraw.models import LuckyDrawSnapshot from slotmachine.staff.models import ...
{ "repo_name": "ace-han/luckydraw", "path": "slotmachine/luckydraw/forms.py", "copies": "1", "size": "1869", "license": "mit", "hash": 2188063236066961000, "line_mean": 47.2368421053, "line_max": 102, "alpha_frac": 0.5703584805, "autogenerated": false, "ratio": 4.743654822335025, "config_test": ...
from django import forms from django.contrib import admin from django.contrib.admin.widgets import FilteredSelectMultiple from multichoice.models import MCQuestion, Answer from true_false.models import TF_Question from essay.models import Essay_Question from quiz.models import Quiz, Category, SubCategory, Progr...
{ "repo_name": "girishramnani/QuizPlatform", "path": "app/quiz/admin.py", "copies": "1", "size": "3322", "license": "mit", "hash": -5110190479271273000, "line_mean": 28.4770642202, "line_max": 77, "alpha_frac": 0.6432871764, "autogenerated": false, "ratio": 3.9594755661501786, "config_test": fal...
from django import forms from django.contrib import admin from django.contrib.auth.models import Group import django.contrib.auth.admin from django.contrib.auth.forms import ReadOnlyPasswordHashField from users.forms import UserCreationForm from users.models import User class UserChangeForm(forms.ModelForm...
{ "repo_name": "kbarnes3/BaseDjangoSite", "path": "web/users/admin.py", "copies": "1", "size": "2142", "license": "bsd-2-clause", "hash": 924681333084034300, "line_mean": 34.3050847458, "line_max": 91, "alpha_frac": 0.6433239963, "autogenerated": false, "ratio": 4.135135135135135, "config_test":...
from django import forms from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from django import template from metatags.models import Metatag, MetatagType from django.shortcuts im...
{ "repo_name": "na/django-metatags", "path": "project/pages/admin.py", "copies": "1", "size": "4214", "license": "mit", "hash": -7300318034023846000, "line_mean": 40.5858585859, "line_max": 133, "alpha_frac": 0.5797342193, "autogenerated": false, "ratio": 4.20979020979021, "config_test": false, ...
from django import forms from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$', help_text = _("E...
{ "repo_name": "bernardokyotoku/skillplant", "path": "django/contrib/flatpages/admin.py", "copies": "12", "size": "1117", "license": "bsd-3-clause", "hash": -6058351370070470000, "line_mean": 37.8928571429, "line_max": 133, "alpha_frac": 0.6150402865, "autogenerated": false, "ratio": 4.04710144927...
from django import forms from django.contrib import admin from django.utils import timezone from django.core.urlresolvers import reverse from djtinue.admissions.application.models import Application, Contact, School from djtinue.admissions.application.forms import RACES class SchoolInline(admin.StackedInlin...
{ "repo_name": "carthagecollege/django-djtinue", "path": "djtinue/admissions/application/admin.py", "copies": "1", "size": "3121", "license": "unlicense", "hash": -2205342474797535700, "line_mean": 27.1682242991, "line_max": 78, "alpha_frac": 0.6215956424, "autogenerated": false, "ratio": 3.930730...
from django import forms from django.contrib import admin from django.utils.translation import ugettext from django.contrib.auth.admin import UserAdmin from django.contrib.admin.sites import NotRegistered from django.contrib.auth.models import User, Group, Permission from django.contrib.admin.widgets import Filte...
{ "repo_name": "gquirozbogner/contentbox-master", "path": "third_party/permission_backend_nonrel/admin.py", "copies": "4", "size": "5195", "license": "apache-2.0", "hash": -3447468230742452700, "line_mean": 33.8275862069, "line_max": 141, "alpha_frac": 0.6315688162, "autogenerated": false, "ratio"...