text stringlengths 0 1.05M | meta dict |
|---|---|
from django import forms
from wiki.models import Page
class PageForm(forms.Form):
_id = forms.CharField(widget = forms.HiddenInput, required=False)
title = forms.CharField(max_length = 100,
widget = forms.TextInput(attrs = {"size": 42}),
... | {
"repo_name": "theju/django-couch-wiki",
"path": "wiki/forms.py",
"copies": "1",
"size": "1047",
"license": "mit",
"hash": 4032209386968750000,
"line_mean": 42.625,
"line_max": 98,
"alpha_frac": 0.5673352436,
"autogenerated": false,
"ratio": 4.171314741035856,
"config_test": false,
"has_no_ke... |
from django import forms
from witness.models import Decision
import bleach
class DecisionForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(DecisionForm, self).__init__(*args, **kwargs)
document_version = self.instance.document_version
self.fields['is_agreed'] = forms.TypedC... | {
"repo_name": "khchen428/witness",
"path": "witness/forms.py",
"copies": "1",
"size": "1646",
"license": "mpl-2.0",
"hash": -6497631975849939000,
"line_mean": 42.3157894737,
"line_max": 78,
"alpha_frac": 0.5437424058,
"autogenerated": false,
"ratio": 4.623595505617978,
"config_test": false,
"... |
from django import forms
from write.models import Author, Document
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from pagedown.widgets import PagedownWidget
from markdown_deux.templatetags.markdown_deux_tags import markdown_allowed
class BlurbForm(forms.ModelForm):... | {
"repo_name": "mikelese/spitballingHere",
"path": "write/forms.py",
"copies": "1",
"size": "1756",
"license": "mit",
"hash": 902171162797202600,
"line_mean": 25.6060606061,
"line_max": 98,
"alpha_frac": 0.7141230068,
"autogenerated": false,
"ratio": 3.3447619047619046,
"config_test": false,
"... |
from django import forms
from xyberville.apps.users.models import User
from xyberville.apps.arsip.models import Pengantar, Klasifikasi
from dal import autocomplete, forward
class PengantarForm(forms.ModelForm):
user = forms.ModelChoiceField(
required=False,
queryset=User.objects.all(),
wid... | {
"repo_name": "ahmadcahyana/xyberville",
"path": "xyberville/backoffice/pengantar/forms.py",
"copies": "1",
"size": "1301",
"license": "mit",
"hash": 9113240205210214000,
"line_mean": 29.2558139535,
"line_max": 76,
"alpha_frac": 0.6287471176,
"autogenerated": false,
"ratio": 3.441798941798942,
... |
from django import forms
from xyberville.apps.users.models import User
from xyberville.apps.keluarga.models import Keluarga
from xyberville.apps.logs.models import KeluargaLogs
from xyberville.apps.regions.models import Province, Regency, District, Village
from dal import autocomplete, forward
class BaseKeluargaForm(... | {
"repo_name": "ahmadcahyana/xyberville",
"path": "xyberville/backoffice/keluarga/forms.py",
"copies": "1",
"size": "4776",
"license": "mit",
"hash": -7579170392703754000,
"line_mean": 30.012987013,
"line_max": 79,
"alpha_frac": 0.5649078727,
"autogenerated": false,
"ratio": 3.532544378698225,
"... |
from django import forms
from zentral.contrib.inventory.models import BusinessUnit
from .models import SimpleMDMInstance
from .api_client import APIClient, APIClientError
class SimpleMDMInstanceForm(forms.ModelForm):
class Meta:
model = SimpleMDMInstance
fields = ("business_unit", "api_key")
... | {
"repo_name": "zentralopensource/zentral",
"path": "zentral/contrib/simplemdm/forms.py",
"copies": "1",
"size": "1371",
"license": "apache-2.0",
"hash": 9193194169949723000,
"line_mean": 34.1538461538,
"line_max": 83,
"alpha_frac": 0.576221736,
"autogenerated": false,
"ratio": 4.192660550458716,
... |
from django import forms
# get the UniVerse imports
import os
os.chdir("C:\\U2\\XDEMO\\pythonbetarocket")
import u2py
def validateid(check_id):
sub = u2py.Subroutine('VALIDATE_MEMBERS_ID', 4)
sub.args[0] = check_id
sub.call()
if str(sub.args[2]) != '0':
raise forms.ValidationError('Error! ' + ... | {
"repo_name": "RocketSoftware/PythonBetaProject",
"path": "Django/src/members/forms.py",
"copies": "2",
"size": "3210",
"license": "mit",
"hash": 3174959714364984300,
"line_mean": 29.2830188679,
"line_max": 99,
"alpha_frac": 0.6034267913,
"autogenerated": false,
"ratio": 3.4148936170212765,
"co... |
from django import forms
import account.forms
from bojv4.conf import CONST
from .models import UserProfile, GroupProfile
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User, Group
from django_select2.forms import ModelSelect2MultipleWidget, ModelSelect2Widget
class User... | {
"repo_name": "wangzitian0/BOJ-V4",
"path": "ojuser/forms.py",
"copies": "1",
"size": "2828",
"license": "mit",
"hash": 7702716630580677000,
"line_mean": 26.4563106796,
"line_max": 99,
"alpha_frac": 0.5968882603,
"autogenerated": false,
"ratio": 4.164948453608248,
"config_test": false,
"has_n... |
from django import forms
import account.forms
from bojv4.conf import GENDER
from .models import UserProfile, GroupProfile
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User, Group
from django_select2.forms import ModelSelect2MultipleWidget, ModelSelect2Widget
class Use... | {
"repo_name": "BUPT-OJ-V4/BOJ-V4",
"path": "ojuser/forms.py",
"copies": "1",
"size": "2976",
"license": "mit",
"hash": 2379972500968753700,
"line_mean": 26.8130841121,
"line_max": 101,
"alpha_frac": 0.5927419355,
"autogenerated": false,
"ratio": 4.179775280898877,
"config_test": false,
"has_n... |
from django import forms
import autocomplete_light
from datetime import date
from tracking.models import *
class OrganizationForm(forms.ModelForm):
"""
Create a new organization,
Check for duplicates
Offer new NewReferringEntity creation in same form.
"""
required_css_class = 'required'
... | {
"repo_name": "Heteroskedastic/Dr-referral-tracker",
"path": "tracking/forms.py",
"copies": "1",
"size": "2612",
"license": "mit",
"hash": -7606737044378391000,
"line_mean": 26.4947368421,
"line_max": 113,
"alpha_frac": 0.6749617152,
"autogenerated": false,
"ratio": 4.261011419249592,
"config_t... |
from django import forms
import Bio.Phylo as bp
from phylocommons.get_treestore import get_treestore, tree_id_from_uri, uri_from_tree_id
from phylocommons import settings
class QueryForm(forms.Form):
with get_treestore() as treestore:
taxa = forms.CharField(required=True,
wi... | {
"repo_name": "NESCent/phylocommons",
"path": "treequery/forms.py",
"copies": "1",
"size": "1990",
"license": "mit",
"hash": 660387685200697600,
"line_mean": 50.0256410256,
"line_max": 199,
"alpha_frac": 0.551758794,
"autogenerated": false,
"ratio": 4.061224489795919,
"config_test": false,
"h... |
from django import forms
import core.models as cm
from django.contrib.auth.models import User
import django.forms.extras.widgets as widgets
import forms_builder.forms.models as fm
#do weird stuff to mAake user names nou usernames show up
def user_new_unicode(self):
return self.get_full_name()
# Replace the __unico... | {
"repo_name": "SM2015/orchid",
"path": "core/forms.py",
"copies": "2",
"size": "11126",
"license": "mit",
"hash": -1701300481669461200,
"line_mean": 38.4574468085,
"line_max": 194,
"alpha_frac": 0.6374258494,
"autogenerated": false,
"ratio": 4.151492537313433,
"config_test": false,
"has_no_ke... |
from django import forms
import datetime
# Forms
class PortfolioFormOneDate(forms.Form):
#portfolio = forms.CharField(label='Portfolio', max_length=100, initial='All')
time_span = 365
tmp_default_to = (datetime.date.today() - datetime.timedelta(days=0)).strftime('%Y-%m-%d')
from_date = forms.DateField... | {
"repo_name": "danst0/Portfolio",
"path": "core/forms.py",
"copies": "1",
"size": "1360",
"license": "bsd-2-clause",
"hash": 5935676043262623000,
"line_mean": 47.5714285714,
"line_max": 104,
"alpha_frac": 0.7029411765,
"autogenerated": false,
"ratio": 3.317073170731707,
"config_test": false,
... |
from django import forms
import datetime
from django.conf import settings
import urllib2
import json
from models import RealworksProject, projecten, Project
class RealworksProjectAdminForm(forms.ModelForm):
realworks_project = forms.ChoiceField(required=False, choices=[('', '----')] + projecten)
class Meta:... | {
"repo_name": "corallus/django-nieuwbouw-inschrijven",
"path": "inschrijven/forms.py",
"copies": "1",
"size": "5891",
"license": "mit",
"hash": -4182503244297953000,
"line_mean": 51.1327433628,
"line_max": 118,
"alpha_frac": 0.6598200645,
"autogenerated": false,
"ratio": 3.401270207852194,
"con... |
from django import forms
import datetime
from django.contrib.admin import widgets
from .models import Portfolio , PortfolioReleases, PortfolioStatus,Userstory, Sprint, Task, TaskStatus
from django.contrib.admin.widgets import AdminDateWidget
class UserstoryForm(forms.ModelForm):
class Meta:
model = Users... | {
"repo_name": "aneesahmed/gameplan2",
"path": "scrum/forms.py",
"copies": "1",
"size": "3620",
"license": "apache-2.0",
"hash": 216210325032853660,
"line_mean": 40.6091954023,
"line_max": 123,
"alpha_frac": 0.5878453039,
"autogenerated": false,
"ratio": 4.278959810874705,
"config_test": false,
... |
from django import forms
import datetime
from django.forms.models import ModelForm
from imager_images.models import Album, Photo
from form_utils.widgets import ImageWidget
class NewAlbumAdminForm(ModelForm):
class Meta:
model = Album
exclude = []
class NewPhotoForm(ModelForm):
class Meta:
... | {
"repo_name": "henrykh/django-imager",
"path": "imager_images/forms.py",
"copies": "1",
"size": "4327",
"license": "mit",
"hash": 8877131607470099000,
"line_mean": 28.8413793103,
"line_max": 91,
"alpha_frac": 0.5611278022,
"autogenerated": false,
"ratio": 4.144636015325671,
"config_test": false... |
# from django import forms
import datetime
from django import forms
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from .models import Feedback_contact
class FeedbackForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
self.user = kwargs.pop('user',... | {
"repo_name": "Nikita1710/ANUFifty50-Online-Mentoring-Platform",
"path": "project/fifty_fifty/feedback/forms.py",
"copies": "1",
"size": "1962",
"license": "apache-2.0",
"hash": -6694155154489839000,
"line_mean": 41.652173913,
"line_max": 118,
"alpha_frac": 0.5749235474,
"autogenerated": false,
"... |
from django import forms
import datetime
from django.utils.safestring import mark_safe
from django.utils.encoding import StrAndUnicode, force_unicode
from django.utils.html import escape, conditional_escape
class CoordinatesPickerWidget(forms.Widget):
"""
A widget that provides both a way of picking a point on... | {
"repo_name": "nyaruka/motome",
"path": "motome/locales/widgets.py",
"copies": "1",
"size": "3261",
"license": "bsd-3-clause",
"hash": -2203138325249428500,
"line_mean": 36.4827586207,
"line_max": 141,
"alpha_frac": 0.599509353,
"autogenerated": false,
"ratio": 3.6354515050167224,
"config_test"... |
from django import forms
import datetime
from .models import Reservierung,Raum
# Create the form class
class ReservierungForm(forms.Form):
choice = ()
model = Reservierung()
choice = model.create_choice()
reserviertFür = forms.CharField(max_length=40,required=False)
reservierterRaum = forms.Choice... | {
"repo_name": "holytortoise/abwreservierung",
"path": "src/reservierung/forms.py",
"copies": "1",
"size": "1831",
"license": "mit",
"hash": 4851214999509449000,
"line_mean": 44.7,
"line_max": 101,
"alpha_frac": 0.6608315098,
"autogenerated": false,
"ratio": 3.5221579961464355,
"config_test": fa... |
from django import forms
import datetime
import re
from exceptions import ValueError
from django.utils.translation import ugettext as _
class DateSelectionForm(forms.Form):
date = forms.CharField()
def clean(self):
cleaned_data = self.cleaned_data
date_data = cleaned_data.get("date")
#... | {
"repo_name": "bansalrajnikant/djime",
"path": "djime/statistics/forms.py",
"copies": "1",
"size": "2555",
"license": "bsd-3-clause",
"hash": 5626202419742693000,
"line_mean": 45.4727272727,
"line_max": 173,
"alpha_frac": 0.6183953033,
"autogenerated": false,
"ratio": 3.936825885978428,
"config... |
from django import forms
import datetime
from django.contrib.contenttypes.models import ContentType
from pirate_forum.models import Question, Nomination
from pirate_core.fields import JqSplitDateTimeField
from pirate_core.widgets import JqSplitDateTimeWidget
from markitup.widgets import MarkItUpWidget
class BlobFo... | {
"repo_name": "fragro/Open-Assembly",
"path": "ver1_0/openassembly/pirate_forum/forms.py",
"copies": "1",
"size": "1756",
"license": "bsd-3-clause",
"hash": 5620220376147242000,
"line_mean": 42.9,
"line_max": 144,
"alpha_frac": 0.680523918,
"autogenerated": false,
"ratio": 3.902222222222222,
"c... |
from django import forms
import django_filters
from bootstrap_toolkit.widgets import BootstrapDateInput
from .models import Invoice
class DateRangeWidget(forms.MultiWidget):
def __init__(self, widgets=None, *args, **kwargs):
widgets = (
BootstrapDateInput(attrs={
'class': 'form... | {
"repo_name": "alialiev/dj-stripe",
"path": "djstripe/filters.py",
"copies": "4",
"size": "1711",
"license": "bsd-3-clause",
"hash": -7312939533832619000,
"line_mean": 29.5535714286,
"line_max": 76,
"alpha_frac": 0.617182934,
"autogenerated": false,
"ratio": 4.214285714285714,
"config_test": fa... |
from django import forms
import django_form_architect.settings
from django.utils.html import format_html, format_html_join
from django.utils.encoding import force_text
class WidgetFieldFactory(object):
@staticmethod
def from_widget(widget_model):
field_settings = django_form_architect.settings.BU... | {
"repo_name": "ceko/django-form-architect",
"path": "django_form_architect/forms/fields.py",
"copies": "1",
"size": "3760",
"license": "mit",
"hash": -5641686546016581000,
"line_mean": 34.819047619,
"line_max": 104,
"alpha_frac": 0.6281914894,
"autogenerated": false,
"ratio": 3.8923395445134576,
... |
from django import forms
import django
from django.core.exceptions import ObjectDoesNotExist
from django.forms.forms import BoundField
from django.forms.models import ModelFormMetaclass, BaseInlineFormSet
from django.utils.functional import cached_property
from django.utils.translation import get_language
from django.u... | {
"repo_name": "zhangguiyu/django-parler",
"path": "parler/forms.py",
"copies": "5",
"size": "12399",
"license": "apache-2.0",
"hash": 4701055073832331000,
"line_mean": 41.3174061433,
"line_max": 156,
"alpha_frac": 0.623921284,
"autogenerated": false,
"ratio": 4.678867924528302,
"config_test": f... |
from django import forms
import django
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse, NoReverseMatch
from django.db import models
from django.db.models.base import ModelBase
from django.forms.forms import DeclarativeFieldsMetaclass
from django.forms.utils import flatat... | {
"repo_name": "pobear/django-xadmin",
"path": "xadmin/views/dashboard.py",
"copies": "1",
"size": "23381",
"license": "bsd-3-clause",
"hash": 8399702664567713000,
"line_mean": 34.2654600302,
"line_max": 134,
"alpha_frac": 0.5846627604,
"autogenerated": false,
"ratio": 3.871026490066225,
"config... |
from django import forms
import inspect
from . import models
class BaseVariantForm(forms.Form):
product = None
def __init__(self, *args, **kwargs):
self.product = kwargs.pop('product')
variant = kwargs.pop('variant', None)
super(BaseVariantForm, self).__init__(*args, **kwargs)
... | {
"repo_name": "fusionbox/satchless",
"path": "satchless/product/forms.py",
"copies": "1",
"size": "1557",
"license": "bsd-3-clause",
"hash": -3297084920658250000,
"line_mean": 31.4375,
"line_max": 77,
"alpha_frac": 0.6236351959,
"autogenerated": false,
"ratio": 4.2425068119891005,
"config_test"... |
from django import forms
import json
from workflows.models import AbstractWidget
class ImportForm(forms.Form):
data = forms.CharField(widget=forms.Textarea(attrs={'class': 'formfieldclass'}))
def clean_data(self):
def get_all_abstract_widgets(jsondata, awset):
widgets = jsondata.get('wid... | {
"repo_name": "xflows/clowdflows-backend",
"path": "workflows/forms.py",
"copies": "1",
"size": "1343",
"license": "mit",
"hash": 2856950443363540000,
"line_mean": 35.2972972973,
"line_max": 94,
"alpha_frac": 0.582278481,
"autogenerated": false,
"ratio": 4.3462783171521036,
"config_test": false... |
from django import forms
import json
from cabot.cabotapp.views import GroupedModelForm
from cabot.metricsapp.api import get_es_status_check_fields
from .grafana import GrafanaStatusCheckForm
from cabot.metricsapp.models import ElasticsearchStatusCheck
_GROUPS = (
('Basic', (
'name',
'active',
... | {
"repo_name": "Affirm/cabot",
"path": "cabot/metricsapp/forms/grafana_elastic.py",
"copies": "1",
"size": "2179",
"license": "mit",
"hash": 1345827804484415200,
"line_mean": 30.1285714286,
"line_max": 118,
"alpha_frac": 0.5874254245,
"autogenerated": false,
"ratio": 3.877224199288256,
"config_t... |
from django import forms
import logging
class LoginForm(forms.Form):
username = forms.CharField(widget=forms.TextInput(attrs={'class' : 'txt-box1', 'autocomplete':'OFF', 'placeholder':'Email Address'}),max_length = 50)
password = forms.CharField(widget=forms.PasswordInput(render_value=False,attrs={'class' : 't... | {
"repo_name": "hughsons/saltwaterfish",
"path": "forms_bkp_0627.py",
"copies": "1",
"size": "13257",
"license": "bsd-3-clause",
"hash": -7987499834665967000,
"line_mean": 66.9897435897,
"line_max": 192,
"alpha_frac": 0.6520328883,
"autogenerated": false,
"ratio": 3.2192812044681887,
"config_tes... |
from django import forms
import logging
from polling.models import CANDIDATES_ADVOCATED
from polling.models import STATES
from users.models import Profile
logger = logging.getLogger(__name__)
class LandingPageForm(forms.Form):
state = forms.ChoiceField(
choices=STATES, label="Your state")
preferred_... | {
"repo_name": "sbuss/voteswap",
"path": "voteswap/forms.py",
"copies": "1",
"size": "3067",
"license": "mit",
"hash": 5892247128339703000,
"line_mean": 36.8641975309,
"line_max": 78,
"alpha_frac": 0.5800456472,
"autogenerated": false,
"ratio": 4.167119565217392,
"config_test": false,
"has_no_... |
from django import forms
import models
from tasks import build_mock_environment
from mozpackager.MozPackager import MozPackage
from mozpackager.settings.local import MEDIA_PATH
def handle_uploaded_file(f, path = None):
if not path:
path = '/tmp/'
with open('/%s/%s' % (path, f._get_name()), 'wb+') as des... | {
"repo_name": "rtucker-mozilla/mozpackager",
"path": "mozpackager/frontend/forms.py",
"copies": "1",
"size": "8316",
"license": "bsd-3-clause",
"hash": -5190817090475428000,
"line_mean": 36.2914798206,
"line_max": 115,
"alpha_frac": 0.6082251082,
"autogenerated": false,
"ratio": 4.09251968503937,... |
from django import forms
import models
from usuarios import models as usuarios
from Piscix.middleware import get_current_user
from django_autocomplete.widgets import AutocompleteWidget
from exile_ui.widgets import DatePickerWidget
from django_select2.forms import Select2Widget
class SeguimientoForm(forms.ModelForm):
... | {
"repo_name": "mariobp/piscix",
"path": "gestion_cartera/forms.py",
"copies": "2",
"size": "1605",
"license": "mit",
"hash": -8908474225445886000,
"line_mean": 29.2830188679,
"line_max": 92,
"alpha_frac": 0.6380062305,
"autogenerated": false,
"ratio": 3.422174840085288,
"config_test": false,
... |
from django import forms
import models
class CreatePoll(forms.Form):
question_text = forms.CharField(widget = forms.Textarea,
help_text = 'Some description. This is required.')
choice_1 = forms.CharField(widget = forms.TextInput(attrs = {'class':'required', 'size':50}),
help_text = 'Allowed cho... | {
"repo_name": "swiharta/radres",
"path": "polls/forms.py",
"copies": "1",
"size": "1642",
"license": "mit",
"hash": -8761975066151952000,
"line_mean": 52,
"line_max": 98,
"alpha_frac": 0.6321559074,
"autogenerated": false,
"ratio": 3.966183574879227,
"config_test": false,
"has_no_keywords": f... |
from django import forms
import models
class SetTableForm(forms.ModelForm):
class Meta:
model = models.SetTable
exclude = []
# end class
def clean(self):
if self.instance.pk:
self.instance.table.aviable = True
self.instance.table.save()
# end if
... | {
"repo_name": "vpadillar/pventa",
"path": "restorant/forms.py",
"copies": "1",
"size": "1858",
"license": "mit",
"hash": 4246726437724404000,
"line_mean": 24.8194444444,
"line_max": 101,
"alpha_frac": 0.6270182992,
"autogenerated": false,
"ratio": 3.708582834331337,
"config_test": false,
"has... |
from django import forms
import models
class CategoryForm(forms.ModelForm):
name = forms.CharField(max_length=128, help_text="Please enter the category name.")
views = forms.IntegerField(widget=forms.HiddenInput(), initial=0)
likes = forms.IntegerField(widget=forms.HiddenInput(), initial=0)
# An inline class to ... | {
"repo_name": "dannysellers/tangodjango",
"path": "tango_with_django_project/rango/forms.py",
"copies": "1",
"size": "1164",
"license": "mit",
"hash": 3170977032865073000,
"line_mean": 30.4864864865,
"line_max": 89,
"alpha_frac": 0.7190721649,
"autogenerated": false,
"ratio": 3.548780487804878,
... |
from django import forms
import re
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout, Field
from django.core.urlresolvers import reverse
from crispy_forms.bootstrap import(FormAction... | {
"repo_name": "pawel-ta/Django",
"path": "accounts/forms.py",
"copies": "1",
"size": "3397",
"license": "mit",
"hash": -6308506067864492000,
"line_mean": 34.0309278351,
"line_max": 104,
"alpha_frac": 0.72799529,
"autogenerated": false,
"ratio": 3.3633663366336632,
"config_test": false,
"has_n... |
from django import forms
import re
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
#model for the user registration form
class RegistrationForm(forms.Form):
username=forms.CharField(label="Username",max_length=30)
email=forms.EmailField(label="Email*")
password1=form... | {
"repo_name": "tarunz/Django-Bookmarks",
"path": "bookmarks/forms.py",
"copies": "1",
"size": "1717",
"license": "mit",
"hash": -6274720270543404000,
"line_mean": 28.1186440678,
"line_max": 60,
"alpha_frac": 0.737914968,
"autogenerated": false,
"ratio": 3.461693548387097,
"config_test": false,
... |
from django import forms
import re
from django.contrib.auth.models import User
from .models import Movie, Comment
class RegistrationForm(forms.Form):
name = forms.CharField(label=u'Name', max_length=30)
username = forms.CharField(label=u'Username', max_length=30)
email = forms.EmailField(label=u'Email')
... | {
"repo_name": "pronoobs/elastic-hack",
"path": "lmdb/home/forms.py",
"copies": "1",
"size": "1871",
"license": "mit",
"hash": -5934976123073887000,
"line_mean": 31.8245614035,
"line_max": 115,
"alpha_frac": 0.6643506146,
"autogenerated": false,
"ratio": 4.331018518518518,
"config_test": false,
... |
from django import forms
import re
from openflow.optin_manager.admin_manager.models import AutoApproveServerProxy
from expedient.common.xmlrpc_serverproxy.forms import PasswordXMLRPCServerProxyFormHelperAddin
import logging
logger = logging.getLogger("AdminManagerForms")
class ScriptProxyForm(forms.ModelForm,
... | {
"repo_name": "avlach/univbris-ocf",
"path": "optin_manager/src/python/openflow/optin_manager/admin_manager/forms.py",
"copies": "1",
"size": "1749",
"license": "bsd-3-clause",
"hash": -8644941156647882000,
"line_mean": 34.693877551,
"line_max": 94,
"alpha_frac": 0.6186392224,
"autogenerated": fals... |
from django import forms
import re
from openflow.optin_manager.admin_manager.models import AutoApproveServerProxy
from openflow.optin_manager.admin_manager.models import FlowSpaceAutoApproveScript
from expedient.common.xmlrpc_serverproxy.forms import PasswordXMLRPCServerProxyFormHelperAddin
import logging
logger = log... | {
"repo_name": "ict-felix/stack",
"path": "optin_manager/src/python/openflow/optin_manager/admin_manager/forms.py",
"copies": "3",
"size": "2959",
"license": "apache-2.0",
"hash": -3642052686702943000,
"line_mean": 38.4533333333,
"line_max": 118,
"alpha_frac": 0.6404190605,
"autogenerated": false,
... |
from django import forms
import re
from paypal.standard.forms import (PayPalPaymentsForm,
PayPalEncryptedPaymentsForm)
INTEGER_FIELDS = ('amount_', 'item_number_', 'quantity_', 'tax_', 'shipping_',
'shipping2_', 'discount_amount_', 'discount_amount2_',
... | {
"repo_name": "ericholscher/merchant",
"path": "billing/forms/paypal_forms.py",
"copies": "6",
"size": "1868",
"license": "bsd-3-clause",
"hash": 6974226719931530000,
"line_mean": 35.6274509804,
"line_max": 91,
"alpha_frac": 0.5781584582,
"autogenerated": false,
"ratio": 4.087527352297593,
"con... |
from django import forms
import re
city = (
('KHARKOV', 'KHARKOV'),
('ODESSA', 'ODESSA'),
('DONETSK', 'DONETSK'),
('KIEV', 'KIEV'),
('DNEPR', 'DNEPR'),
('POLTAVA', 'POLTAVA'),
('MARIUPOL', 'MARIUPOL'),
)
point = (
('K0', 'K0'),
('K2', 'K2'),
('K01', 'K01'),
('K02', 'K02'),... | {
"repo_name": "maxsocl/django-ssc",
"path": "ssc/forms.py",
"copies": "1",
"size": "2430",
"license": "mit",
"hash": -2663022273563506000,
"line_mean": 26.6136363636,
"line_max": 97,
"alpha_frac": 0.4637860082,
"autogenerated": false,
"ratio": 3.2705248990578735,
"config_test": false,
"has_no... |
from django import forms
import requests, json
from bdo_platform.settings import PARSER_JWT, PROFILES_URL
class DatasetsForm(forms.Form):
choices = (
(None, ""),
(u'{"observation": "trip", "source": "anek", "dataType": "csv"}', "ANEK - Trips"),
(u'{"observation": "history", "source": "anek... | {
"repo_name": "dipapaspyros/bdo_platform",
"path": "uploader/forms.py",
"copies": "2",
"size": "4308",
"license": "mit",
"hash": 1497682065235357700,
"line_mean": 54.2307692308,
"line_max": 130,
"alpha_frac": 0.5577994429,
"autogenerated": false,
"ratio": 3.7234226447709595,
"config_test": fals... |
from django import forms
import rest_framework_swagger as rfs
METHODS = (
('get', 'GET'), ('post', 'POST'), ('put', 'PUT'), ('patch', 'PATCH'), ('delete', 'DELETE')
)
BOOL = ((True, 'True'), (False,'False'))
class SwaggerSettingsForm(forms.Form):
exclude_namespaces = forms.CharField(label='Exclude Namespaces'... | {
"repo_name": "yoku2010/api-specification-system",
"path": "apiss/rest_framework_swagger/forms.py",
"copies": "1",
"size": "2291",
"license": "mit",
"hash": 3727135817579227000,
"line_mean": 56.3,
"line_max": 199,
"alpha_frac": 0.6577913575,
"autogenerated": false,
"ratio": 3.7805280528052805,
... |
from django import forms
import service.models
from django.forms.util import ErrorList
class ServiceForm(forms.Form):
name = forms.CharField(max_length=100,
help_text=u'Enter a name for the service')
description = forms.CharField(max_length=200,
hel... | {
"repo_name": "creativepsyco/panex-web",
"path": "service/forms.py",
"copies": "1",
"size": "1635",
"license": "mit",
"hash": -4354346065031230500,
"line_mean": 34.5434782609,
"line_max": 121,
"alpha_frac": 0.6067278287,
"autogenerated": false,
"ratio": 3.892857142857143,
"config_test": false,
... |
from django import forms
import settings
class XMLInputForm(forms.Form):
xmlinput = forms.CharField(widget = forms.Textarea(attrs={'class':'form-control span6', 'rows':"12", 'id': 'xmlinput'}), required = True)
class EliIEInputForm(forms.Form):
eliie_input_free_text = forms.CharField(widget = forms.Textarea(attrs=... | {
"repo_name": "YixuanAshleyGuo/OHDSImatcher",
"path": "OHDSImatcher/forms.py",
"copies": "1",
"size": "1123",
"license": "mit",
"hash": -3967679742589165600,
"line_mean": 65.0588235294,
"line_max": 186,
"alpha_frac": 0.7479964381,
"autogenerated": false,
"ratio": 3.2177650429799427,
"config_tes... |
from django import forms
import six
from django.utils.safestring import mark_safe
from taggit.utils import edit_string_for_tags
from .conf import settings
try:
from django.urls import reverse # Django 1.10+
except ImportError:
from django.core.urlresolvers import reverse
def bool_or_str(val):
if val == T... | {
"repo_name": "chhantyal/taggit-selectize",
"path": "taggit_selectize/widgets.py",
"copies": "1",
"size": "5513",
"license": "bsd-3-clause",
"hash": -8521590617367015000,
"line_mean": 47.3596491228,
"line_max": 99,
"alpha_frac": 0.4589152911,
"autogenerated": false,
"ratio": 4.5337171052631575,
... |
from django import forms
import templatetags.ptreefilters
from django.conf import settings
import ptree.views.abstract
import ptree.constants as constants
class FormMixin(object):
# In general, pTree does not allow a user to go back and change their answer on a previous page,
# since that often defeats the p... | {
"repo_name": "pombredanne/django-ptree",
"path": "ptree/forms.py",
"copies": "1",
"size": "2504",
"license": "mit",
"hash": 2766855149080515000,
"line_mean": 32.8513513514,
"line_max": 100,
"alpha_frac": 0.6741214058,
"autogenerated": false,
"ratio": 4.125205930807248,
"config_test": false,
... |
from django import forms
import uuid
from datetimewidget.widgets import DateTimeWidget
from incidents.models import *
class AttachmentForm(forms.ModelForm):
class Meta:
model = Attachment
fields = ('format', 'file')
widgets = {
'format': forms.Select(attrs={'aut... | {
"repo_name": "SINTEF-Infosec/Incident-Information-Sharing-Tool",
"path": "incidents/forms.py",
"copies": "1",
"size": "6005",
"license": "apache-2.0",
"hash": -2055566047271081200,
"line_mean": 32.9322033898,
"line_max": 156,
"alpha_frac": 0.5570358035,
"autogenerated": false,
"ratio": 4.5492424... |
from django import forms
import vidscraper
from djvidscraper.models import Video
class CreateVideoForm(forms.ModelForm):
def save(self, commit=True, request=None):
kwargs = {
'video': vidscraper.auto_scrape(self.cleaned_data['original_url']),
'commit': False,
}
if... | {
"repo_name": "pculture/django-vidscraper",
"path": "djvidscraper/forms.py",
"copies": "1",
"size": "1194",
"license": "bsd-3-clause",
"hash": 2478085589558771700,
"line_mean": 24.9565217391,
"line_max": 79,
"alpha_frac": 0.5737018425,
"autogenerated": false,
"ratio": 3.9276315789473686,
"confi... |
from django import forms
import voxel_globe.meta.models as models
class OrderVoxelWorldBaseForm(forms.Form):
image_set = forms.ModelChoiceField(label="Image Set",
queryset=models.ImageSet.objects.all().order_by('name'))
camera_set = forms.ModelChoiceField(label="Camera Set",
queryset=models.CameraSet.... | {
"repo_name": "ngageoint/voxel-globe",
"path": "voxel_globe/build_voxel_world/forms.py",
"copies": "1",
"size": "3422",
"license": "mit",
"hash": 4995790968249111000,
"line_mean": 49.3235294118,
"line_max": 86,
"alpha_frac": 0.7051431911,
"autogenerated": false,
"ratio": 3.1568265682656826,
"co... |
from django import forms
import zipfile
import io
import re
from .models import Ovpn
class VPNForm(forms.ModelForm):
pattern_details = re.compile("(?P<country>.+?)\d*\.nordvpn\.com\.(?P<protocol>\w+?)(?P<port>\d+)\.ovpn")
import_zip = forms.FileField(
label="Importe from zip",
help_text="im... | {
"repo_name": "alexsilva/openvpn-admin",
"path": "openvpn_control/forms.py",
"copies": "1",
"size": "1741",
"license": "mit",
"hash": -7617558207842493000,
"line_mean": 30.6545454545,
"line_max": 108,
"alpha_frac": 0.5261344055,
"autogenerated": false,
"ratio": 4.288177339901478,
"config_test":... |
from django import forms
__all__ = ['EditProfileForm',]
class EditProfileForm(forms.Form):
"""
Form for editing the user profile information.
"""
email = forms.EmailField(required=False, label="E-Mail Address")
password = forms.CharField(required=False, widget=forms.PasswordInput, label="Current P... | {
"repo_name": "Unsettled/eve-wspace",
"path": "evewspace/account/forms.py",
"copies": "5",
"size": "1169",
"license": "apache-2.0",
"hash": -4499660915055791000,
"line_mean": 42.2962962963,
"line_max": 104,
"alpha_frac": 0.6963216424,
"autogenerated": false,
"ratio": 4.0874125874125875,
"config... |
from django import forms
__all__ = (
'FilterSpec',
'RuntimeAwareFilterSpecMixin',
)
class FilterSpec(object):
creation_counter = 0
field_cls = forms.CharField
def __init__(self, field_name, verbose_name=None,
filter_field=None, field_cls=None,
**field_kwargs):
# ... | {
"repo_name": "zorainc/django-datafilters",
"path": "datafilters/filterspec.py",
"copies": "2",
"size": "1529",
"license": "mit",
"hash": -5710899454356513000,
"line_mean": 27.3148148148,
"line_max": 74,
"alpha_frac": 0.6141268803,
"autogenerated": false,
"ratio": 4.077333333333334,
"config_tes... |
from django import forms
__all__ = [
'RegisterForm',
'LoginForm',
'RestPasswordForm',
'AdminRestPasswordForm'
]
class RegisterForm(forms.Form):
"""注册Form验证"""
email = forms.EmailField(required=True)
password = forms.CharField(required=True, min_length=5)
retype_password = forms.CharFi... | {
"repo_name": "itpubs/reflecting",
"path": "apps/users/forms.py",
"copies": "2",
"size": "1102",
"license": "mit",
"hash": 8813527458262328000,
"line_mean": 28.5882352941,
"line_max": 83,
"alpha_frac": 0.7107355865,
"autogenerated": false,
"ratio": 2.84180790960452,
"config_test": false,
"has... |
from django import forms
AVAILABILITY = (
(0, "Morning"),
(1, "Afternoon"),
(2, "Evening"),
(3, "Night"),
)
class AvailabilityForm(forms.ModelForm):
sunday = forms.MultipleChoiceField(choices=AVAILABILITY, widget=forms.CheckboxSelectMultiple(), required=False)
monday = forms.MultipleChoiceFiel... | {
"repo_name": "jrouly/stepup",
"path": "stepup/stepup/forms.py",
"copies": "1",
"size": "2328",
"license": "mit",
"hash": 454145660427904830,
"line_mean": 54.4285714286,
"line_max": 118,
"alpha_frac": 0.7701890034,
"autogenerated": false,
"ratio": 4.20216606498195,
"config_test": false,
"has_... |
from django import forms
class ActivityDataForm(forms.Form):
CHOICES =(
('5', '5 seconds'),
('10', '10 seconds'),
('15', '15 seconds'),
('30', '30 seconds'),
('60', '60 seconds'),
)
batch_name = forms.CharField(label='Batch name', max_length=100, required=False... | {
"repo_name": "pannellr/activity_analyzer",
"path": "activity_bucket/forms.py",
"copies": "1",
"size": "1434",
"license": "apache-2.0",
"hash": 1971243124992309500,
"line_mean": 50.2142857143,
"line_max": 84,
"alpha_frac": 0.6408647141,
"autogenerated": false,
"ratio": 4.230088495575221,
"confi... |
from django import forms
class ApplicationForm(forms.Form):
PARENTS_CHOICES = (
('usual', 'Usual'),
('pretentious', 'Pretentious'),
('great_pret', 'Great Pretentious'),
)
HAS_NURS_CHOICES = (
('proper', 'Proper'),
('less_proper', 'Less Proper'... | {
"repo_name": "jayArnel/nursery-application",
"path": "svm/forms.py",
"copies": "1",
"size": "2456",
"license": "bsd-2-clause",
"hash": 8430967985117216000,
"line_mean": 33.1111111111,
"line_max": 59,
"alpha_frac": 0.5439739414,
"autogenerated": false,
"ratio": 3.942215088282504,
"config_test":... |
from django import forms
class AuthenticationForm(forms.Form):
usernameBox = forms.CharField(label="Username", max_length=90)
passwordBox = forms.CharField(label="Password", max_length=85, widget=forms.PasswordInput)
class SearchForm(forms.Form):
searchBox = forms.CharField(label="", max_length=90)
class... | {
"repo_name": "sohamkor/FlitterWebApp",
"path": "flitterMainApp/forms.py",
"copies": "1",
"size": "1124",
"license": "mit",
"hash": 9156564635342703000,
"line_mean": 61.4444444444,
"line_max": 141,
"alpha_frac": 0.7428825623,
"autogenerated": false,
"ratio": 3.685245901639344,
"config_test": fa... |
from django import forms
class CarbonBlackInegrationConfigForm(forms.Form):
error_css_class = 'error'
required_css_class = 'required'
cb_server_url = forms.CharField(required=True,
label='Carbon Black Server Address',
help_text='URL fo... | {
"repo_name": "carbonblack/tic",
"path": "carbonblack_service/forms.py",
"copies": "1",
"size": "1825",
"license": "mit",
"hash": 5177091546773494000,
"line_mean": 49.6944444444,
"line_max": 132,
"alpha_frac": 0.4821917808,
"autogenerated": false,
"ratio": 5.33625730994152,
"config_test": false... |
from django import forms
class CategoryCreateForm(forms.Form):
category_id = forms.IntegerField(min_value=1,
widget=forms.TextInput(attrs={'class':'idField'}))
startvalue = forms.FloatField(initial=.6,min_value=0.0,max_value=1.0,
widget=forms.... | {
"repo_name": "friendofrobots/air-toolkit",
"path": "air/toolkit/forms.py",
"copies": "1",
"size": "1142",
"license": "mit",
"hash": 5422388698015370000,
"line_mean": 66.1764705882,
"line_max": 85,
"alpha_frac": 0.3922942207,
"autogenerated": false,
"ratio": 5.464114832535885,
"config_test": fa... |
from django import forms
class CommentForm(forms.Form):
name = forms.CharField(max_length = 30, label='Name', error_messages={'required': 'Please enter your name'}, widget=forms.TextInput(attrs={'class':'form-control'}))
email = forms.EmailField(label='Email', error_messages={'required': 'Please enter valid email'},... | {
"repo_name": "redebian/documentation",
"path": "portal/form.py",
"copies": "1",
"size": "1181",
"license": "bsd-3-clause",
"hash": -722125843501292000,
"line_mean": 72.875,
"line_max": 165,
"alpha_frac": 0.7383573243,
"autogenerated": false,
"ratio": 3.7731629392971247,
"config_test": false,
... |
from django import forms
class ContactForm(forms.Form):
name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Username'}),
label='Duck',
required=True,
help_text='100 characters max.',)
message = forms.CharField(wid... | {
"repo_name": "GoberInfinity/ExampleDjango",
"path": "classviews/forms.py",
"copies": "1",
"size": "1141",
"license": "mit",
"hash": 1131477481354002700,
"line_mean": 41.2962962963,
"line_max": 85,
"alpha_frac": 0.5574057844,
"autogenerated": false,
"ratio": 4.273408239700374,
"config_test": fa... |
from django import forms
class ContactForm(forms.Form):
estados = (
('Zacatecas', 'Zacatecas'),
('Veracruz', 'Veracruz'),
)
ciudades = (
('Fresnillo','Fresnillo'),
('Jalapa', 'Jalapa'),
)
soluciones = (
('Ejemplo Muro','Ejemplo Muro'),
('Ejemplo Losa', 'Ejemplo Losa'),
)
... | {
"repo_name": "JonathanAlvarado/bioclimatica",
"path": "nom020/nom020/forms.py",
"copies": "2",
"size": "1168",
"license": "mit",
"hash": 3034625325331170000,
"line_mean": 35.53125,
"line_max": 107,
"alpha_frac": 0.6789383562,
"autogenerated": false,
"ratio": 2.7417840375586855,
"config_test": ... |
from django import forms
class CuckooDistributedConfigForm(forms.Form):
error_css_class = 'error'
required_css_class = 'required'
rabbit_address = forms.CharField(required=True,
label="RabbitMQ URL",
widget=forms.TextInput(),
ini... | {
"repo_name": "cynexit/cuckoo_distributed",
"path": "etc/cuckoo_distributed_service/forms.py",
"copies": "1",
"size": "2435",
"license": "mit",
"hash": 5083930058665010000,
"line_mean": 49.7291666667,
"line_max": 93,
"alpha_frac": 0.4554414784,
"autogenerated": false,
"ratio": 5.1918976545842215,... |
from django import forms
class HiddenField(forms.CharField):
widget = forms.HiddenInput
class FormRedirectException(Exception):
def __init__(self, *args, **kwargs):
self.args = args
self.kwargs = kwargs
def process_form(request, form_class, initial=None, redirect_to=None, **kwargs):
"""
... | {
"repo_name": "k4ml/kecupuapp_base",
"path": "kecupuapp_base/forms.py",
"copies": "2",
"size": "1840",
"license": "isc",
"hash": -8363295496190893000,
"line_mean": 30.186440678,
"line_max": 80,
"alpha_frac": 0.6510869565,
"autogenerated": false,
"ratio": 4.035087719298246,
"config_test": false,... |
from django import forms
class IntegerWidget(forms.TextInput):
def __init__(self, *args, **kwargs):
kwargs.setdefault('attrs',{}).update({'size': '2'})
super(IntegerWidget, self).__init__(*args, **kwargs)
class CommentForm(forms.Form):
body = forms.CharField(label='Comment', widget=forms.Texta... | {
"repo_name": "bgolub/fftogo",
"path": "fftogo/forms.py",
"copies": "1",
"size": "1235",
"license": "mit",
"hash": 623381591042075000,
"line_mean": 46.5,
"line_max": 104,
"alpha_frac": 0.7295546559,
"autogenerated": false,
"ratio": 3.871473354231975,
"config_test": false,
"has_no_keywords": f... |
from django import forms
class LeagueForm(forms.Form):
league_name = forms.CharField(label = "Group name", max_length = 30)
max_size = forms.IntegerField(label = "Maximum participants", min_value = 0, max_value = 9999)
points_for_exact_guess = forms.IntegerField(label = "Points for exact guess", min_value ... | {
"repo_name": "leventebakos/football-ech",
"path": "leagues/forms.py",
"copies": "1",
"size": "1196",
"license": "mit",
"hash": 238104236361664740,
"line_mean": 78.8,
"line_max": 142,
"alpha_frac": 0.7165551839,
"autogenerated": false,
"ratio": 3.5176470588235293,
"config_test": false,
"has_n... |
from django import forms
class ListTextWidget(forms.TextInput):
def __init__(self, data_list, name, *args, **kwargs):
super(ListTextWidget, self).__init__(*args, **kwargs)
self._name = name
self._list = data_list
self.attrs.update({'list':'list__%s' % self._name})
def render(se... | {
"repo_name": "OpenConceptLab/ocl_web",
"path": "ocl_web/apps/core/fields.py",
"copies": "1",
"size": "4253",
"license": "mpl-2.0",
"hash": -2248283408238029800,
"line_mean": 40.6960784314,
"line_max": 136,
"alpha_frac": 0.4676698801,
"autogenerated": false,
"ratio": 3.5769554247266613,
"config... |
from django import forms
class LoginForm(forms.Form):
account = forms.CharField(label="", help_text="", max_length=100, widget=forms.TextInput(attrs={'placeholder': 'Username'}))
password = forms.CharField(label="", help_text="", widget=forms.PasswordInput(attrs={'placeholder': 'Password'}))
MODEL_CHOICES = (
(... | {
"repo_name": "DanAurea/Trisdanvalwen",
"path": "user/forms.py",
"copies": "2",
"size": "1571",
"license": "mit",
"hash": -7384313808848245000,
"line_mean": 40.3684210526,
"line_max": 148,
"alpha_frac": 0.6104392107,
"autogenerated": false,
"ratio": 3.279749478079332,
"config_test": false,
"h... |
from django import forms
class LoginForm(forms.Form):
username = forms.CharField(label = 'Username', max_length = 200, widget = forms.TextInput(attrs={'class': 'form-control', 'required': 'True'}))
password = forms.CharField(widget = forms.PasswordInput(attrs={'class': 'form-control', 'required': 'True'}))
cl... | {
"repo_name": "robertohueso/django_contacts",
"path": "contacts/forms.py",
"copies": "1",
"size": "1200",
"license": "mit",
"hash": -1123237336265314700,
"line_mean": 79,
"line_max": 167,
"alpha_frac": 0.6966666667,
"autogenerated": false,
"ratio": 3.8095238095238093,
"config_test": false,
"h... |
from django import forms
class LoginForm(forms.Form):
username = forms.CharField(label='Username', max_length=24)
password = forms.CharField(
label='Password', max_length=100,
widget=forms.PasswordInput,
)
class SearchForm(forms.Form):
search_query = forms.CharField(max_length=100, re... | {
"repo_name": "Charleo85/SIS-Rebuild",
"path": "web/web/forms.py",
"copies": "2",
"size": "3026",
"license": "bsd-3-clause",
"hash": 5503977222104164000,
"line_mean": 37.7948717949,
"line_max": 100,
"alpha_frac": 0.6599471249,
"autogenerated": false,
"ratio": 3.8207070707070705,
"config_test": ... |
from django import forms
class LoginForm(forms.Form):
user_name = forms.CharField(label='Username:',
max_length='50',
required=True, strip=True,
widget=forms.TextInput(attrs={
'class'... | {
"repo_name": "XinHeCS/shanghaiTechTSmatching",
"path": "TSmatching/model/forms.py",
"copies": "1",
"size": "5180",
"license": "mit",
"hash": 3934133000984233500,
"line_mean": 48.9494949495,
"line_max": 111,
"alpha_frac": 0.494538835,
"autogenerated": false,
"ratio": 4.15811606391926,
"config_t... |
from django import forms
class LoginForm(forms.Form):
username = forms.CharField(widget=forms.TextInput(attrs={'class' : 'txt-box1', 'autocomplete':'OFF', 'placeholder':'Email Address'}),max_length = 50)
password = forms.CharField(widget=forms.PasswordInput(render_value=False,attrs={'class' : 'txt-box1', 'auto... | {
"repo_name": "hughsons/saltwaterfish",
"path": "forms_bkp.py",
"copies": "1",
"size": "5936",
"license": "bsd-3-clause",
"hash": -3701303359880951300,
"line_mean": 58.9595959596,
"line_max": 192,
"alpha_frac": 0.7228773585,
"autogenerated": false,
"ratio": 3.4897119341563787,
"config_test": fa... |
from django import forms
class LoginFrom(forms.Form):
login_id = forms.CharField(label="Your Name",max_length=100)
login_password = forms.CharField(label="Your Password",widget=forms.PasswordInput,max_length=100)
class SignUpForm(forms.Form):
signup_id = forms.CharField(label="",max_length=100,widget=form... | {
"repo_name": "meliora000/eb_django_app",
"path": "django_eb/users/forms.py",
"copies": "1",
"size": "1100",
"license": "mit",
"hash": -4235937922263017500,
"line_mean": 77.5714285714,
"line_max": 167,
"alpha_frac": 0.7390909091,
"autogenerated": false,
"ratio": 3.8461538461538463,
"config_test... |
from django import forms
class MakeProjectForm(forms.Form):
# Make project should be implemented in team page,
# not in form field
# team name automatically need to be set
projects_project_name = forms.CharField(
max_length = 64,
required ... | {
"repo_name": "buildbuild/buildbuild",
"path": "buildbuild/projects/forms.py",
"copies": "1",
"size": "1052",
"license": "bsd-3-clause",
"hash": -5847975693791903000,
"line_mean": 29.0571428571,
"line_max": 55,
"alpha_frac": 0.4201520913,
"autogenerated": false,
"ratio": 5.655913978494624,
"con... |
from django import forms
class MakeTeamForm(forms.Form):
teams_team_name = forms.CharField(
label="Team Name",
max_length = 64,
required=True,
widget=forms.TextInput(
attrs={
... | {
"repo_name": "buildbuild/buildbuild",
"path": "buildbuild/teams/forms.py",
"copies": "1",
"size": "1526",
"license": "bsd-3-clause",
"hash": 5463285894004220000,
"line_mean": 39.1578947368,
"line_max": 89,
"alpha_frac": 0.3040629096,
"autogenerated": false,
"ratio": 6.904977375565611,
"config_... |
from django import forms
class MessageForm(forms.Form):
title = forms.CharField(label='', widget=forms.TextInput(
attrs={'placeholder': ' Title', 'class': 'textinput'}), max_length=70)
content = forms.CharField(label='', widget=forms.TextInput(
attrs={'placeholder': ' Message content', 'class': 'textinput'... | {
"repo_name": "suomiy/message-board",
"path": "board/forms.py",
"copies": "1",
"size": "1327",
"license": "mit",
"hash": -774796773923535400,
"line_mean": 54.3333333333,
"line_max": 111,
"alpha_frac": 0.7128862095,
"autogenerated": false,
"ratio": 3.780626780626781,
"config_test": false,
"has... |
from django import forms
class MyCheckboxSelectMultiple(forms.CheckboxSelectMultiple):
def render(self, name, value, attrs=None, choices=()):
html = super(MyCheckboxSelectMultiple, self).render(name, value, attrs, choices)
return mark_safe(html.replace('<ul>', '<ul class="foobar">'))
class OSDCFo... | {
"repo_name": "opencloudconsortium/tukey-portal",
"path": "tukey/webforms/forms.py",
"copies": "2",
"size": "4419",
"license": "apache-2.0",
"hash": -8282889279618516000,
"line_mean": 70.2741935484,
"line_max": 116,
"alpha_frac": 0.7073998642,
"autogenerated": false,
"ratio": 3.5408653846153846,
... |
from django import forms
class OtpForm(forms.Form):
token = forms.IntegerField(widget=forms.NumberInput(attrs={'placeholder': 'otp', 'class': 'form-control'}))
phone = forms.IntegerField(widget=forms.NumberInput(attrs={'placeholder': 'mobile', 'class': 'form-control'}))
def __init__(self, request=None, *a... | {
"repo_name": "gladsonvm/otpsimple",
"path": "OtpForm.py",
"copies": "1",
"size": "1587",
"license": "mit",
"hash": 7374194039342878000,
"line_mean": 35.0681818182,
"line_max": 114,
"alpha_frac": 0.5904221802,
"autogenerated": false,
"ratio": 4.220744680851064,
"config_test": false,
"has_no_k... |
from django import forms
class PaperGenerateForm(forms.Form):
# Chapter = forms.ModelMultipleChoiceField(choices={'', 'Chapter1', 'chapter2',''})
SelectNum = forms.IntegerField()
CheckNum = forms.IntegerField()
Difficulty = forms.FloatField()
PaperName = forms.CharField()
DeadLine = forms.DateTi... | {
"repo_name": "yuanpengX/SE-NE",
"path": "djcode/teacher/form.py",
"copies": "1",
"size": "1646",
"license": "mit",
"hash": 6223649144785778000,
"line_mean": 37.3023255814,
"line_max": 108,
"alpha_frac": 0.6792223572,
"autogenerated": false,
"ratio": 3.690582959641256,
"config_test": false,
"... |
from django import forms
class ParticipantForm(forms.ModelForm):
name = forms.CharField(max_length=100, required=True)
age = forms.CharField(max_length=3, required=True)
UMM_YES = "YES"
SAY_NO = "NO"
YES_NO_CHOICES = ((UMM_YES, 'Yes'), (SAY_NO, "No"))
siblings = forms.CharField(max_length=3,
... | {
"repo_name": "mczabaj/hms_udn",
"path": "participants/forms.py",
"copies": "1",
"size": "1146",
"license": "mit",
"hash": 9175603315354345000,
"line_mean": 38.5172413793,
"line_max": 102,
"alpha_frac": 0.5907504363,
"autogenerated": false,
"ratio": 3.6265822784810124,
"config_test": false,
"... |
from django import forms
class QuerySearchForm(forms.Form):
text = forms.CharField(required=False)
concept = forms.CharField(required=False)
limit = forms.IntegerField(required=False)
neg = forms.BooleanField(required=False)
def clean(self):
cleaned_data = super(QuerySearchForm, self).clean... | {
"repo_name": "acthp/ucsc-xena-client",
"path": "ties/forms.py",
"copies": "2",
"size": "1129",
"license": "apache-2.0",
"hash": -4515050404905101300,
"line_mean": 40.8148148148,
"line_max": 90,
"alpha_frac": 0.6634189548,
"autogenerated": false,
"ratio": 4.1054545454545455,
"config_test": fals... |
from django import forms
class Rechnung2PdfForm(forms.Form):
firm = forms.CharField(max_length=50, initial='scholarium')
author = forms.CharField(max_length=50, initial='Georg A. Schabetsberger')
recipent = forms.CharField(initial='''Max Mustermann
Holsteinische Str. 777
10717 Berlin
Deutschland''', widget... | {
"repo_name": "wmles/scholarium.at",
"path": "Workflow/forms.py",
"copies": "1",
"size": "1173",
"license": "mit",
"hash": -7406812326936118000,
"line_mean": 47.75,
"line_max": 181,
"alpha_frac": 0.7239316239,
"autogenerated": false,
"ratio": 3.2231404958677685,
"config_test": false,
"has_no_... |
from django import forms
class RichTextWidget(forms.Textarea):
"""
A CKEditor version of forms.Textarea designed for the Django admin.
Must be used with RichTextField below for good results.
"""
class Media:
js = ('ghu_global/bower/ckeditor/ckeditor.js',)
# Hide the <label> for CKE... | {
"repo_name": "global-humanitarians-unite/ghu",
"path": "ghu_web/ghu_global/forms.py",
"copies": "1",
"size": "2876",
"license": "apache-2.0",
"hash": -843295106020924400,
"line_mean": 34.95,
"line_max": 81,
"alpha_frac": 0.611961057,
"autogenerated": false,
"ratio": 3.92896174863388,
"config_t... |
from django import forms
class ScreenOneForm(forms.Form):
fichierData = forms.FileField(required=True)
n = forms.CharField(label="Choose n observations",
required = True,
widget=forms.TextInput(attrs={'class': 'input-control text', 'placeholder': 'Choose n observations'}))
k = forms.CharField(label="Choose k... | {
"repo_name": "Altraya/detection_spam",
"path": "detection_spam_project/clustering/form.py",
"copies": "1",
"size": "2180",
"license": "mit",
"hash": 1608206498272957700,
"line_mean": 29.2916666667,
"line_max": 183,
"alpha_frac": 0.6064220183,
"autogenerated": false,
"ratio": 2.531939605110337,
... |
from django import forms
class SearchForm(forms.Form):
NUM_STOP_CODES = 5
DURATION = 45
RESULTS = 20
result_number = forms.IntegerField(
required=False, widget=forms.TextInput(attrs={
'placeholder': 'Number of Results', 'class': 'form-control'}))
duration = forms.IntegerField(
... | {
"repo_name": "awylie/navigator",
"path": "navigator/forms.py",
"copies": "1",
"size": "1134",
"license": "mit",
"hash": -4474869906845381000,
"line_mean": 30.5,
"line_max": 77,
"alpha_frac": 0.6216931217,
"autogenerated": false,
"ratio": 4.0355871886121,
"config_test": false,
"has_no_keyword... |
from django import forms
class SignUpForm(forms.Form):
password = forms.CharField(widget=forms.PasswordInput(
attrs={'placeholder':'Password'}))
email = forms.EmailField(widget=forms.TextInput(
attrs={'placeholder':'Email'}),
... | {
"repo_name": "amagnus/pulsegig",
"path": "app/forms.py",
"copies": "1",
"size": "1080",
"license": "mit",
"hash": 2048345417655847200,
"line_mean": 40.5769230769,
"line_max": 79,
"alpha_frac": 0.5009259259,
"autogenerated": false,
"ratio": 5.167464114832536,
"config_test": false,
"has_no_key... |
from django import forms
class SpeciesGeoCoderForm(forms.Form):
name = forms.CharField(max_length=100, initial='SpeciesGeoCoder job', help_text='Job name')
localities = forms.FileField(
help_text='Select a file containing locality data',
label='Localities',
required=True)
... | {
"repo_name": "BILS/agda",
"path": "agda/species_geo_coder/forms.py",
"copies": "1",
"size": "1365",
"license": "mit",
"hash": 3605325377899971600,
"line_mean": 51.5,
"line_max": 286,
"alpha_frac": 0.6622710623,
"autogenerated": false,
"ratio": 4.580536912751678,
"config_test": false,
"has_no... |
from django import forms
class StepControlForm(forms.Form):
skip_steps = forms.MultipleChoiceField(choices=[], required=False)
desired_step = forms.ChoiceField(choices=[], required=False)
def __init__(self, **kwargs):
available_steps = kwargs.pop('available_steps', [])
super(StepContro... | {
"repo_name": "webcube/django-hyperadmin",
"path": "hyperadmin/resources/wizard/forms.py",
"copies": "2",
"size": "1288",
"license": "bsd-3-clause",
"hash": 4432321737424474600,
"line_mean": 41.9333333333,
"line_max": 80,
"alpha_frac": 0.6296583851,
"autogenerated": false,
"ratio": 4.128205128205... |
from django import forms
class SwitchWidget(forms.CheckboxInput):
template_name = "petition/widgets/SwitchInput.html"
def get_context(self, name, value, attrs):
if attrs == None:
attrs = {}
if 'class' in attrs:
attrs['class'] = attrs['class'] + " custom-control-input"
... | {
"repo_name": "fallen/Pytition",
"path": "pytition/petition/widgets.py",
"copies": "1",
"size": "1226",
"license": "bsd-3-clause",
"hash": 2608574470137863700,
"line_mean": 32.1621621622,
"line_max": 71,
"alpha_frac": 0.5954323002,
"autogenerated": false,
"ratio": 3.8193146417445485,
"config_te... |
from django import forms
class UpdateUserForm(forms.Form):
nickname = forms.CharField(
label="Nickname",
required=False,
max_length=50,
)
avatar = forms.ImageField(
required=False,
)
phone_number = forms.CharField(
max_length=20,
required=False
... | {
"repo_name": "teknologkoren/Strequelistan",
"path": "EmailUser/forms.py",
"copies": "1",
"size": "1223",
"license": "mpl-2.0",
"hash": 2452745766548728000,
"line_mean": 21.9056603774,
"line_max": 98,
"alpha_frac": 0.5799011532,
"autogenerated": false,
"ratio": 3.602373887240356,
"config_test":... |
from django import forms
class UploadFileForm(forms.Form):
CHOICES=[('upload','upload'),
('delete','delete')]
class DeleteFileForm(forms.Form):
CHOICES=[('upload','upload'),
('delete','delete')]
uploadDelete = forms.ChoiceField(choices=CHOICES, widget=forms.RadioSelect())
class AddCollaboratorForm(forms.Form... | {
"repo_name": "jnayak1/cs3240-s16-team16",
"path": "reports/forms.py",
"copies": "1",
"size": "1532",
"license": "mit",
"hash": -4062894648254527000,
"line_mean": 28.4615384615,
"line_max": 78,
"alpha_frac": 0.7493472585,
"autogenerated": false,
"ratio": 3.4272930648769573,
"config_test": false... |
from django import forms
class ValidatorForm(forms.Form):
jsondata = forms.CharField(label='Data', required=True,
widget=forms.Textarea(attrs={'cols':100, 'rows':20}))
class RegisterForm(forms.Form):
username = forms.CharField(max_length=200, label='Name')
email = forms.EmailField(max_length=... | {
"repo_name": "daafgo/Server_LRS",
"path": "lrs/forms.py",
"copies": "4",
"size": "1343",
"license": "apache-2.0",
"hash": -8506157450876508000,
"line_mean": 42.3548387097,
"line_max": 85,
"alpha_frac": 0.644080417,
"autogenerated": false,
"ratio": 3.973372781065089,
"config_test": false,
"ha... |
from django import forms
COLORS_CHOICES = (('aqua', 'Aqua'),
('green', 'Green'),
('red', 'Red'),
('white', 'White'))
CHOICES = (('Gratuito', 'Gratuito'),
('2 euros', '2 euros'),
('5 euros', '5 euros'))
class LoginForm(forms.Form):
... | {
"repo_name": "jperaltar/2015-sat-pfinal",
"path": "cultural/forms.py",
"copies": "1",
"size": "1114",
"license": "apache-2.0",
"hash": 1020658934502551900,
"line_mean": 41.8846153846,
"line_max": 108,
"alpha_frac": 0.6678635548,
"autogenerated": false,
"ratio": 3.6286644951140063,
"config_test... |
from django import forms
date_options = [('1', 'hourly'), ('24', 'daily'), ('168', 'weekly')]
class WatchThread(forms.Form):
reddit_thread_url = forms.URLField(label='', max_length=500, widget=forms.TextInput(attrs={'placeholder':
'e.g. https://www.reddit.com/r/learnpython/... | {
"repo_name": "ericleepa/watcherforreddit",
"path": "redditpoller/forms.py",
"copies": "1",
"size": "1414",
"license": "mit",
"hash": 8640985419162436000,
"line_mean": 53.3846153846,
"line_max": 120,
"alpha_frac": 0.572135785,
"autogenerated": false,
"ratio": 4.546623794212219,
"config_test": f... |
from django import forms
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', # '25 Oct 2006', '25 Oct, 2006'
'%B %d %Y', '%B %d, %Y', ... | {
"repo_name": "yakky/django-localflavor",
"path": "localflavor/generic/forms.py",
"copies": "1",
"size": "2168",
"license": "bsd-3-clause",
"hash": 3027335790563221500,
"line_mean": 41.5098039216,
"line_max": 104,
"alpha_frac": 0.5401291513,
"autogenerated": false,
"ratio": 3.062146892655367,
"... |
from django import forms
def generate_form(model, form=None, fields=False, exclude=False):
"""
Generate a form from a model.
:param model: A Django model.
:param form: A Django form.
:param fields: A list of fields to include in this form.
:param exclude: A list of fields to exclude in this fo... | {
"repo_name": "marco-lancini/Showcase",
"path": "respite/utils.py",
"copies": "1",
"size": "1797",
"license": "mit",
"hash": 8786677820640126000,
"line_mean": 25.4264705882,
"line_max": 78,
"alpha_frac": 0.5637173066,
"autogenerated": false,
"ratio": 4.140552995391705,
"config_test": false,
"... |
from django import forms
def get_fieldsets_attr(sets, cache_attr='_fieldsets'):
"""
Get a form attribute for getting groups of (bound) fields.
class MyForm(forms.Form):
first_name = forms.Charfield()
last_name = forms.Charfield()
email = forms.Charfield()
phone = forms.Charfield()
SETS = {
'':... | {
"repo_name": "artminster/artminster",
"path": "core/utils/form_utils.py",
"copies": "1",
"size": "1268",
"license": "mit",
"hash": 4576657343132841500,
"line_mean": 25.4166666667,
"line_max": 83,
"alpha_frac": 0.6348580442,
"autogenerated": false,
"ratio": 3.2596401028277633,
"config_test": fa... |
from django import forms
def get_form_choices(registration_question):
"""Takes a RegistrationQuestion object and returns a list of
properly formatted choices for a ChoiceField. Namely, a list of
tuples.
"""
raw_choices = registration_question.question_choice_set.all()
return [(str(rc.id), rc.ch... | {
"repo_name": "michaelwisely/django-competition",
"path": "src/competition/forms/registration_forms.py",
"copies": "1",
"size": "1781",
"license": "bsd-3-clause",
"hash": 4886673949785332000,
"line_mean": 30.8035714286,
"line_max": 67,
"alpha_frac": 0.6327905671,
"autogenerated": false,
"ratio": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.