text
stringlengths
0
1.05M
meta
dict
from django import forms #from the models, we have this, (couchmodels.py) #flipping to tuple from django.forms import Form from corehq.apps.api.es import ReportCaseES from pact.enums import PACT_HP_CHOICES, PACT_DOT_CHOICES, PACT_REGIMEN_CHOICES, GENDER_CHOICES, PACT_RACE_CHOICES, PACT_HIV_CLINIC_CHOICES, PACT_LANGUAG...
{ "repo_name": "SEL-Columbia/commcare-hq", "path": "custom/_legacy/pact/forms/patient_form.py", "copies": "1", "size": "5226", "license": "bsd-3-clause", "hash": 6384816158687756000, "line_mean": 45.2477876106, "line_max": 231, "alpha_frac": 0.6373899732, "autogenerated": false, "ratio": 3.5575221...
from django import forms from timezones.utils import time_at class LocationTimezoneAwareDateTimeField(forms.DateTimeField): pass class LocationTimezoneAwareForm(forms.Form): def clean(self): first_pass = super(LocationTimezoneAwareForm, self).clean() for fieldname in self.fields.keys(): ...
{ "repo_name": "adamfast/geodjango_timezones", "path": "timezones/forms.py", "copies": "1", "size": "1345", "license": "bsd-3-clause", "hash": 604248669658315000, "line_mean": 33.4871794872, "line_max": 93, "alpha_frac": 0.6089219331, "autogenerated": false, "ratio": 5.018656716417911, "config_t...
from django import forms from tinymce.widgets import TinyMCE from website.models import HomePage, GenericPage, CaseStudyPage, ContactPage from website.utils import Emailer class ContactForm(forms.Form): name = forms.CharField(max_length=150) website = forms.URLField(required=False) email = forms.EmailFie...
{ "repo_name": "andrewebdev/django-ostinato", "path": "demo/website/forms.py", "copies": "1", "size": "1481", "license": "mit", "hash": 7780213221930098000, "line_mean": 24.5344827586, "line_max": 76, "alpha_frac": 0.6583389602, "autogenerated": false, "ratio": 3.9811827956989245, "config_test":...
from django import forms from tower import ugettext as _ from oneanddone.base.widgets import MyURLField from oneanddone.users.models import UserProfile class SignUpForm(forms.ModelForm): pp_checkbox = forms.BooleanField( label=_("You are creating a profile that will include a public username" ...
{ "repo_name": "akatsoulas/oneanddone", "path": "oneanddone/users/forms.py", "copies": "1", "size": "1908", "license": "mpl-2.0", "hash": -6166117257300762000, "line_mean": 40.4782608696, "line_max": 94, "alpha_frac": 0.6540880503, "autogenerated": false, "ratio": 4.24, "config_test": false, "...
from django import forms from tower import ugettext as _ from oneanddone.users.models import UserProfile class SignUpForm(forms.ModelForm): pp_checkbox = forms.BooleanField( label=_("You are creating a profile that will include a public username" " and work history." " Yo...
{ "repo_name": "jicksy/oneanddone_test", "path": "oneanddone/users/forms.py", "copies": "1", "size": "1501", "license": "mpl-2.0", "hash": 5828531179548642000, "line_mean": 35.6097560976, "line_max": 94, "alpha_frac": 0.63491006, "autogenerated": false, "ratio": 4.363372093023256, "config_test":...
from django import forms from tower import ugettext as _, ungettext as ngettext import mkt from mkt.access import acl from mkt.site.utils import slugify from mkt.tags.models import Tag def clean_tags(request, tags, max_tags=None): """ Blocked tags are not allowed. Restricted tags can only be edited by R...
{ "repo_name": "tsl143/zamboni", "path": "mkt/tags/utils.py", "copies": "9", "size": "2536", "license": "bsd-3-clause", "hash": 3283881556783078000, "line_mean": 37.4242424242, "line_max": 75, "alpha_frac": 0.606466877, "autogenerated": false, "ratio": 3.8078078078078077, "config_test": false, ...
from django import forms from tower import ugettext_lazy as _lazy from addons.models import Category import amo from mkt.api.forms import SluggableModelChoiceField ADDON_CHOICES = [(k, k) for k in amo.MKT_ADDON_TYPES_API.keys()] SORT_CHOICES = [ (None, _lazy(u'Relevance')), ('popularity', _lazy(u'Populari...
{ "repo_name": "Joergen/zamboni", "path": "mkt/search/forms.py", "copies": "1", "size": "4935", "license": "bsd-3-clause", "hash": -3564278470525083600, "line_mean": 32.5714285714, "line_max": 79, "alpha_frac": 0.6056737589, "autogenerated": false, "ratio": 3.463157894736842, "config_test": fals...
from django import forms from tower import ugettext_lazy as _lazy from flicks.base.util import country_choices from flicks.users.models import UserProfile class UserProfileForm(forms.ModelForm): # L10n: Used in a choice field where users can choose between receiving # L10n: HTML-based or Text-only newslette...
{ "repo_name": "mozilla/firefox-flicks", "path": "flicks/users/forms.py", "copies": "1", "size": "1371", "license": "bsd-3-clause", "hash": -6351064628021835000, "line_mean": 37.0833333333, "line_max": 77, "alpha_frac": 0.6185266229, "autogenerated": false, "ratio": 4.271028037383178, "config_te...
from django import forms from tower import ugettext_lazy as _lazy from kitsune.forums.models import Thread, Post from kitsune.sumo.form_fields import StrippedCharField MSG_TITLE_REQUIRED = _lazy(u'Please provide a title.') MSG_TITLE_SHORT = _lazy( u'Your title is too short (%(show_value)s characters). It must b...
{ "repo_name": "silentbob73/kitsune", "path": "kitsune/forums/forms.py", "copies": "17", "size": "3129", "license": "bsd-3-clause", "hash": -3241789093355565000, "line_mean": 37.6296296296, "line_max": 77, "alpha_frac": 0.5711089805, "autogenerated": false, "ratio": 4.090196078431372, "config_te...
from django import forms from tower import ugettext_lazy as _lazy from kitsune.kbforums.models import Thread, Post from kitsune.sumo.form_fields import StrippedCharField MSG_TITLE_REQUIRED = _lazy(u'Please provide a title.') MSG_TITLE_SHORT = _lazy(u'Your title is too short (%(show_value)s ' ...
{ "repo_name": "MziRintu/kitsune", "path": "kitsune/kbforums/forms.py", "copies": "17", "size": "3517", "license": "bsd-3-clause", "hash": -2299127963742961400, "line_mean": 39.8953488372, "line_max": 78, "alpha_frac": 0.5328404891, "autogenerated": false, "ratio": 4.257869249394673, "config_tes...
from django import forms from tower import ugettext_lazy as _lazy import amo from mkt.constants import (CATEGORY_CHOICES, TARAKO_CATEGORY_CHOICES, TARAKO_CATEGORIES_MAPPING) from mkt.constants.applications import DEVICE_LOOKUP ADDON_CHOICES = [(k, k) for k in amo.MKT_ADDON_TYPES_API.keys(...
{ "repo_name": "andymckay/zamboni", "path": "mkt/search/forms.py", "copies": "1", "size": "6888", "license": "bsd-3-clause", "hash": -2257057831156794400, "line_mean": 36.6393442623, "line_max": 79, "alpha_frac": 0.6049651568, "autogenerated": false, "ratio": 3.703225806451613, "config_test": fa...
from django import forms from tower import ugettext_lazy as _lazy import mkt from mkt.constants import (CATEGORY_CHOICES, CATEGORY_CHOICES_DICT, CATEGORY_REDIRECTS, TARAKO_CATEGORIES_MAPPING, TARAKO_CATEGORY_CHOICES) from mkt.constants.applications import DEVICE_L...
{ "repo_name": "ayushagrawal288/zamboni", "path": "mkt/search/forms.py", "copies": "5", "size": "7919", "license": "bsd-3-clause", "hash": -3056541321696598500, "line_mean": 37.6292682927, "line_max": 79, "alpha_frac": 0.6084101528, "autogenerated": false, "ratio": 3.744208037825059, "config_tes...
from django import forms from tower import ugettext_lazy as _lazy import mkt from mkt.constants import (CATEGORY_CHOICES, TARAKO_CATEGORY_CHOICES, TARAKO_CATEGORIES_MAPPING) from mkt.constants.applications import DEVICE_LOOKUP SORT_CHOICES = [ (None, _lazy(u'Relevance')), ('popula...
{ "repo_name": "clouserw/zamboni", "path": "mkt/search/forms.py", "copies": "2", "size": "7007", "license": "bsd-3-clause", "hash": -4980338673140243000, "line_mean": 36.8756756757, "line_max": 79, "alpha_frac": 0.6035393178, "autogenerated": false, "ratio": 3.7470588235294118, "config_test": fa...
from django import forms from translator.models import TranslationFeedback from translator.utils import Translator class TranslationForm(forms.Form): command = forms.CharField(initial="command (e.g svn commit)...") vcs = forms.ChoiceField(choices=[("", "Target VCS")] + zip(Translator.vcs, Translator.vcs)) ...
{ "repo_name": "alex/vcs-translator", "path": "vcstranslator_project/apps/translator/forms.py", "copies": "1", "size": "1230", "license": "bsd-3-clause", "hash": -8505520080643540000, "line_mean": 30.5384615385, "line_max": 95, "alpha_frac": 0.6170731707, "autogenerated": false, "ratio": 4.2413793...
from django import forms from turbion.bits.blogs.models import Post from turbion.bits import watchlist class SubscriptionForm(forms.Form): action = forms.ChoiceField(choices=[('subs', 'subscribe'), ('unsubs', 'unsubscribe')], widget=forms.HiddenInput()) post = forms.ModelChoiceField(queryset=Post.published.al...
{ "repo_name": "strogo/turbion", "path": "turbion/bits/watchlist/forms.py", "copies": "1", "size": "1082", "license": "bsd-3-clause", "hash": 7638193782815351000, "line_mean": 33.9032258065, "line_max": 118, "alpha_frac": 0.646025878, "autogenerated": false, "ratio": 4.007407407407407, "config_t...
from django import forms from userena.forms import EditProfileForm, SignupForm from userena.utils import get_profile_model from core.models import ContentArea, Level class EditFormExtra(EditProfileForm): class Meta: model = get_profile_model() exclude = ['user'] fields = ['levels', 'cont...
{ "repo_name": "katemsu/kate_website", "path": "kate3/accounts/forms.py", "copies": "1", "size": "1629", "license": "mit", "hash": -3860947934957092400, "line_mean": 33.6808510638, "line_max": 89, "alpha_frac": 0.5751995089, "autogenerated": false, "ratio": 4.7354651162790695, "config_test": fal...
from django import forms from utilities.forms import BootstrapMixin OBJ_TYPE_CHOICES = ( ('', 'All Objects'), ('Circuits', ( ('provider', 'Providers'), ('circuit', 'Circuits'), )), ('DCIM', ( ('site', 'Sites'), ('rack', 'Racks'), ('rackgroup', 'Rack Groups'), ...
{ "repo_name": "digitalocean/netbox", "path": "netbox/netbox/forms.py", "copies": "2", "size": "1129", "license": "apache-2.0", "hash": 4453554053538897400, "line_mean": 23.0212765957, "line_max": 62, "alpha_frac": 0.4933569531, "autogenerated": false, "ratio": 3.7016393442622952, "config_test":...
from django import forms from utils.archives import get_file_name_list, get_missing_files # This form is used to upload student submissions. # The student uploads on the details page of the assignment is collected by this form and using this form we create new instance of upload objects. class UploadForm(forms.Form):...
{ "repo_name": "kartikshah1/Test", "path": "upload/forms.py", "copies": "1", "size": "2100", "license": "mit", "hash": -1375308911268778200, "line_mean": 50.2195121951, "line_max": 147, "alpha_frac": 0.6266666667, "autogenerated": false, "ratio": 4.375, "config_test": false, "has_no_keywords":...
from django import forms from utils.forms import ( BootstrapMixin, BulkEditForm, CustomNullBooleanSelect, DynamicModelMultipleChoiceField, ) from .models import PeerRecord class PeerRecordBulkEditForm(BootstrapMixin, BulkEditForm): pk = DynamicModelMultipleChoiceField( queryset=PeerRecor...
{ "repo_name": "respawner/peering-manager", "path": "peeringdb/forms.py", "copies": "1", "size": "1139", "license": "apache-2.0", "hash": 8057558304809229000, "line_mean": 31.5428571429, "line_max": 84, "alpha_frac": 0.7357330992, "autogenerated": false, "ratio": 3.9686411149825784, "config_test...
from django import forms from utils.widgets import MarkdownWidget from .models import Member, MemberText class MemberForm(forms.ModelForm): class Meta: model = Member exclude = ('member_since', 'mailchimp_id', 'removal_link', 'removal_date', 'alumni_link', 'alumni_date') def __init__(self, *...
{ "repo_name": "andersonjonathan/Navitas", "path": "navitas/members/forms.py", "copies": "1", "size": "1214", "license": "mit", "hash": 7441636198096909000, "line_mean": 38.1612903226, "line_max": 112, "alpha_frac": 0.6210873147, "autogenerated": false, "ratio": 3.602373887240356, "config_test":...
from django import forms from .validators import IBAN_COUNTRY_CODE_LENGTH, BICValidator, IBANValidator DEFAULT_DATE_INPUT_FORMATS = ( '%Y-%m-%d', '%d/%m/%Y', '%d/%m/%y', # '2006-10-25', '25/10/2006', '25/10/06' '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006' '%d %b %Y', '%d %b, %Y', ...
{ "repo_name": "agustin380/django-localflavor", "path": "localflavor/generic/forms.py", "copies": "4", "size": "5197", "license": "bsd-3-clause", "hash": -48105246407397460, "line_mean": 38.3712121212, "line_max": 118, "alpha_frac": 0.6118914759, "autogenerated": false, "ratio": 3.3834635416666665...
from django import forms from .validators import IBANValidator, BICValidator, IBAN_COUNTRY_CODE_LENGTH DEFAULT_DATE_INPUT_FORMATS = ( '%Y-%m-%d', '%d/%m/%Y', '%d/%m/%y', # '2006-10-25', '25/10/2006', '25/10/06' '%b %d %Y', '%b %d, %Y', # 'Oct 25 2006', 'Oct 25, 2006' '%d %b %Y', '%d %b, %Y',...
{ "repo_name": "zarelit/django-localflavor", "path": "localflavor/generic/forms.py", "copies": "2", "size": "5198", "license": "bsd-3-clause", "hash": 9126413829213202000, "line_mean": 38.0827067669, "line_max": 118, "alpha_frac": 0.6117737591, "autogenerated": false, "ratio": 3.3841145833333335, ...
from django import forms from values.models import Blueprint from local_values.models import Coordinates class BlueprintForm(forms.ModelForm): prefix = 'Blueprint' class Meta: model = Blueprint fields = '__all__' class CoordinatesForm(forms.ModelForm): prefix = 'Coordinates' class Me...
{ "repo_name": "Fakor/congov", "path": "web/engine_integration/forms.py", "copies": "1", "size": "1355", "license": "mit", "hash": -3882989315849982500, "line_mean": 27.2291666667, "line_max": 67, "alpha_frac": 0.6354243542, "autogenerated": false, "ratio": 3.7743732590529246, "config_test": fal...
from django import forms from vesper.django.app.clip_set_form import ClipSetForm from vesper.singleton.preset_manager import preset_manager import vesper.django.app.form_utils as form_utils _FORM_TITLE = 'Export clip metadata to CSV file' _TABLE_FORMAT_FIELD_LABEL = 'Table format' def _get_field_default(name, defa...
{ "repo_name": "HaroldMills/Vesper", "path": "vesper/django/app/export_clip_metadata_to_csv_file_form.py", "copies": "1", "size": "1173", "license": "mit", "hash": 186705661707601200, "line_mean": 31.5833333333, "line_max": 75, "alpha_frac": 0.6615515772, "autogenerated": false, "ratio": 3.6315789...
from django import forms from vesper.django.app.models import Station from vesper.singleton.preset_manager import preset_manager import vesper.django.app.form_utils as form_utils _FORM_TITLE = 'Detect' _SCHEDULE_FIELD_LABEL = 'Schedule' _DEFER_CLIP_CREATION_LABEL = 'Defer clip creation' def _get_field_defa...
{ "repo_name": "HaroldMills/Vesper", "path": "vesper/django/app/detect_form.py", "copies": "1", "size": "1783", "license": "mit", "hash": 2730734415184347000, "line_mean": 32.641509434, "line_max": 73, "alpha_frac": 0.6382501402, "autogenerated": false, "ratio": 3.7695560253699787, "config_test"...
from django import forms from vesper.widgets import InputWidget, RadioSelectWidget CHOICES = [ ('1', 'Value 1'), ('2', 'Value 2'), ('3', 'Value 3'), ] class FieldsForm(forms.Form): input = forms.CharField(required=True, widget=InputWidget) select = forms.ChoiceField(choices=CHOICES, required=True...
{ "repo_name": "Merino/poc-cbb", "path": "tests/example/views/forms.py", "copies": "1", "size": "2117", "license": "bsd-3-clause", "hash": 4235463224057600000, "line_mean": 38.2222222222, "line_max": 132, "alpha_frac": 0.7047709022, "autogenerated": false, "ratio": 3.7010489510489513, "config_te...
from django import forms from .views import RestrictedListView, RestrictedCreateView, \ RestrictedUpdateView, RestrictedDetailView from ..models.authentication_model import Authentication from ..models.domains.domain_model import Domain from ..utils import domain_form_manipulate from ..validate import validate_dom...
{ "repo_name": "os2webscanner/os2webscanner", "path": "django-os2webscanner/os2webscanner/views/domain_views.py", "copies": "1", "size": "4926", "license": "mpl-2.0", "hash": -1155889139805796900, "line_mean": 32.0604026846, "line_max": 78, "alpha_frac": 0.6165245635, "autogenerated": false, "rati...
from django import forms 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 value = self.cleaned_data['foo'] if val...
{ "repo_name": "nimasmi/wagtail", "path": "wagtail/tests/testapp/forms.py", "copies": "10", "size": "1084", "license": "bsd-3-clause", "hash": -6577832143911643000, "line_mean": 28.2972972973, "line_max": 76, "alpha_frac": 0.6780442804, "autogenerated": false, "ratio": 4.267716535433071, "config...
from django import forms from wagtail.admin.staticfiles import versioned_static class FilteredSelect(forms.Select): """ A select box where the options are shown and hidden dynamically in response to another form field whose HTML `id` is specified in `filter_field`. The `choices` list accepts entries...
{ "repo_name": "FlipperPA/wagtail", "path": "wagtail/admin/widgets/filtered_select.py", "copies": "7", "size": "4017", "license": "bsd-3-clause", "hash": 3012538689579007000, "line_mean": 38.3823529412, "line_max": 111, "alpha_frac": 0.5782922579, "autogenerated": false, "ratio": 4.554421768707483...
from django import forms from wagtailstreamforms.models import Form from wagtailstreamforms import wagtailstreamforms_fields as wsf_fields from ..test_case import AppTestCase class TestFields(AppTestCase): fixtures = ['test'] def setUp(self): self.form = Form.objects.get(pk=1) def get_form_fiel...
{ "repo_name": "AccentDesign/wagtailstreamforms", "path": "tests/fields/test_fields.py", "copies": "1", "size": "8431", "license": "mit", "hash": -2866238226603341300, "line_mean": 42.0153061224, "line_max": 97, "alpha_frac": 0.6674178626, "autogenerated": false, "ratio": 3.9637987776210624, "co...
from django import forms from wagtail.wagtailcore.blocks import (TextBlock, StructBlock, StreamBlock, FieldBlock, CharBlock, RichTextBlock, RawHTMLBlock, ListBlock) from wagtail.wagtailimages.blocks import ImageChooserBlock from wagtail.w...
{ "repo_name": "spmuck/spmuck.com", "path": "spmuck/blog/models/blogstreamblock.py", "copies": "1", "size": "1875", "license": "apache-2.0", "hash": 2841873582583776000, "line_mean": 33.7222222222, "line_max": 102, "alpha_frac": 0.6144, "autogenerated": false, "ratio": 4.422169811320755, "config...
from django import forms from waliki.settings import get_slug from projects.models import Project class NewProjectForm(forms.ModelForm): def __init__(self, *args, **kwargs): self.user = kwargs.pop('user', None) super(NewProjectForm, self).__init__(*args, **kwargs) class Meta: model ...
{ "repo_name": "gvrossom/ants", "path": "src/projects/forms.py", "copies": "1", "size": "1129", "license": "mit", "hash": -8593523035553388000, "line_mean": 34.3125, "line_max": 105, "alpha_frac": 0.6297608503, "autogenerated": false, "ratio": 3.9475524475524475, "config_test": false, "has_no_...
from django import forms from widgets import ChosenSelect, ChosenSelectMultiple, ChosenGroupSelect __all__ = [ 'ChosenFieldMixin', 'ChosenChoiceField', 'ChosenMultipleChoiceField', 'ChosenModelChoiceField', 'ChosenModelMultipleChoiceField', 'ChosenGroupChoiceField', ] class ChosenFieldMixin(object): ...
{ "repo_name": "rkempter/django-chosen", "path": "chosen/fields.py", "copies": "3", "size": "2022", "license": "bsd-2-clause", "hash": 7907654282828895000, "line_mean": 29.1791044776, "line_max": 78, "alpha_frac": 0.6493570722, "autogenerated": false, "ratio": 4.405228758169935, "config_test": f...
from django import forms from .widgets import (TextInput, HiddenInput, CheckboxInput, Select, ClearableFileInput, SelectMultiple, DateInput, DateTimeInput, TimeInput, URLInput, NumberInput, EmailInput, NullBooleanSelect, SlugInput, IPAddressInput, ...
{ "repo_name": "agconti/njode", "path": "env/lib/python2.7/site-packages/floppyforms/fields.py", "copies": "1", "size": "4638", "license": "bsd-3-clause", "hash": 3003601364101596000, "line_mean": 26.9397590361, "line_max": 95, "alpha_frac": 0.6752910737, "autogenerated": false, "ratio": 4.3024118...
from django import forms from wmsmanager.models import WmsLayer from layergroup.models import LayerGroup,LayerGroupLayers from tablemanager.models import Publish,Workspace from borg_utils.form_fields import GeoserverSettingForm,MetaTilingFactorField,GridSetField from borg_utils.form_fields import GroupedModelChoiceFie...
{ "repo_name": "rockychen-dpaw/borgcollector", "path": "layergroup/forms.py", "copies": "2", "size": "3304", "license": "bsd-3-clause", "hash": 6887644365371706000, "line_mean": 52.2903225806, "line_max": 249, "alpha_frac": 0.7245762712, "autogenerated": false, "ratio": 3.914691943127962, "confi...
from django import forms from workshops.forms import TaskForm, SponsorshipForm, BootstrapHelper from workshops.models import Person, Task, Sponsorship class PersonMinimalForm(forms.ModelForm): class Meta: model = Person fields = ('username', 'personal', 'family', 'email', 'url') class BaseMode...
{ "repo_name": "vahtras/amy", "path": "pydata/forms.py", "copies": "1", "size": "1695", "license": "mit", "hash": -7776975942538252000, "line_mean": 27.25, "line_max": 73, "alpha_frac": 0.6731563422, "autogenerated": false, "ratio": 3.941860465116279, "config_test": false, "has_no_keywords": f...
from django import forms from xpos.forms import RequestModelForm from jazzpos.models import Customer, Patient, Treatment, StoreSettings DATE_FORMAT = ( "%d-%m-%Y", ) class CustomerForm(RequestModelForm): refferer = forms.IntegerField(required=False) def __init__(self, *args, **kwargs): super(Cu...
{ "repo_name": "k4ml/jazzpos", "path": "jazzpos/forms.py", "copies": "1", "size": "2130", "license": "mit", "hash": 925887880156585100, "line_mean": 32.28125, "line_max": 81, "alpha_frac": 0.5723004695, "autogenerated": false, "ratio": 3.597972972972973, "config_test": false, "has_no_keywords"...
from django import forms from yarr import settings, models class AddFeedForm(forms.ModelForm): required_css_class = 'required' class Meta: model = models.Feed fields = ['feed_url'] widgets = { 'feed_url': forms.TextInput(), } def _build_frequency_choices(): ...
{ "repo_name": "twm/django-yarr", "path": "yarr/forms.py", "copies": "2", "size": "2232", "license": "bsd-3-clause", "hash": 1716883565455526700, "line_mean": 27.987012987, "line_max": 79, "alpha_frac": 0.5143369176, "autogenerated": false, "ratio": 4.0508166969147, "config_test": false, "has_...
from django import forms from yawf.creation import CreationAwareWorkflow from yawf.messages.common import BasicStartMessage, MessageSpec from yawf.handlers import EditHandler, LoopHandler, StartWorkflowHandlerBase from yawf_sample.simple.models import Window, WINDOW_OPEN_STATUS class MessageGroupsTestWorkflow(Creati...
{ "repo_name": "freevoid/yawf", "path": "yawf_sample/simple/workflows/message_groups.py", "copies": "1", "size": "1768", "license": "mit", "hash": -7381737756002360000, "line_mean": 20.3012048193, "line_max": 76, "alpha_frac": 0.7053167421, "autogenerated": false, "ratio": 3.937639198218263, "co...
from django import forms from yawf.creation import CreationAwareWorkflow from yawf.messages.common import message_spec_fabric, BasicStartMessage, MessageSpec from yawf.messages.submessage import Submessage, RecursiveSubmessage from yawf.effects import SideEffect from yawf.handlers import SimpleStateTransition, Handle...
{ "repo_name": "freevoid/yawf", "path": "yawf_sample/simple/workflows/simple.py", "copies": "1", "size": "2982", "license": "mit", "hash": 7655623913786503000, "line_mean": 25.389380531, "line_max": 84, "alpha_frac": 0.7250167673, "autogenerated": false, "ratio": 3.6678966789667897, "config_test...
from django import forms # global fields hidden_filename_field = forms.CharField(widget=forms.HiddenInput(), required=False) hidden_model = forms.CharField(widget=forms.HiddenInput(), required=False) #hidden_csv_content_field = forms.CharField(widget=forms.HiddenInput(),required = False) hidden_csv_raw_field = forms.C...
{ "repo_name": "LinDA-tools/transformation", "path": "forms.py", "copies": "1", "size": "3939", "license": "mit", "hash": -8655126814067658000, "line_mean": 41.3548387097, "line_max": 166, "alpha_frac": 0.7095709571, "autogenerated": false, "ratio": 3.5390835579514826, "config_test": false, "h...
from django import forms #i18n from django.utils.translation import ugettext as _, ugettext_lazy as _lazy class SearchEntriesForm(forms.Form): ALL = '0' ANONYMOUS = '1' AUTHENTICATED = '2' NOT_STAFF = '3' STAFF = '4' USER_CHOICES = ( (ALL,_('All')), (ANONYMOUS,_('Anonymous')),...
{ "repo_name": "devalfrz/django-activity-logger", "path": "activity_logger/forms.py", "copies": "1", "size": "1320", "license": "bsd-2-clause", "hash": 2222803238361410800, "line_mean": 29.6976744186, "line_max": 115, "alpha_frac": 0.5765151515, "autogenerated": false, "ratio": 3.3165829145728645,...
from django import forms # import autocomplete_light from .models import Organisation, User class OrganisationForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(OrganisationForm, self).__init__(*args, **kwargs) class Meta: model = Organisation exclude = ('user', 'cre...
{ "repo_name": "shankisg/wye", "path": "wye/organisations/forms.py", "copies": "3", "size": "1988", "license": "mit", "hash": 3581996525120626700, "line_mean": 32.6949152542, "line_max": 87, "alpha_frac": 0.6167002012, "autogenerated": false, "ratio": 4.090534979423868, "config_test": false, "...
from django import forms import bleach def get_sanitized_clean_func(original_clean, **kwargs): def fn(value): value = original_clean(value) if isinstance(value, basestring): value = bleach.clean(value, **kwargs) return value return fn class sanitize(object): de...
{ "repo_name": "ui/django-html_sanitizer", "path": "sanitizer/decorators.py", "copies": "2", "size": "1183", "license": "mit", "hash": 876319941416962400, "line_mean": 28.575, "line_max": 115, "alpha_frac": 0.5807269653, "autogenerated": false, "ratio": 4.136363636363637, "config_test": false, ...
from django import forms import commonware.log import happyforms from tower import ugettext as _ log = commonware.log.getLogger('z.mkt.site.forms') APP_PUBLIC_CHOICES = ( (0, _('As soon as it is approved.')), (1, _('Not until I manually make it public.')), ) class AddonChoiceField(forms.ModelChoiceField): ...
{ "repo_name": "spasovski/zamboni", "path": "mkt/site/forms.py", "copies": "5", "size": "1698", "license": "bsd-3-clause", "hash": 7430903784561184000, "line_mean": 29.3214285714, "line_max": 74, "alpha_frac": 0.6325088339, "autogenerated": false, "ratio": 3.683297180043384, "config_test": false...
from django import forms import datetime import re from django.contrib.auth.models import User from django.forms.models import model_to_dict from django.template import loader, Context from django.utils.html import strip_tags from cmubbs.models import * def clean_font_tag(text): font_tag = 'b|/b|i|/i|big|/big|sm...
{ "repo_name": "zhubw91/biyemaijianbing", "path": "src/cmubbs/forms.py", "copies": "1", "size": "16122", "license": "apache-2.0", "hash": -6601634531962936000, "line_mean": 46.1403508772, "line_max": 202, "alpha_frac": 0.6441508498, "autogenerated": false, "ratio": 3.978775913129319, "config_tes...
from django import forms import django_filters as filters from tasks.models import Task from projects.models import Project from django.contrib.auth.models import User from milestones.models import Milestone from django.contrib.contenttypes.models import ContentType from django.utils.safestring import SafeString cla...
{ "repo_name": "hbussell/pinax-tracker", "path": "apps/tasks/filters.py", "copies": "1", "size": "4235", "license": "mit", "hash": -6550541563713177000, "line_mean": 33.7131147541, "line_max": 84, "alpha_frac": 0.5837072019, "autogenerated": false, "ratio": 4.411458333333333, "config_test": fals...
from django import forms import happyforms from tower import ugettext as _ from tower import ugettext_lazy as _lazy from mozillians.groups.models import Group class SortForm(forms.Form): """Group Index Sort Form.""" sort = forms.ChoiceField(required=False, choices=(('name', _laz...
{ "repo_name": "chirilo/mozillians", "path": "mozillians/groups/forms.py", "copies": "2", "size": "2474", "license": "bsd-3-clause", "hash": 5253703656480684000, "line_mean": 32.4324324324, "line_max": 100, "alpha_frac": 0.512934519, "autogenerated": false, "ratio": 4.498181818181818, "config_te...
from django import forms import happyforms from addons.models import Addon from api.handlers import _form_error OS = ['WINNT', 'Darwin', 'Linux'] PLATFORMS = ['x86', 'x86_64'] PRODUCTS = ['firefox'] TESTS = ['ts'] choices = lambda x: [(c, c) for c in x] class PerformanceForm(happyforms.Form): addon_id = form...
{ "repo_name": "wagnerand/zamboni", "path": "apps/api/forms.py", "copies": "7", "size": "1676", "license": "bsd-3-clause", "hash": 5492561688464887000, "line_mean": 30.6226415094, "line_max": 77, "alpha_frac": 0.6044152745, "autogenerated": false, "ratio": 3.8440366972477062, "config_test": fals...
from django import forms import itertools from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ from .models import Episode, Program class ProgramForm(forms.ModelForm): class Meta: model = Program fields = ( 'title', 'description',...
{ "repo_name": "mjroson/tvlibre", "path": "apps/program/forms.py", "copies": "1", "size": "2222", "license": "mit", "hash": -4904645525374607000, "line_mean": 26.1097560976, "line_max": 97, "alpha_frac": 0.4932493249, "autogenerated": false, "ratio": 4.562628336755647, "config_test": false, "h...
from django import forms import jinja2 from tower import ugettext as _, ugettext_lazy as _l from users.models import Profile, Link from users.widgets import ImageFileInput class ProfileForm(forms.ModelForm): avatar = forms.ImageField( widget=ImageFileInput(), required=False) name = forms.CharField(...
{ "repo_name": "mozilla/betafarm", "path": "apps/users/forms.py", "copies": "1", "size": "1209", "license": "bsd-3-clause", "hash": 9208423103356830000, "line_mean": 28.487804878, "line_max": 79, "alpha_frac": 0.6426799007, "autogenerated": false, "ratio": 4.016611295681063, "config_test": false...
from django import forms import mock from nose.tools import eq_ import amo.tests from mkt.files.utils import WebAppParser class TestWebAppParser(amo.tests.TestCase): @mock.patch('mkt.files.utils.WebAppParser.get_json_data') def test_no_developer_name(self, get_json_data): get_json_data.return_value...
{ "repo_name": "andymckay/zamboni", "path": "mkt/files/tests/test_utils_.py", "copies": "2", "size": "4164", "license": "bsd-3-clause", "hash": 2859851585110969300, "line_mean": 39.427184466, "line_max": 79, "alpha_frac": 0.5297790586, "autogenerated": false, "ratio": 3.9885057471264367, "config...
from django import forms import os import csv import json from . import data_analysis from . import mapping def get_variables_choices(): ''' Read list of possible indicators from data file ''' path = (os.path.dirname(os.path.abspath(__file__))) file_path = path +'/static/maps/Data/city_health_stats.csv' with...
{ "repo_name": "EmilyWebber/Healthy-Neighborhoods", "path": "Healthy-Neighborhoods/maps/forms.py", "copies": "1", "size": "1699", "license": "mit", "hash": -3311609312296051000, "line_mean": 25.9841269841, "line_max": 82, "alpha_frac": 0.729841083, "autogenerated": false, "ratio": 3.37773359840954...
from django import forms import phonenumbers class PhoneNumberField(forms.CharField): """ A USA or international phone number field. Normalizes its value to a common US format '(303) 555-5555' for US phone numbers, and an international format for others -- '+86 10 6944 5464'. Also supports extensi...
{ "repo_name": "j00bar/django-widgy", "path": "widgy/contrib/form_builder/forms.py", "copies": "2", "size": "1653", "license": "apache-2.0", "hash": 7238499615756688000, "line_mean": 39.3170731707, "line_max": 99, "alpha_frac": 0.6648517846, "autogenerated": false, "ratio": 4.111940298507463, "c...
from django import forms import re from ajabsacco.core.models import NextOfKin, Member, MemberProfile class PersonalMemberForm(forms.Form): first_name = forms.CharField(max_length=30) middle_name = forms.CharField(max_length=30) surname = forms.CharField(max_length=30) member_no = forms.CharField() ...
{ "repo_name": "AjabWorld/ajabsacco", "path": "ajabsacco/core/forms/members.py", "copies": "1", "size": "4330", "license": "apache-2.0", "hash": -6439419603216262000, "line_mean": 34.2032520325, "line_max": 92, "alpha_frac": 0.6692840647, "autogenerated": false, "ratio": 3.9724770642201834, "con...
from django import forms import sys from os.path import pardir, join, abspath, dirname bulbLabels = [] fullpathToLIFXPython = join(join(pardir,dirname(dirname(dirname(abspath(__file__))))),'lifx-python/') if not fullpathToLIFXPython in sys.path: sys.path.append(fullpathToLIFXPython) import lifx import imp imp.l...
{ "repo_name": "jheld/lifx-django", "path": "lifx_management/forms.py", "copies": "1", "size": "1051", "license": "bsd-2-clause", "hash": -7719769322957047000, "line_mean": 32.9032258065, "line_max": 101, "alpha_frac": 0.6945765937, "autogenerated": false, "ratio": 3.5033333333333334, "config_te...
from django import forms import vesper.django.app.form_utils as form_utils import vesper.django.app.model_utils as model_utils _FORM_NAME = 'export_clip_counts_csv_file' def _get_field_default(name, default): return form_utils.get_field_default(_FORM_NAME, name, default) class ExportClipCountsCsvFile...
{ "repo_name": "HaroldMills/Vesper", "path": "vesper/old_bird/export_clip_counts_csv_file_form.py", "copies": "1", "size": "1275", "license": "mit", "hash": 6918683766641812000, "line_mean": 27.9772727273, "line_max": 66, "alpha_frac": 0.6298039216, "autogenerated": false, "ratio": 3.8636363636363...
from django import forms import vesper.django.app.model_utils as model_utils import vesper.django.app.form_utils as form_utils class ClassifyForm(forms.Form): classifier = forms.ChoiceField(label='Classifier') station_mics = forms.MultipleChoiceField(label='Station/mics') start_date = forms.DateFie...
{ "repo_name": "HaroldMills/Vesper", "path": "vesper/django/app/classify_form.py", "copies": "1", "size": "1213", "license": "mit", "hash": -4940051835497847000, "line_mean": 32.6944444444, "line_max": 66, "alpha_frac": 0.6356141797, "autogenerated": false, "ratio": 4.043333333333333, "config_te...
from django import forms class AssociateForm(forms.Form): full_name = forms.CharField(max_length=255, widget=forms.TextInput(attrs={'class': 'form-control'}), label='Full Name', required=True) mobile_number = forms...
{ "repo_name": "tumcu/associates", "path": "main/forms.py", "copies": "1", "size": "1870", "license": "mit", "hash": -2408074451634777000, "line_mean": 57.4375, "line_max": 111, "alpha_frac": 0.4438502674, "autogenerated": false, "ratio": 5.807453416149069, "config_test": false, "has_no_keywor...
from django import forms class AuthorizeNetDPMForm(forms.Form): x_card_num = forms.CharField(max_length=16, label="Credit Card #") x_exp_date = forms.CharField(max_length=5, label="Exp Date (mm/yy)") x_card_code = forms.CharField(max_length=4, label="CVV") x_first_name = forms.CharField(max_length=50...
{ "repo_name": "spookylukey/merchant", "path": "billing/forms/authorize_net_forms.py", "copies": "7", "size": "1214", "license": "bsd-3-clause", "hash": 102486458026065660, "line_mean": 45.6923076923, "line_max": 86, "alpha_frac": 0.7067545305, "autogenerated": false, "ratio": 3.3351648351648353, ...
from django import forms class BaseNotificationForm(forms.Form): def __init__(self, *args, **kwargs): kwargs.setdefault('label_suffix', '') super(BaseNotificationForm, self).__init__(*args, **kwargs) class WebHookForm(BaseNotificationForm): def __init__(self, *args, **kwargs): sel...
{ "repo_name": "martinrusev/amonone", "path": "amon/apps/notifications/forms.py", "copies": "2", "size": "6062", "license": "mit", "hash": 4784054224642062000, "line_mean": 32.4917127072, "line_max": 141, "alpha_frac": 0.6210821511, "autogenerated": false, "ratio": 3.751237623762376, "config_tes...
from django import forms class BecaForm(forms.Form): """ This form is used to assign a scholarship to a set of students. It just has an option for the tabulador used, and a list of possible percentages of scholarship. """ OPCIONES_TABULADOR = [ (x, 'Asignar {}%'.format(x)) for x in ma...
{ "repo_name": "erikiado/jp2_online", "path": "becas/forms.py", "copies": "1", "size": "1716", "license": "mit", "hash": -3402946595145768400, "line_mean": 34.6875, "line_max": 91, "alpha_frac": 0.6182136602, "autogenerated": false, "ratio": 3.3853754940711465, "config_test": false, "has_no_ke...
from django import forms class CashinPushPaymentsFormPost(forms.Form): recipient_pan = forms.CharField(label='Recipient card PAN', max_length=16, required=True, initial="4123640062698797") amount = forms.FloatField(label='Amount', required=True, initial=124.05) sender_name = forms.CharField(label='Sender ...
{ "repo_name": "ppokrovsky/pyvdp", "path": "demo/demo/forms/visadirect/mvisa.py", "copies": "1", "size": "1971", "license": "mit", "hash": -3674547952752482300, "line_mean": 55.3142857143, "line_max": 142, "alpha_frac": 0.7640791476, "autogenerated": false, "ratio": 3.525939177101968, "config_te...
from django import forms class ChangePasswordForm(forms.Form): oldPassword = forms.CharField(label='Old password', widget=forms.PasswordInput(render_value=False)) newPassword = forms.CharField(label='New password', widget=forms.PasswordInput(...
{ "repo_name": "danrg/RGT-tool", "path": "src/RGT/authentication/forms/ChangePasswordForm.py", "copies": "1", "size": "1659", "license": "mit", "hash": -8710681143333987000, "line_mean": 42.6578947368, "line_max": 98, "alpha_frac": 0.5660036166, "autogenerated": false, "ratio": 4.713068181818182, ...
from django import forms class CirculationForm(forms.Form): username = forms.SlugField(label='Username:', max_length=32, min_length=4, widget=forms.TextInput(attrs={ 'class': 'form-control', 'placeholder': 'Username', 'required': 'required', })) book_id = forms.IntegerField(label='Book ID:', widget=fo...
{ "repo_name": "tony-joseph/livre", "path": "circulations/forms.py", "copies": "1", "size": "1235", "license": "bsd-3-clause", "hash": 6755899651461947000, "line_mean": 48.4, "line_max": 109, "alpha_frac": 0.6704453441, "autogenerated": false, "ratio": 3.664688427299703, "config_test": false, ...
from django import forms class CommonInfoForm(forms.ModelForm): def __init__(self, *args, **kwargs): user = kwargs.pop('user', None) super(CommonInfoForm, self).__init__(*args, **kwargs) # User is required for bound forms if self.is_bound and not use...
{ "repo_name": "oogles/django-goodies", "path": "djem/forms/bases.py", "copies": "2", "size": "1058", "license": "bsd-3-clause", "hash": 1173975838051884500, "line_mean": 33.1290322581, "line_max": 109, "alpha_frac": 0.584120983, "autogenerated": false, "ratio": 4.483050847457627, "config_test":...
from django import forms class ConnectForm(forms.Form): username = forms.CharField(label="Username") password = forms.CharField(label="Password", widget=forms.PasswordInput) class SignUpForm(forms.Form): username = forms.CharField(label="Username") password = forms.CharField(label="Password") pa...
{ "repo_name": "AIR-EISTI/Market_Manager_V2", "path": "Snack/forms.py", "copies": "1", "size": "1520", "license": "bsd-2-clause", "hash": -6955793056160702000, "line_mean": 30.6666666667, "line_max": 76, "alpha_frac": 0.6539473684, "autogenerated": false, "ratio": 3.867684478371501, "config_test...
from django import forms class ConsumerForm(forms.Form): client_id = forms.CharField() authorization_url = forms.URLField() class ConsumerExchangeForm(forms.Form): code = forms.CharField(widget=forms.TextInput(attrs={'readonly': 'readonly'})) state = forms.CharField(widget=forms.TextInput(attrs={'re...
{ "repo_name": "evonove/django-oauth-toolkit-example", "path": "example/forms.py", "copies": "6", "size": "1137", "license": "bsd-2-clause", "hash": -6013596685862902000, "line_mean": 42.7307692308, "line_max": 91, "alpha_frac": 0.7194371152, "autogenerated": false, "ratio": 4.017667844522968, "...
from django import forms class ContactForm(forms.Form): name = forms.CharField(required=False, max_length=50) email = forms.EmailField(required=False) subject = forms.CharField() message = forms.CharField(widget=forms.Textarea) journalist = forms.BooleanField(required=False) confidential = for...
{ "repo_name": "Strassengezwitscher/Strassengezwitscher", "path": "crowdgezwitscher/contact/forms.py", "copies": "1", "size": "1770", "license": "mit", "hash": 7080175884228152000, "line_mean": 56.0967741935, "line_max": 120, "alpha_frac": 0.6768361582, "autogenerated": false, "ratio": 4.561855670...
from django import forms class ContactForm(forms.Form): name = forms.CharField(required=False) surname = forms.CharField(required=False) email_address = forms.CharField(required=False) msisdn = forms.CharField(label='Contact number', required=False) twitter_handle = forms.CharField(required=False...
{ "repo_name": "praekelt/vumi-go", "path": "go/contacts/forms.py", "copies": "1", "size": "2196", "license": "bsd-3-clause", "hash": 1454809845733260000, "line_mean": 35, "line_max": 78, "alpha_frac": 0.6511839709, "autogenerated": false, "ratio": 3.9710669077757683, "config_test": false, "has...
from django import forms class CyderModelForm(forms.ModelForm): def _get_validation_exclusions(self): exclude = \ super(CyderModelForm, self)._get_validation_exclusions() if hasattr(self.Meta, 'always_validate'): exclude = filter(lambda x: x not in self.Meta.always_validate...
{ "repo_name": "zeeman/cyder", "path": "cyder/base/forms.py", "copies": "5", "size": "1802", "license": "bsd-3-clause", "hash": 25924219196718310, "line_mean": 33, "line_max": 77, "alpha_frac": 0.6326304107, "autogenerated": false, "ratio": 4.022321428571429, "config_test": false, "has_no_keyw...
from django import forms class DataProviderForm(forms.Form): choices = ( (None, ""), ("trip", "ANEK - Trips"), ("history", "ANEK - History"), ("copernicus-wave-forecast", "Copernicus - Wave Forecast"), ("copernicus-baltic-ice-concentration", "Copernicus - Baltic Sea Ice Con...
{ "repo_name": "dipapaspyros/bdo_platform", "path": "data_parser/forms.py", "copies": "2", "size": "1063", "license": "mit", "hash": -883854708563288300, "line_mean": 38.3703703704, "line_max": 115, "alpha_frac": 0.5964252117, "autogenerated": false, "ratio": 3.2607361963190185, "config_test": f...
from django import forms class DraftRegistrationForm(forms.Form): proof_of_publication = forms.ChoiceField( label='Proof of publication', choices=( ('not_submitted', 'Published Article Not Yet Submitted'), ('submitted', 'Published Article Submitted'), ('under_r...
{ "repo_name": "caseyrollins/osf.io", "path": "admin/pre_reg/forms.py", "copies": "37", "size": "1405", "license": "apache-2.0", "hash": -5272415542597320000, "line_mean": 27.1, "line_max": 69, "alpha_frac": 0.5494661922, "autogenerated": false, "ratio": 4.4603174603174605, "config_test": false,...
from django import forms class DraftRegistrationForm(forms.Form): proof_of_publication = forms.ChoiceField( label="Proof of publication", choices=( ("not_submitted", "Published Article Not Yet Submitted"), ("submitted", "Published Article Submitted"), ("under_r...
{ "repo_name": "zachjanicki/osf.io", "path": "admin/pre_reg/forms.py", "copies": "6", "size": "1405", "license": "apache-2.0", "hash": 7051201139833528000, "line_mean": 27.1, "line_max": 69, "alpha_frac": 0.5494661922, "autogenerated": false, "ratio": 4.4603174603174605, "config_test": false, ...
from django import forms class DrugTrialForm(forms.ModelForm): """Form for Drug Trials""" class Meta(object): widgets = { 'description': forms.Textarea(attrs={'cols': 70, 'rows': 10}), 'condition': forms.Textarea(attrs={'cols': 70, 'rows': 10}), } class TestRe...
{ "repo_name": "UPDDI/mps-database-server", "path": "drugtrials/forms.py", "copies": "1", "size": "1397", "license": "mit", "hash": 1356997116646359000, "line_mean": 30.75, "line_max": 88, "alpha_frac": 0.5561918397, "autogenerated": false, "ratio": 3.8698060941828256, "config_test": false, "h...
from django import forms class EditVoteForm(forms.Form): name = forms.CharField(max_length=64) machine_name = forms.SlugField(max_length=64) description = forms.CharField() class EditVoteFilterForm(forms.Form): filter_id = forms.IntegerField() class AdminSelectForm(forms.Form): username = form...
{ "repo_name": "kuboschek/jay", "path": "votes/forms.py", "copies": "2", "size": "1197", "license": "mit", "hash": -5514183744128004000, "line_mean": 25.6, "line_max": 62, "alpha_frac": 0.738512949, "autogenerated": false, "ratio": 3.717391304347826, "config_test": false, "has_no_keywords": fa...
from django import forms class EmailArticleForm(forms.Form): sender = forms.CharField(max_length=20, widget=forms.TextInput(attrs={'class': 'form-control', 'placeholder': 'Twoje Imię'})) email_sender = forms.EmailField(widget=forms.EmailInput(attrs={'class': 'form-control', ...
{ "repo_name": "MichalCelinski/Blog", "path": "blog/forms.py", "copies": "1", "size": "1601", "license": "mit", "hash": -1557714047087957200, "line_mean": 65.2916666667, "line_max": 120, "alpha_frac": 0.4990571967, "autogenerated": false, "ratio": 4.625, "config_test": false, "has_no_keywords"...
from django import forms class EmailForm(forms.Form): USER_TYPE_CHOICES = [ ('', 'Which of these best describes you?'), ('awt_potential_proposers', 'Potential Proposer'), ('awt_companies', 'Company'), ('awt_interested_observers', 'Interested Observer'), ] firstname = forms...
{ "repo_name": "us-ignite/us_ignite", "path": "us_ignite/advanced_wireless_testbed/forms.py", "copies": "1", "size": "2894", "license": "bsd-3-clause", "hash": 8378450248505996000, "line_mean": 66.3023255814, "line_max": 145, "alpha_frac": 0.700414651, "autogenerated": false, "ratio": 3.7731421121...
from django import forms class EmailResetForm(forms.Form): emails = forms.ChoiceField(label='Email') def __init__(self, *args, **kwargs): choices = kwargs.get('initial', {}).get('emails', []) self.base_fields['emails'] = forms.ChoiceField(choices=choices) super(EmailResetForm, self)._...
{ "repo_name": "adlius/osf.io", "path": "admin/users/forms.py", "copies": "11", "size": "1059", "license": "apache-2.0", "hash": 4964437015467777000, "line_mean": 36.8214285714, "line_max": 154, "alpha_frac": 0.6893295562, "autogenerated": false, "ratio": 3.4271844660194173, "config_test": false...
from django import forms class EverythingBagelForm(forms.Form): BAGEL_CHOICES = ( (1, "12 Grain"), (2, "Asiago Parmesan"), (3, "Blueberry"), (4, "Cinnamon Raisin"), (5, "Cinnamon Sugar"), (6, "Egg"), (7, "Pumpkin – Fall Special!")) text = forms.CharField(label='Username') pas...
{ "repo_name": "caktus/django-styleguide", "path": "styleguide/forms.py", "copies": "1", "size": "1912", "license": "bsd-3-clause", "hash": -8011624064288963000, "line_mean": 33.7272727273, "line_max": 115, "alpha_frac": 0.6314136126, "autogenerated": false, "ratio": 3.5834896810506565, "config_...
from django import forms class ExampleForm(forms.Form): ''' A dummy form to represent every possible kind of form widget to be used in this project. ''' _choices = [(1, 'One'), (2, 'Two'), (3, 'Three')] email = forms.EmailField( widget=forms.EmailInput()) text = forms.CharField( ...
{ "repo_name": "brasilcomvc/brasilcomvc", "path": "brasilcomvc/guideline/forms.py", "copies": "1", "size": "1789", "license": "apache-2.0", "hash": -7093814999267422000, "line_mean": 37.0638297872, "line_max": 75, "alpha_frac": 0.6433761878, "autogenerated": false, "ratio": 4.17016317016317, "co...
from django import forms class FeedbackFormClosest(forms.Form): latitude = forms.FloatField(widget=forms.HiddenInput(attrs={'class': 'form-control', 'placeholder': "Latitude"})) longitude = forms.FloatField(widget=forms.HiddenInput(attrs={'class': 'form-control', 'placeholder': "Longitude"})) service_obje...
{ "repo_name": "hep7agon/city-feedback-hub", "path": "frontend/forms.py", "copies": "1", "size": "1909", "license": "mit", "hash": -4575805039277077500, "line_mean": 56.7878787879, "line_max": 119, "alpha_frac": 0.6455165181, "autogenerated": false, "ratio": 3.837022132796781, "config_test": fal...
from django import forms class FilePickerWidget(forms.Textarea): """ Base file picker widget that can be extended """ def __init__(self, pickers, *args, **kwargs): self.pickers = pickers classes = kwargs.pop('classes', ['filepicker']) super(FilePickerWidget, self).__init__(*args, **kw...
{ "repo_name": "caktus/django-file-picker", "path": "file_picker/widgets.py", "copies": "2", "size": "1065", "license": "bsd-3-clause", "hash": -6130162364454312000, "line_mean": 35.724137931, "line_max": 78, "alpha_frac": 0.6046948357, "autogenerated": false, "ratio": 3.6597938144329896, "confi...
from django import forms class FineUploaderUploadForm(forms.Form): """This form represents a basic request from Fine Uploader. The required fields will **always** be sent, the other fields are optional based on your setup. Extend this if you want to add custom parameters in the body of the POST r...
{ "repo_name": "douglasmiranda/django-fine-uploader", "path": "django_fine_uploader/forms.py", "copies": "1", "size": "1270", "license": "mit", "hash": 3123399185649613300, "line_mean": 36.3529411765, "line_max": 89, "alpha_frac": 0.742519685, "autogenerated": false, "ratio": 4.018987341772152, ...
from django import forms class FormativeTypeForm(forms.ModelForm): """ Select a type """ class Meta: fields = ['formative_type'] def save(self, commit=False): # Don't commit to the database, or we'll create invalid instances! return super(FormativeTypeForm, self).save(comm...
{ "repo_name": "jaap3/django-formative", "path": "formative/forms.py", "copies": "1", "size": "1294", "license": "mit", "hash": -6302320270976579000, "line_mean": 30.5609756098, "line_max": 74, "alpha_frac": 0.6051004637, "autogenerated": false, "ratio": 4.1079365079365076, "config_test": false,...
from django import forms class FormSetWidget(forms.Widget): def render(self, name, value, attrs=None): if value is None: value = self.attrs['formset_cls'](prefix=name) return '<table>{}</table>'.format(value) def get_formset(self, name): return self.attrs['formset_cls'](pr...
{ "repo_name": "koopauy/django-material", "path": "material/fields.py", "copies": "14", "size": "1077", "license": "bsd-3-clause", "hash": -1773895131721135600, "line_mean": 28.9166666667, "line_max": 82, "alpha_frac": 0.635097493, "autogenerated": false, "ratio": 3.860215053763441, "config_test...
from django import forms class GuestbookForm(forms.Form): name = forms.CharField(label='name', max_length=30, widget=forms.TextInput(attrs={'class': 'guestbook_name'})) comment = forms.CharField(label='comment', widget=forms.T...
{ "repo_name": "LMLohse/corazon", "path": "blog/forms.py", "copies": "1", "size": "1172", "license": "mit", "hash": -9007204844971932000, "line_mean": 44.1153846154, "line_max": 90, "alpha_frac": 0.4982935154, "autogenerated": false, "ratio": 4.863070539419087, "config_test": false, "has_no_ke...
from django import forms class HarvestForm(forms.Form): json_file = forms.FileField(required=False) api_key = forms.CharField( required=False, max_length=24, widget=forms.TextInput( attrs=dict(maxlength="200") ) ) auth_key = forms.CharField( required...
{ "repo_name": "Crimson-Star-Software/data-combine", "path": "datacombine/datacombine/forms.py", "copies": "1", "size": "1170", "license": "mit", "hash": 835732442237447400, "line_mean": 29, "line_max": 67, "alpha_frac": 0.5623931624, "autogenerated": false, "ratio": 4.148936170212766, "config_t...
from django import forms class InfAdProdForm(forms.Form): pedido = forms.CharField( label='Pedido', widget=forms.TextInput(attrs={'type': 'number', 'autofocus': 'autofocus'})) class RemessaIndustrBaseForm(forms.Form): data_de = forms.DateField( label='N...
{ "repo_name": "anselmobd/fo2", "path": "src/contabil/forms.py", "copies": "1", "size": "3642", "license": "mit", "hash": -476679048514463500, "line_mean": 32.0090909091, "line_max": 67, "alpha_frac": 0.5755990085, "autogenerated": false, "ratio": 3.5286686103012634, "config_test": false, "has...
from django import forms class ItemTypePlugin(object): label = None name = None form_class = None @property def action_label(self): # Set this as an attribute of a subclass to turn off this behavior. return u'Add a {0}'.format(self.label) @property def css_class(self): ...
{ "repo_name": "snswa/django-iris", "path": "iris/base.py", "copies": "1", "size": "1972", "license": "apache-2.0", "hash": -2453843621789511700, "line_mean": 28.4328358209, "line_max": 76, "alpha_frac": 0.6252535497, "autogenerated": false, "ratio": 4.05761316872428, "config_test": false, "ha...
from django import forms class JAMFChangeManagementLogForm(forms.Form): path = forms.CharField(initial="/usr/local/jss/logs/JAMFChangeManagement.log") def get_filebeat_input(self): return { "type": "log", "paths": [self.cleaned_data["path"]], "multiline": { ...
{ "repo_name": "zentralopensource/zentral", "path": "zentral/contrib/jamf/filebeat.py", "copies": "1", "size": "2057", "license": "apache-2.0", "hash": -5060818599881872000, "line_mean": 25.7142857143, "line_max": 110, "alpha_frac": 0.4934370442, "autogenerated": false, "ratio": 3.416943521594684,...
from django import forms class JQueryUIDatepickerWidget(forms.DateInput): ''' Widget designed to allow the user to pick the date. Source: Stackoverflow. Doesn't work.''' def __init__(self, **kwargs): super(forms.DateInput, self).__init__(attrs={"size": 10, ...
{ "repo_name": "CSC301H-Fall2013/Ultra-Remote-Medicine", "path": "sample/forms.py", "copies": "1", "size": "6036", "license": "mit", "hash": 4939309763064914000, "line_mean": 38.7105263158, "line_max": 78, "alpha_frac": 0.5801855533, "autogenerated": false, "ratio": 4.280851063829787, "config_te...
from django import forms class LocationFilter(forms.Form): """Add filters for Location boundary.""" north = forms.DecimalField(required=False, min_value=-90, max_value=90) south = forms.DecimalField(required=False, min_value=-90, max_value=90) east = forms.DecimalField(required=False, min_value=-180,...
{ "repo_name": "rlmuraya/ipv6map", "path": "ipv6map/geodata/forms.py", "copies": "1", "size": "1205", "license": "unlicense", "hash": 7617307609319754000, "line_mean": 42.0357142857, "line_max": 81, "alpha_frac": 0.6497925311, "autogenerated": false, "ratio": 3.8870967741935485, "config_test": f...
from django import forms class LoginForm(forms.Form): email = forms.EmailField( label="", max_length=50, required=True, widget=forms.TextInput( attrs={ 'class': 'input-large col-xs-12', 'placeholder': 'Enter Email' } )...
{ "repo_name": "buildbuild/buildbuild", "path": "buildbuild/users/forms.py", "copies": "1", "size": "1688", "license": "bsd-3-clause", "hash": 2128828380731235300, "line_mean": 22.4444444444, "line_max": 56, "alpha_frac": 0.4591232227, "autogenerated": false, "ratio": 4.612021857923497, "config_...
from django import forms class LoginForm(forms.Form): name = forms.CharField(max_length=30, min_length=5, required=True, label='Nombre') password = forms.CharField(widget=forms.PasswordInput(), label='Contrasena', required=True, ...
{ "repo_name": "elib0/pySMT", "path": "users/forms.py", "copies": "1", "size": "1341", "license": "apache-2.0", "hash": -7762938101259334000, "line_mean": 42.2580645161, "line_max": 86, "alpha_frac": 0.5495898583, "autogenerated": false, "ratio": 4.425742574257426, "config_test": false, "has_n...
from django import forms class LoginForm(forms.Form): username = forms.CharField(max_length=254) password = forms.CharField(max_length=254, widget=forms.PasswordInput) class RegistryForm(forms.Form): username = forms.CharField(max_length=254) password1 = forms.CharField(max_length=254, widget=forms....
{ "repo_name": "wangtaoking1/hummer", "path": "website/forms.py", "copies": "1", "size": "2620", "license": "apache-2.0", "hash": -4224647252989938700, "line_mean": 30.1904761905, "line_max": 76, "alpha_frac": 0.6984732824, "autogenerated": false, "ratio": 3.75896700143472, "config_test": false,...
from django import forms class MakeAppointmentForm(forms.Form): first_name = forms.CharField(label='Nome', widget=forms.TextInput( attrs={'class': 'form-control', 'placeholder': 'Nome'} ...
{ "repo_name": "vribeiro1/plainsboro_221", "path": "plainsboro/appointments/forms.py", "copies": "1", "size": "1237", "license": "mit", "hash": 8169134904052336000, "line_mean": 46.5769230769, "line_max": 71, "alpha_frac": 0.354890865, "autogenerated": false, "ratio": 6.185, "config_test": false...
from django import forms class ModelMultiValueWidget(forms.MultiWidget): def __init__(self, *args, **kwargs): self.model = kwargs.pop('model') self.labels = kwargs.pop('labels', [None]) self.field_names = kwargs.pop('field_names', [None]) super(ModelMultiValueWidget, self).__init__...
{ "repo_name": "todd-dembrey/django-modelmultivalue", "path": "modelmultivalue/widgets.py", "copies": "1", "size": "2071", "license": "mit", "hash": -449041545979828350, "line_mean": 48.3333333333, "line_max": 141, "alpha_frac": 0.5475615645, "autogenerated": false, "ratio": 4.4252136752136755, ...
from django import forms class NewChannelForm(forms.Form): country = forms.ChoiceField(label="Select a destination", widget=forms.Select()) # TODO: Channels are related to countries. channel = forms.ChoiceField(label="Select a channel", widg...
{ "repo_name": "praekelt/vumi-go", "path": "go/channel/forms.py", "copies": "1", "size": "1797", "license": "bsd-3-clause", "hash": 9080620719687449000, "line_mean": 41.7857142857, "line_max": 79, "alpha_frac": 0.5781858653, "autogenerated": false, "ratio": 4.038202247191011, "config_test": fals...
from django import forms class ObForm(forms.Form): ob = forms.CharField( label='OB', widget=forms.TextInput( attrs={ 'type': 'number', 'autofocus': 'autofocus' } ) ) class OtForm(forms.Form): ot = forms.CharField( la...
{ "repo_name": "anselmobd/fo2", "path": "src/beneficia/forms/forms.py", "copies": "1", "size": "1799", "license": "mit", "hash": -7777762991978644000, "line_mean": 22.3246753247, "line_max": 54, "alpha_frac": 0.4593541203, "autogenerated": false, "ratio": 4, "config_test": false, "has_no_keywo...