text
stringlengths
0
1.05M
meta
dict
from django import forms from rango.models import Page, Category from django.contrib.auth.models import User from rango.models import UserProfile #note User and UserProfile classes are imported from different locations # a form for the class 'Category' class CategoryForm(forms.ModelForm): name = forms.CharField(ma...
{ "repo_name": "comsaint/tango", "path": "rango/forms.py", "copies": "1", "size": "3514", "license": "mit", "hash": -678304586377251300, "line_mean": 47.8055555556, "line_max": 163, "alpha_frac": 0.6781445646, "autogenerated": false, "ratio": 4.442477876106195, "config_test": false, "has_no_ke...
from django import forms from rango.models import Page,Category from rango.models import UserProfile from django.contrib.auth.models import User class CategoryForm(forms.ModelForm): name = forms.CharField(max_length=128,help_text="Please enter the category name") views = forms.IntegerField(widget=forms.HiddenI...
{ "repo_name": "PJEstrada/rango", "path": "tango_with_django_project/rango/forms.py", "copies": "1", "size": "2385", "license": "mit", "hash": -1417780089210054000, "line_mean": 38.75, "line_max": 107, "alpha_frac": 0.6805031447, "autogenerated": false, "ratio": 4.097938144329897, "config_test":...
from django import forms from rango.models import Page, Category from rango.models import UserProfile from django.contrib.auth.models import User class CategoryForm(forms.ModelForm): name = forms.CharField(max_length=128, help_text="Please enter the category name.") views = forms.IntegerField(widget=forms.HiddenInpu...
{ "repo_name": "Kentoseth/rangoapp", "path": "tango_with_django_project/rango/forms.py", "copies": "1", "size": "1390", "license": "mit", "hash": -8540577485017929000, "line_mean": 29.2173913043, "line_max": 84, "alpha_frac": 0.7237410072, "autogenerated": false, "ratio": 3.6010362694300517, "co...
from django import forms from rango.models import Page, Category 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(), ...
{ "repo_name": "jonellalvi/tango_with_django", "path": "rango/forms.py", "copies": "1", "size": "1521", "license": "mit", "hash": 8321222600027504000, "line_mean": 40.1081081081, "line_max": 92, "alpha_frac": 0.6594345825, "autogenerated": false, "ratio": 4.213296398891967, "config_test": false,...
from django import forms from rango.models import Page, Category 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(w...
{ "repo_name": "cclai999/rango", "path": "tango_with_django_project/rango/forms.py", "copies": "1", "size": "1909", "license": "mit", "hash": 4137717937038552600, "line_mean": 39.6170212766, "line_max": 80, "alpha_frac": 0.6233630173, "autogenerated": false, "ratio": 4.388505747126437, "config_t...
from django import forms from rango.models import Page, Category, UserProfile from django.contrib.auth.models import User 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) ...
{ "repo_name": "JBAnderson/Django-CherryPy-PyInstaller-Standalone", "path": "Standalone_py/rango/forms.py", "copies": "3", "size": "1457", "license": "mit", "hash": 496777842867461440, "line_mean": 37.3684210526, "line_max": 97, "alpha_frac": 0.7021276596, "autogenerated": false, "ratio": 4.127478...
from django import forms from rango.models import Page, Category, UserProfile from django.contrib.auth.models import User 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) like...
{ "repo_name": "santumahapatra/tango-with-django", "path": "tango_with_django_project/rango/forms.py", "copies": "1", "size": "1623", "license": "mit", "hash": 1492282207748729600, "line_mean": 34.3043478261, "line_max": 96, "alpha_frac": 0.7104128158, "autogenerated": false, "ratio": 3.9202898550...
from django import forms from rango.models import Page, Category, UserProfile from django.contrib.auth.models import User 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) ...
{ "repo_name": "clex25/rango-tango", "path": "tango_with_django_project/rango/forms.py", "copies": "1", "size": "1549", "license": "unlicense", "hash": 6882347627330504000, "line_mean": 32.6956521739, "line_max": 91, "alpha_frac": 0.6371852808, "autogenerated": false, "ratio": 4.220708446866485, ...
from django import forms from rango.models import Page, Category, UserProfile from django.contrib.auth.models import User class CategoryForm(forms.ModelForm): name = forms.CharField(max_length=128, help_text='Enter the Category name.') views = forms.IntegerField(widget=forms.HiddenInput(), initial=0) likes = forms....
{ "repo_name": "douglasbgatti/rango-tutorial", "path": "tango_with_django_project/rango/forms.py", "copies": "1", "size": "1953", "license": "apache-2.0", "hash": 2064247909250346800, "line_mean": 30.5161290323, "line_max": 82, "alpha_frac": 0.7019969278, "autogenerated": false, "ratio": 3.7630057...
from django import forms from rango.models import Page, Category, UserProfile from django.contrib.auth.models import User 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) ...
{ "repo_name": "matheuskiser/pdx_code_guild", "path": "django/tango_with_django_project/rango/forms.py", "copies": "1", "size": "2179", "license": "mit", "hash": -7429226732442634000, "line_mean": 35.3333333333, "line_max": 92, "alpha_frac": 0.6571821937, "autogenerated": false, "ratio": 4.2978303...
from django import forms from rango.models import Page, Category, UserProfile 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.Hi...
{ "repo_name": "jxltom/tango_with_django_19", "path": "code/tango_with_django_project/rango/forms.py", "copies": "2", "size": "2036", "license": "apache-2.0", "hash": -6401929006588838000, "line_mean": 38.9411764706, "line_max": 92, "alpha_frac": 0.6561886051, "autogenerated": false, "ratio": 4.31...
from django import forms from rango.models import Page, Category, User, UserProfile 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=fo...
{ "repo_name": "chenlihan/tango_with_django_project", "path": "rango/forms.py", "copies": "1", "size": "2225", "license": "bsd-2-clause", "hash": -4987156777730288000, "line_mean": 39.4727272727, "line_max": 98, "alpha_frac": 0.6647191011, "autogenerated": false, "ratio": 4.2870905587668595, "co...
from django import forms from rango.models import Tapas, Bares from django.contrib.auth.models import User from rango.models import UserProfile class TapasForm(forms.ModelForm): nombre_tapa = forms.CharField(max_length=128, help_text="Por favor introduce el nombre de la tapa.") votos = forms.IntegerField(widge...
{ "repo_name": "sn1k/Vinos", "path": "rango/forms.py", "copies": "1", "size": "1827", "license": "mit", "hash": -4914050688881663000, "line_mean": 38.7173913043, "line_max": 104, "alpha_frac": 0.684729064, "autogenerated": false, "ratio": 4.033112582781457, "config_test": false, "has_no_keywor...
from django import forms from rapidsms.backends.http.forms import BaseHttpForm import logging logger = logging.getLogger('envaya_nexmo.forms.EnvayaSMSIncomingForm') class EnvayaSMSIncomingForm(BaseHttpForm): '''handles validation and cleaning up of incoming message''' def __init__(self, *args, **kwargs): ...
{ "repo_name": "fortyplustwo/envaya_nexmo", "path": "forms.py", "copies": "1", "size": "3354", "license": "apache-2.0", "hash": 8273817271608648000, "line_mean": 39.4096385542, "line_max": 131, "alpha_frac": 0.6219439475, "autogenerated": false, "ratio": 4.115337423312884, "config_test": false, ...
from django import forms from rapidsms.contrib.locations.models import Location from survey.models import HouseholdMemberGroup, QuestionModule, Question, Batch, Survey, EnumerationArea MAX_NUMBER_OF_QUESTION_DISPLAYED_PER_PAGE = 1000 DEFAULT_NUMBER_OF_QUESTION_DISPLAYED_PER_PAGE =20 class QuestionFilterForm(forms.Form...
{ "repo_name": "antsmc2/mics", "path": "survey/forms/filters.py", "copies": "2", "size": "4598", "license": "bsd-3-clause", "hash": -3315976465036297700, "line_mean": 54.4096385542, "line_max": 142, "alpha_frac": 0.6916050457, "autogenerated": false, "ratio": 3.7050765511684127, "config_test": f...
from django import forms from realms.forms import RealmForm class OpenIDConnectRealmForm(RealmForm): login_session_expiry = forms.IntegerField( required=False, min_value=0, max_value=1296000, help_text="Session expiry in seconds. If value is 0, the user’s session" " cookie will e...
{ "repo_name": "zentralopensource/zentral", "path": "server/realms/backends/openidc/forms.py", "copies": "1", "size": "1908", "license": "apache-2.0", "hash": -7633870057122889000, "line_mean": 39.4680851064, "line_max": 95, "alpha_frac": 0.5867507886, "autogenerated": false, "ratio": 4.0728051391...
from django import forms from registration.forms import RegistrationForm from django.contrib.auth.models import User from django.core.validators import validate_email class RegistrationForm(forms.Form): """ Form for registering a new user account for an email address. Validates that the requested emai...
{ "repo_name": "OpenHumans/django_study_enrollment", "path": "users/forms.py", "copies": "2", "size": "1658", "license": "mit", "hash": 2264300584078672400, "line_mean": 37.5581395349, "line_max": 84, "alpha_frac": 0.6284680338, "autogenerated": false, "ratio": 4.791907514450867, "config_test": ...
from django import forms from registration.forms import RegistrationForm from django.contrib.auth.models import User from models import UserProfile from models import * class Registration(RegistrationForm): picture = forms.ImageField(required=False) bio = forms.CharField(widget=forms.Textarea(),required=False)...
{ "repo_name": "RetroMelon/PatchWords", "path": "patchwords_project/patchwords/forms.py", "copies": "1", "size": "1944", "license": "mit", "hash": -3432645579859148300, "line_mean": 34.3454545455, "line_max": 130, "alpha_frac": 0.6553497942, "autogenerated": false, "ratio": 3.9754601226993866, "...
from django import forms from registration.forms import RegistrationForm from django.contrib.auth.models import User import re from models import UserProfile, Country from scipy_central.utils import rest_help_extra rest_help = ('Tell the community a bit more about yourself. ') + rest_help_extra class ProfileEditForm...
{ "repo_name": "oswalpalash/OctaveCodeShare", "path": "scipy_central/person/forms.py", "copies": "5", "size": "3731", "license": "bsd-3-clause", "hash": 419986166296355100, "line_mean": 42.8941176471, "line_max": 80, "alpha_frac": 0.5821495578, "autogenerated": false, "ratio": 4.555555555555555, ...
from django import forms from registration.forms import RegistrationForm from .models import Course, Feedback, Lecture class RegistrationFormBhamMail(RegistrationForm): good_domains = ['cs.bham.ac.uk'] def clean_email(self): email_domain = self.cleaned_data['email'].split('@')[1] if email_do...
{ "repo_name": "oss6/cs-key-skills", "path": "key_skills/forms.py", "copies": "1", "size": "1333", "license": "mit", "hash": -1507432181960178400, "line_mean": 30.7619047619, "line_max": 150, "alpha_frac": 0.632408102, "autogenerated": false, "ratio": 4.218354430379747, "config_test": false, "...
from django import forms from registration.forms import RegistrationForm from .models import PropertyType, SearchPrice class SearchForm(forms.Form): def __init__(self, *args, **kwargs): super(SearchForm, self).__init__(*args, **kwargs) self.fields['min_price'] = forms.ChoiceField( choi...
{ "repo_name": "bertnotbob/django-property", "path": "homes/forms.py", "copies": "1", "size": "2148", "license": "mit", "hash": 2628841758229415400, "line_mean": 41.137254902, "line_max": 117, "alpha_frac": 0.6303538175, "autogenerated": false, "ratio": 3.74869109947644, "config_test": false, ...
from django import forms from registration.models import RegisteredUser from django.contrib.auth.forms import AuthenticationForm from django.conf import settings from macaddress.formfields import MACAddressField from network.models import VLAN class OverrideVerificationForm(forms.Form): vlan = forms.ModelChoice...
{ "repo_name": "BCGamer/CheckIn-Server", "path": "registration/forms.py", "copies": "1", "size": "4444", "license": "mit", "hash": -190412951973695580, "line_mean": 29.8680555556, "line_max": 102, "alpha_frac": 0.6543654365, "autogenerated": false, "ratio": 3.9537366548042705, "config_test": fal...
from django import forms from reservations.models import * class ReservationForm(forms.ModelForm): class Meta: model = Reservation # To limit the set of displayed fields use: # exclude = ['start_time', 'end_time'] # (or list the needed ones with "fields = ") ## To hide certain fields, we use widgets: ## h...
{ "repo_name": "Nonse/Feel_Like", "path": "reservations/forms.py", "copies": "1", "size": "3566", "license": "apache-2.0", "hash": 7915626266274728000, "line_mean": 24.2907801418, "line_max": 95, "alpha_frac": 0.5695457095, "autogenerated": false, "ratio": 3.9186813186813185, "config_test": fals...
from django import forms from rest_framework import status from rest_framework.decorators import action from rest_framework.response import Response from taggit.forms import TagField from onadata.apps.logger.models import XForm from onadata.libs.models.signals import xform_tags_add, xform_tags_delete class TagForm(f...
{ "repo_name": "piqoni/onadata", "path": "onadata/libs/mixins/labels_mixin.py", "copies": "10", "size": "2657", "license": "bsd-2-clause", "hash": -2546406843681749000, "line_mean": 28.8539325843, "line_max": 79, "alpha_frac": 0.663153933, "autogenerated": false, "ratio": 3.8507246376811595, "co...
from django import forms from rest_framework import status from rest_framework.decorators import detail_route from rest_framework.response import Response from taggit.forms import TagField from onadata.apps.logger.models import XForm from onadata.libs.models.signals import xform_tags_add, xform_tags_delete class Tag...
{ "repo_name": "awemulya/fieldsight-kobocat", "path": "onadata/libs/mixins/labels_mixin.py", "copies": "1", "size": "2669", "license": "bsd-2-clause", "hash": -5101078153799030000, "line_mean": 28.9887640449, "line_max": 85, "alpha_frac": 0.6639190708, "autogenerated": false, "ratio": 3.8458213256...
from django import forms from RouteFinder.models import Request from datetimewidget.widgets import DateTimeWidget from django.contrib.admin import widgets from django.utils import timezone import datetime class RequestForm(forms.ModelForm): ideal_time = forms.DateTimeField(widget=DateTimeWidget(usel10n=True, ...
{ "repo_name": "MatthewGWilliams/Staff-Transport", "path": "emergencyTransport/RouteFinder/forms.py", "copies": "1", "size": "1707", "license": "mit", "hash": 6897288282994024000, "line_mean": 64.6538461538, "line_max": 238, "alpha_frac": 0.4862331576, "autogenerated": false, "ratio": 4.6895604395...
from django import forms from rq import requeue_job, cancel_job class ActionForm(forms.Form): def clean(self): actions = [key for key in self.cleaned_data if self.cleaned_data[key]] if len(actions) != 1: raise forms.ValidationError('Only one action at a time') return actions[0]...
{ "repo_name": "spapas/django-rq-dashboard", "path": "django_rq_dashboard/forms.py", "copies": "4", "size": "1868", "license": "bsd-3-clause", "hash": 340868046642025800, "line_mean": 29.6229508197, "line_max": 78, "alpha_frac": 0.6172376874, "autogenerated": false, "ratio": 3.8122448979591836, ...
from django import forms from sanetime import time from webinars_web.webinars.widgets import SplitSaneTimeWidget class SplitSaneTimeField(forms.SplitDateTimeField): widget = SplitSaneTimeWidget #hidden_widget = SplitHiddenDateTimeWidget #default_error_messages = { #'invalid_date': _(u'Enter a valid...
{ "repo_name": "prior/webinars", "path": "webinars_web/webinars/fields.py", "copies": "1", "size": "1369", "license": "apache-2.0", "hash": 2751376738077094000, "line_mean": 30.8372093023, "line_max": 67, "alpha_frac": 0.6223520818, "autogenerated": false, "ratio": 3.7, "config_test": false, "...
from django import forms from satchmo.configuration import * import logging log = logging.getLogger('configuration') class SettingsEditor(forms.Form): "Base editor, from which customized forms are created" def __init__(self, *args, **kwargs): settings = kwargs.pop('settings') super(SettingsE...
{ "repo_name": "roadhead/satchmo", "path": "satchmo/configuration/forms.py", "copies": "2", "size": "1323", "license": "bsd-3-clause", "hash": -461282701102737000, "line_mean": 33.8421052632, "line_max": 74, "alpha_frac": 0.5419501134, "autogenerated": false, "ratio": 4.708185053380783, "config_...
from django import forms from satchmo.contact import signals import logging log = logging.getLogger('contact.listeners') def au_postcode_validator(sender, postcode=None, country=None, **kwargs): if country.iso2_code == 'AU': from satchmo.l10n.validators import aupostcode try: pc = aupo...
{ "repo_name": "roadhead/satchmo", "path": "satchmo/contact/listeners.py", "copies": "2", "size": "1904", "license": "bsd-3-clause", "hash": 5163259628879084000, "line_mean": 37.8571428571, "line_max": 87, "alpha_frac": 0.6769957983, "autogenerated": false, "ratio": 3.7928286852589643, "config_t...
from django import forms from satchmo.payment import signals from satchmo.payment.forms import SimplePayShipForm from satchmo.payment.modules.purchaseorder.models import PurchaseOrder from satchmo.utils import app_enabled from django.core.exceptions import ImproperlyConfigured class PurchaseorderPayShipForm(SimplePayS...
{ "repo_name": "roadhead/satchmo", "path": "satchmo/payment/modules/purchaseorder/forms.py", "copies": "2", "size": "1185", "license": "bsd-3-clause", "hash": 7045165461321983000, "line_mean": 46.4, "line_max": 155, "alpha_frac": 0.7248945148, "autogenerated": false, "ratio": 4.086206896551724, ...
from django import forms from satchmo_store.contact import signals import logging log = logging.getLogger('contact.listeners') def au_postcode_validator(sender, postcode=None, country=None, **kwargs): if country.iso2_code == 'AU': from l10n.validators import aupostcode try: pc = aupost...
{ "repo_name": "Ryati/satchmo", "path": "satchmo/apps/satchmo_store/contact/listeners.py", "copies": "13", "size": "1878", "license": "bsd-3-clause", "hash": 2449826893155652000, "line_mean": 37.3265306122, "line_max": 87, "alpha_frac": 0.6741214058, "autogenerated": false, "ratio": 3.848360655737...
from django import forms from satchmo_store.contact import signals import logging log = logging.getLogger('contact.listeners') def au_postcode_validator(sender, postcode=None, country=None, **kwargs): if country.iso2_code == 'AU': from l10n.validators import aupostcode try: pc = aupos...
{ "repo_name": "thoreg/satchmo", "path": "satchmo/apps/satchmo_store/contact/listeners.py", "copies": "1", "size": "2268", "license": "bsd-3-clause", "hash": -368174182119765950, "line_mean": 35, "line_max": 87, "alpha_frac": 0.6737213404, "autogenerated": false, "ratio": 3.910344827586207, "con...
from django import forms from schedule.models import Event import datetime import time class GlobalSplitDateTimeWidget(forms.SplitDateTimeWidget): def __init__(self, hour24 = False, attrs=None, *args, **kwargs): """ hour24 is a boolean. If set to true it will display like a normal SplitDate...
{ "repo_name": "indro/t2c", "path": "apps/external_apps/schedule/forms.py", "copies": "2", "size": "2370", "license": "mit", "hash": -708947611846500100, "line_mean": 38.5, "line_max": 128, "alpha_frac": 0.588185654, "autogenerated": false, "ratio": 4.324817518248175, "config_test": false, "ha...
from django import forms from schemes.models import Student_schemes class Student_schemesform(forms.ModelForm): uniform_1 =forms.BooleanField() uniform_2 =forms.BooleanField() # uniform_3 =forms.BooleanField(initial=True) # uniform_4 =forms.BooleanField(initial=True) # textbook =forms.BooleanF...
{ "repo_name": "mravikumar281/staging-server", "path": "schemes/forms.py", "copies": "2", "size": "1259", "license": "mit", "hash": -6751918793920060000, "line_mean": 36.0294117647, "line_max": 51, "alpha_frac": 0.7259729944, "autogenerated": false, "ratio": 3.681286549707602, "config_test": fal...
from django import forms from school_calendar.models import * from school_calendar.widgets import * from school_calendar.fields import * from dateutil import rrule DAY_CHOICES = ( (MO,"Monday"), (TU,"Tuesday"), (WE,"Wednesday"), (TH,"Thursday"), (FR,"Friday" ), (SA,"Saturday"), (SU,"Sunday"...
{ "repo_name": "alexkyllo/school-manager", "path": "school_manager/school_calendar/forms.py", "copies": "1", "size": "1723", "license": "apache-2.0", "hash": 5411460746160606000, "line_mean": 32.1346153846, "line_max": 145, "alpha_frac": 0.659315148, "autogenerated": false, "ratio": 3.820399113082...
from django import forms from seednetwork.forms import SeedNetworkBaseForm from seedlibrary.models import Event class SeedForm(SeedNetworkBaseForm): seed_type = forms.CharField(max_length=150, required=False, help_text="i.e. vegetable, herb, perennial, fruit bush, fruit tree, etc.") crop_type = forms.CharField(max_l...
{ "repo_name": "hackforwesternmass/seednetwork", "path": "seedlibrary/forms.py", "copies": "1", "size": "1324", "license": "mit", "hash": 6161287075518841000, "line_mean": 81.75, "line_max": 192, "alpha_frac": 0.7711480363, "autogenerated": false, "ratio": 3.2935323383084576, "config_test": fals...
from django import forms from seednetwork.forms import SeedNetworkBaseForm from seedlibrary.models import Event GRAIN_CHOICES = ( ('-','-'), ('amaranth','Amaranth'), ('barley', 'Barley'), ('buckwheat', 'Buckwheat'), ('corn', 'Corn'), # ('kaniwa', 'Kaniwa'), ('mil...
{ "repo_name": "RockinRobin/seednetwork", "path": "seedlibrary/forms.py", "copies": "1", "size": "6875", "license": "mit", "hash": 8639464489386260000, "line_mean": 68.4444444444, "line_max": 327, "alpha_frac": 0.6686545455, "autogenerated": false, "ratio": 3.133546034639927, "config_test": fals...
from django import forms from selectable.forms import AutoCompleteSelectField from selectable.forms import AutoCompleteSelectWidget from opendata.catalog.lookups import CityLookup, CountyLookup from .models import Request class SearchForm(forms.Form): text = forms.CharField(required=False) class RequestForm(fo...
{ "repo_name": "OpenData-NC/open-data-nc", "path": "opendata/requests/forms.py", "copies": "2", "size": "1046", "license": "mit", "hash": 2589960959071435300, "line_mean": 26.5263157895, "line_max": 69, "alpha_frac": 0.6567877629, "autogenerated": false, "ratio": 4.304526748971194, "config_test"...
from django import forms from sentry.web.forms.fields import OriginsField from sentry.testutils import TestCase, fixture class OriginsFieldTest(TestCase): @fixture def field(self): return OriginsField() def test_supports_wildcards(self): value = '*' result = self.field.clean(value...
{ "repo_name": "beni55/sentry", "path": "tests/sentry/web/forms/fields/tests.py", "copies": "4", "size": "1410", "license": "bsd-3-clause", "hash": -3529451312944135000, "line_mean": 31.0454545455, "line_max": 60, "alpha_frac": 0.6418439716, "autogenerated": false, "ratio": 3.960674157303371, "c...
from django import forms from server.models import Genre class StringListField(forms.CharField): def prepare_value(self, value): return ', '.join(value) def to_python(self, value): if not value: return [] return [item.strip() for item in value.split(',')] class PlayerF...
{ "repo_name": "filsif/jac_server", "path": "server/forms.py", "copies": "1", "size": "1604", "license": "apache-2.0", "hash": -2326169942715934700, "line_mean": 31.7551020408, "line_max": 89, "alpha_frac": 0.5816708229, "autogenerated": false, "ratio": 4.26595744680851, "config_test": false, ...
from django import forms from .settings import MAX_USERNAME_LENGTH, MAX_CONTENT_SIZE, MAX_PASSWORD_LENGTH, MIN_USERNAME_LENGTH, MIN_PASSWORD_LENGTH from .models import Language from django.contrib.auth.models import User class SnippetForm(forms.Form): content = forms.CharField(label='Content', max_length=MAX_CONT...
{ "repo_name": "andrewjenkins/code_bin", "path": "bin/forms.py", "copies": "1", "size": "1533", "license": "mit", "hash": 8062544725860560000, "line_mean": 41.5833333333, "line_max": 122, "alpha_frac": 0.6953685584, "autogenerated": false, "ratio": 3.900763358778626, "config_test": false, "has...
from django import forms from settingsobj import Settings settings = Settings() _form = None class Fieldset(object): def __init__(self, form, fields, name, verbose_name): self.form = form self.fields = fields self.name = name self.verbose_name = verbose_name def __iter...
{ "repo_name": "luxnovalabs/enjigo_door", "path": "web_interface/appsettings/forms.py", "copies": "1", "size": "1756", "license": "unlicense", "hash": -21997927384666670, "line_mean": 32.7692307692, "line_max": 85, "alpha_frac": 0.5666287016, "autogenerated": false, "ratio": 4.046082949308755, "...
from django import forms from skaba.models import Guild, UserProfile, Event from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm class EventForm(forms.ModelForm): class Meta: model = Event fields = ['name', 'description', 'slug', 'eventdate', 'points', ...
{ "repo_name": "Jonneitapuro/isoskaba2", "path": "skaba/forms.py", "copies": "1", "size": "4894", "license": "mit", "hash": 7293015762574195000, "line_mean": 37.8412698413, "line_max": 108, "alpha_frac": 0.6493665713, "autogenerated": false, "ratio": 3.793798449612403, "config_test": false, "h...
from django import forms #from SocialNetworkModels.models import Author,Posts, UserProfile from django.contrib.auth.models import User from SocialNetworkModels.models import AuthorProfile, Posts import datetime """ class AuthorForm(forms.ModelForm): author_username = forms.CharField(max_length=200, help_text = "...
{ "repo_name": "diego04/cmput410-project", "path": "Distributed_Social_Networking/SocialNetworkModels/forms.py", "copies": "1", "size": "1645", "license": "apache-2.0", "hash": -3352235254668750300, "line_mean": 29.462962963, "line_max": 89, "alpha_frac": 0.685106383, "autogenerated": false, "rati...
from django import forms from ssheepdog import models class AccessFilterForm(forms.Form): user = forms.CharField(label="User", required=False) login = forms.CharField(label="Login/Machine", required=False) class LoginForm(forms.ModelForm): named_application_key = forms.ModelChoiceField( required=F...
{ "repo_name": "SheepDogInc/ssheepdog", "path": "ssheepdog/forms.py", "copies": "1", "size": "1338", "license": "bsd-3-clause", "hash": 2866090936000317400, "line_mean": 34.2105263158, "line_max": 78, "alpha_frac": 0.644245142, "autogenerated": false, "ratio": 4.316129032258065, "config_test": f...
from django import forms from sslscout.models import Profile, SiteGroup, Site import re ### edit profile form class ProfileForm(forms.ModelForm): class Meta: model = Profile fields = ('first_name','last_name', 'country') ### add/edit sitegroup form class SiteGroupForm(forms.ModelForm): class ...
{ "repo_name": "tykling/sslscout", "path": "src/sslscout/forms.py", "copies": "1", "size": "2942", "license": "bsd-3-clause", "hash": 2072190062931902200, "line_mean": 31.6888888889, "line_max": 139, "alpha_frac": 0.5859959211, "autogenerated": false, "ratio": 4.371471025260029, "config_test": f...
from django import forms from ssn_demo.models import Page, Category, UserProfile from django.contrib.auth.models import User class vpnForm(forms.ModelForm): vpn_name = forms.CharField(label='vpn_name', max_length=100) # An inline class to provide additional information on the form. class Meta: fie...
{ "repo_name": "highway7/py_1", "path": "ssn_demo/forms.py", "copies": "1", "size": "1778", "license": "apache-2.0", "hash": 6320699617390821000, "line_mean": 36.8510638298, "line_max": 92, "alpha_frac": 0.6839145107, "autogenerated": false, "ratio": 4.253588516746412, "config_test": false, "h...
from django import forms from starbowmodweb.streams.models import StreamInfo, StreamingPlatform from starbowmodweb.streams.getstreamstatus import twitch_channel_exists class AddStreamForm(forms.ModelForm): channel_name = forms.RegexField(regex=r'^[a-zA-Z0-9]+[a-zA-Z0-9_]*$', mi...
{ "repo_name": "Starbow/StarbowWebSite", "path": "starbowmodweb/streams/forms.py", "copies": "1", "size": "1609", "license": "mit", "hash": -7153635391489842000, "line_mean": 46.3529411765, "line_max": 89, "alpha_frac": 0.577998757, "autogenerated": false, "ratio": 4.597142857142857, "config_tes...
from django import forms from steps.models import Users , Artist , Teacher , Student from django.contrib.auth.models import Group class UserSignupForm(forms.ModelForm): user_role = forms.ChoiceField(label =('Register as'),choices=(('','Register As'),('student','Student'),('artist','Artist'),('teacher','Teacher'...
{ "repo_name": "rajexp/stepMuzic", "path": "steps/forms.py", "copies": "1", "size": "4981", "license": "unlicense", "hash": 6773263305391961000, "line_mean": 53.7362637363, "line_max": 209, "alpha_frac": 0.6149367597, "autogenerated": false, "ratio": 3.7199402539208366, "config_test": false, "...
from django import forms from store_db.models import BookStore, Item, Author, Publisher, Inventory from category_tree.categories import store_names, final_categories from accounts.models import Address from django.core.exceptions import ObjectDoesNotExist from dal import autocomplete from datetimewidget.widgets import ...
{ "repo_name": "bharathramh92/shop", "path": "seller/forms.py", "copies": "1", "size": "6166", "license": "mit", "hash": -687118383310152600, "line_mean": 32.5108695652, "line_max": 112, "alpha_frac": 0.587252676, "autogenerated": false, "ratio": 4.105193075898802, "config_test": true, "has_no...
from django import forms from store.models import BookStore, Item, Author, Publisher, Inventory import autocomplete_light.shortcuts as autocomplete_light from categories.category_helper import get_category_store_names, get_end_categories, get_store_end_categories from accounts.models import Address from django.core.exc...
{ "repo_name": "bharathramh92/easy-ecom", "path": "sell/forms.py", "copies": "1", "size": "3748", "license": "apache-2.0", "hash": 4804784811490236000, "line_mean": 38.4526315789, "line_max": 114, "alpha_frac": 0.62886873, "autogenerated": false, "ratio": 4.100656455142232, "config_test": false,...
from django import forms from subscription.models import MessageSet from subscription.tasks import ingest_csv, ingest_opt_opts_csv from StringIO import StringIO class CSVUploader(forms.Form): csv = forms.FileField() message_set = forms.ModelChoiceField(queryset=MessageSet.objects.all()) def save(self): ...
{ "repo_name": "praekelt/ndoh-control", "path": "subscription/forms.py", "copies": "1", "size": "3176", "license": "bsd-3-clause", "hash": -5790687586685198000, "line_mean": 31.0808080808, "line_max": 79, "alpha_frac": 0.7034005038, "autogenerated": false, "ratio": 3.7497048406139317, "config_te...
from django import forms from subscription.models import Subscription from django.utils.translation import ungettext from django.utils.translation import ugettext as _ from subscription.validators import CpfValidator class SubscriptionForm(forms.ModelForm): name = forms.CharField(label=_('Nome'), max_length=1...
{ "repo_name": "rrmartins/eventex", "path": "subscription/forms.py", "copies": "1", "size": "1441", "license": "apache-2.0", "hash": -3222226378521663000, "line_mean": 39.0277777778, "line_max": 102, "alpha_frac": 0.6703678001, "autogenerated": false, "ratio": 3.9264305177111716, "config_test": ...
from django import forms from taborniki.models import Oseba,Vod, Akcija class NameForm(forms.Form): ime = forms.CharField(label="ime", max_length=100, required=False, initial='') priimek = forms.CharField(label="priimek", max_length=100, required=False, initial='') class DodajClan(forms.Form): ime = form...
{ "repo_name": "markbaltic/TaborniskaBaza", "path": "taborniki/forms.py", "copies": "1", "size": "1451", "license": "mit", "hash": 1060923692411859600, "line_mean": 35.275, "line_max": 90, "alpha_frac": 0.7236388697, "autogenerated": false, "ratio": 3.0872340425531917, "config_test": false, "h...
from django import forms from tagging.models import Tag from problem.models import Skill, Problem, TagInfo from problem.statistics import get_children_tag_id from utils.multiple_choice_field import CommaSeparatedMultipleChoiceField class SkillEditForm(forms.ModelForm): class Meta: model = Skill exclude = [...
{ "repo_name": "ultmaster/eoj3", "path": "backstage/problem/forms.py", "copies": "1", "size": "2221", "license": "mit", "hash": -1558969818960109800, "line_mean": 37.9649122807, "line_max": 106, "alpha_frac": 0.6501575867, "autogenerated": false, "ratio": 3.7901023890784984, "config_test": false...
from django import forms from taggit.forms import TagField from todo_lists.models import ToDoList, ToDoContext, ToDo, ToDoAlert class UserResourceModelFormMixin(object): def __init__(self, owner=None, *args, **kwargs): self.owner = owner super(UserResourceModelFormMixin, self).__init__(*args, **kw...
{ "repo_name": "pawartur/django-todo-lists", "path": "todo_lists/forms.py", "copies": "1", "size": "2475", "license": "bsd-3-clause", "hash": -3745092294809035000, "line_mean": 27.125, "line_max": 83, "alpha_frac": 0.6294949495, "autogenerated": false, "ratio": 3.9161392405063293, "config_test":...
from django import forms from taggit.forms import TagField from dcim.models import Site from extras.forms import AddRemoveTagsForm, CustomFieldForm, CustomFieldBulkEditForm, CustomFieldFilterForm from tenancy.forms import TenancyForm from tenancy.forms import TenancyFilterForm from tenancy.models import Tenant from ut...
{ "repo_name": "lampwins/netbox", "path": "netbox/circuits/forms.py", "copies": "1", "size": "8990", "license": "apache-2.0", "hash": 6538466293944664000, "line_mean": 25.996996997, "line_max": 120, "alpha_frac": 0.5793103448, "autogenerated": false, "ratio": 4.105022831050229, "config_test": fa...
from django import forms from taggit.forms import TagField from extras.forms import AddRemoveTagsForm, CustomFieldForm, CustomFieldBulkEditForm, CustomFieldFilterForm from utilities.forms import ( APISelect, APISelectMultiple, BootstrapMixin, ChainedFieldsMixin, ChainedModelChoiceField, CommentField, FilterCho...
{ "repo_name": "lampwins/netbox", "path": "netbox/tenancy/forms.py", "copies": "1", "size": "4486", "license": "apache-2.0", "hash": 8453793848420098000, "line_mean": 23.6483516484, "line_max": 108, "alpha_frac": 0.5655372269, "autogenerated": false, "ratio": 4.052393857271906, "config_test": fa...
from django import forms from taggit.forms import TagField from .models import FeedList from .settings import FORBIDDEN_SLUGS def _clean_slug(instance): data = instance.cleaned_data['slug'] if data in FORBIDDEN_SLUGS: raise forms.ValidationError("This slug is not allowed!", ...
{ "repo_name": "holzenburg/feedshare", "path": "feedshare/feedlists/forms.py", "copies": "1", "size": "1579", "license": "mit", "hash": 6964355985364162000, "line_mean": 21.884057971, "line_max": 64, "alpha_frac": 0.5661811273, "autogenerated": false, "ratio": 4.188328912466844, "config_test": f...
from django import forms from teachers.models import * # from baseapp.models import * class Teacher_detailform(forms.ModelForm): class Meta: model = Teacher_detail exclude = ('count','transfer_flag','ofs_flag','ofs_reason','ofs_date','super_annum_flag') class Teacher_outofserviceform(forms.ModelFo...
{ "repo_name": "mravikumar281/staging-server", "path": "teachers/forms.py", "copies": "2", "size": "4419", "license": "mit", "hash": -3154572893937809000, "line_mean": 26.1104294479, "line_max": 97, "alpha_frac": 0.660556687, "autogenerated": false, "ratio": 3.610294117647059, "config_test": fal...
from django import forms from telepath import Adapter, AdapterRegistry, JSContextBase # noqa from wagtail.admin.staticfiles import versioned_static class WagtailJSContextBase(JSContextBase): @property def base_media(self): return forms.Media(js=[ versioned_static(self.telepath_js_path), ...
{ "repo_name": "zerolab/wagtail", "path": "wagtail/core/telepath.py", "copies": "5", "size": "1601", "license": "bsd-3-clause", "hash": 3307807524000988700, "line_mean": 22.8955223881, "line_max": 97, "alpha_frac": 0.5965021861, "autogenerated": false, "ratio": 4.224274406332454, "config_test": ...
from django import forms from ..template.showGridsData import ShowGridsData class FirstStepForm(forms.Form): composite_name = forms.CharField(widget=forms.TextInput(attrs={'size': '45'})) description = forms.CharField(widget=forms.Textarea(), required=False) # No field in database yet class WhichGridsForm(...
{ "repo_name": "danrg/RGT-tool", "path": "src/RGT/gridMng/composite/forms.py", "copies": "1", "size": "2372", "license": "mit", "hash": 6296653146801061000, "line_mean": 39.2033898305, "line_max": 103, "alpha_frac": 0.5902192243, "autogenerated": false, "ratio": 4.205673758865248, "config_test":...
from django import forms from terrains.models import TerrainImport, Circonscription class TerrainImportAdminForm(forms.ModelForm): """Custom admin form to validate csv file format""" def clean_csvfile(self): csvfile = self.cleaned_data.get("csvfile") if not csvfile: return csvfile...
{ "repo_name": "frank2411/geotest", "path": "terrains/forms.py", "copies": "1", "size": "1594", "license": "mit", "hash": -8847852475473487000, "line_mean": 27.4642857143, "line_max": 63, "alpha_frac": 0.5765370138, "autogenerated": false, "ratio": 3.906862745098039, "config_test": false, "has...
from django import forms from territori.fields import TerritoriChoices, TerritoriClusterChoices, TerritoriChoicesClassifiche from django.utils.translation import ugettext_lazy as _ class TerritoriSearchFormHome(forms.Form): territori = TerritoriChoices( to_field_name = 'slug', required=True, ...
{ "repo_name": "DeppSRL/open_bilanci", "path": "bilanci_project/bilanci/forms.py", "copies": "1", "size": "2959", "license": "mit", "hash": -3401281829710562300, "line_mean": 29.193877551, "line_max": 101, "alpha_frac": 0.5954714431, "autogenerated": false, "ratio": 3.722012578616352, "config_te...
from django import forms from testtool.models import * class CreateTestForm(forms.ModelForm): class Meta: model = Test exclude = ('owner','collaborators') class EditTestForm(forms.ModelForm): method = forms.CharField(widget=forms.TextInput(attrs={'readonly':True})) # make the fiel...
{ "repo_name": "canbal/Tally", "path": "django_source/testtool/manager/forms.py", "copies": "1", "size": "9358", "license": "mit", "hash": -1720669449230106600, "line_mean": 47.4870466321, "line_max": 187, "alpha_frac": 0.6267364822, "autogenerated": false, "ratio": 4.280878316559927, "config_te...
from django import forms from threadedcomments.models import DEFAULT_MAX_COMMENT_LENGTH from threadedcomments.models import FreeThreadedComment, ThreadedComment from django.utils.translation import ugettext_lazy as _ class ThreadedCommentForm(forms.ModelForm): """ Form which can be used to validate data for a ...
{ "repo_name": "davidyezsetz/kuma", "path": "vendor/packages/django-threadedcomments/threadedcomments/forms.py", "copies": "15", "size": "1314", "license": "mpl-2.0", "hash": 5824375918146122000, "line_mean": 31.0731707317, "line_max": 78, "alpha_frac": 0.6529680365, "autogenerated": false, "ratio...
from django import forms from tools.models import Post, BaseUser, Comment from django.contrib.auth.forms import UserCreationForm from django.forms import PasswordInput from django.forms import ModelForm class PostForm(forms.ModelForm): class Meta: model = Post title = forms.CharField(widget=forms.T...
{ "repo_name": "svaswani/STEALTH", "path": "django/tools/forms.py", "copies": "1", "size": "1227", "license": "mit", "hash": 169790433957617340, "line_mean": 31.2894736842, "line_max": 98, "alpha_frac": 0.6405867971, "autogenerated": false, "ratio": 4.366548042704626, "config_test": false, "ha...
from django import forms from tumblelog.models import Post from tumblelog.types import POST_TYPES _priority_fields = ['parent'] class ExtendableForm(forms.ModelForm): class Meta: model = Post def __init__(self, *args, **kwargs): initial = {} if 'initial' in kwargs: initial...
{ "repo_name": "luminousflux/django-luminous-tumblelog", "path": "tumblelog/forms.py", "copies": "1", "size": "2163", "license": "mit", "hash": -8657112069499143000, "line_mean": 32.2769230769, "line_max": 122, "alpha_frac": 0.5718908923, "autogenerated": false, "ratio": 3.9907749077490773, "con...
from django import forms from ummeli.opportunities.models import * from ummeli.vlive.forms import PMLModelForm, PMLForm class StatusUpdateForm(PMLForm): title = forms.CharField(label='Status', required=True, max_length=160) class JobEditForm(PMLModelForm): province = forms.ModelChoiceField(empty_label=None,...
{ "repo_name": "praekelt/ummeli", "path": "ummeli/vlive/community/forms.py", "copies": "1", "size": "2790", "license": "bsd-3-clause", "hash": 3136087016313989600, "line_mean": 41.9230769231, "line_max": 142, "alpha_frac": 0.5630824373, "autogenerated": false, "ratio": 4.665551839464883, "config...
from django import forms from ummeli.opportunities.models import TomTomMicroTaskResponse from ummeli.vlive.utils import get_lat_lon class MicroTaskResponseForm(forms.ModelForm): tel_1 = forms.RegexField('[0-9+]', required=False, error_message='Please enter a valid telephone number.') tel_2 = f...
{ "repo_name": "praekelt/ummeli", "path": "ummeli/opportunities/tomtom/forms.py", "copies": "1", "size": "1887", "license": "bsd-3-clause", "hash": -4928344018903259000, "line_mean": 39.1489361702, "line_max": 71, "alpha_frac": 0.6449390567, "autogenerated": false, "ratio": 4.202672605790646, "c...
from django import forms # from uni_form.helpers import * from django.utils.safestring import mark_safe from .models import Address, to_python import logging logger = logging.getLogger(__name__) # Python 3 fixes. import sys if sys.version > '3': long = int basestring = (str, bytes) unicode = str __all__ ...
{ "repo_name": "jamesaud/se1-group4", "path": "address/forms.py", "copies": "1", "size": "3656", "license": "mit", "hash": 4137358241118950000, "line_mean": 34.8431372549, "line_max": 101, "alpha_frac": 0.5377461707, "autogenerated": false, "ratio": 4.164009111617312, "config_test": false, "ha...
from django import forms from uni_form.helpers import * from django.utils.safestring import mark_safe from models import get_or_create_address import logging logger = logging.getLogger(__name__) __all__ = ['AddressWidget', 'AddressField'] class AddressWidget(forms.Textarea): # class Media: # js = ('js...
{ "repo_name": "jacinda/django-address", "path": "address/forms.py", "copies": "1", "size": "8159", "license": "bsd-3-clause", "hash": -6770777230238370000, "line_mean": 42.8655913978, "line_max": 231, "alpha_frac": 0.5682068881, "autogenerated": false, "ratio": 3.7221715328467155, "config_test"...
from django import forms from user_clipboard.models import Clipboard from .models import ModelWithFile, ModelWithImage class ModelWithFileForm(forms.ModelForm): document = forms.IntegerField() class Meta: model = ModelWithFile fields = 'document', def __init__(self, *args, **kwargs): ...
{ "repo_name": "MagicSolutions/django-user-clipboard", "path": "user_clipboard/tests/forms.py", "copies": "2", "size": "1842", "license": "mit", "hash": 4550712996817943600, "line_mean": 29.1967213115, "line_max": 97, "alpha_frac": 0.605320304, "autogenerated": false, "ratio": 4.273781902552204, ...
from django import forms from userena.forms import SignupForm from django.contrib.auth import get_user_model from .models import ScholariumProfile#, MeinUserenaSignup from userena.models import UserenaSignup # das ist Absicht, dass das und Mein~ importiert wird from userena.models import UserenaSignup as MeinUserenaSig...
{ "repo_name": "wmles/scholarium.at", "path": "Grundgeruest/forms.py", "copies": "1", "size": "2640", "license": "mit", "hash": -412035506483834560, "line_mean": 34.6351351351, "line_max": 115, "alpha_frac": 0.664012135, "autogenerated": false, "ratio": 3.4291287386215865, "config_test": false, ...
from django import forms from userena.forms import SignupForm from django.contrib.auth import get_user_model from .models import ScholariumProfile from django_countries.widgets import CountrySelectWidget class Anmeldeformular(SignupForm): """ Kopiert aus SigninForm aus userena.forms, angepasst teils nach der ...
{ "repo_name": "valuehack/scholarium.at", "path": "Grundgeruest/forms.py", "copies": "1", "size": "2293", "license": "mit", "hash": -1170313242358654200, "line_mean": 32.6764705882, "line_max": 75, "alpha_frac": 0.6419213974, "autogenerated": false, "ratio": 3.4855403348554033, "config_test": fa...
from django import forms from UserManagement.models import Attendent # Model Imports from ApplicationManagement.models import Application # Crispy Addons from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div, Field, Button, ButtonHolder, Submit # EXPERT MANAGEMENT --------------- cla...
{ "repo_name": "SkillSmart/ConferenceManagementSystem", "path": "Dashboard/forms.py", "copies": "1", "size": "1487", "license": "mit", "hash": 9114484274043757000, "line_mean": 27.0566037736, "line_max": 82, "alpha_frac": 0.6449226631, "autogenerated": false, "ratio": 4.062841530054645, "config_...
from django import forms from UserManagement.models import Attendent, Team from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Div, Field # -- EXPERT Section ------ class ExpertSearchForm(forms.Form): name = forms.CharField(max_length=150) nationality = forms.CharField(m...
{ "repo_name": "SkillSmart/ConferenceManagementSystem", "path": "Portal/forms.py", "copies": "1", "size": "1170", "license": "mit", "hash": 1518405576602059800, "line_mean": 36.7741935484, "line_max": 96, "alpha_frac": 0.6829059829, "autogenerated": false, "ratio": 3.5240963855421685, "config_te...
from django import forms from userprofile.models import User, UserProfile, FavPlaces from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Submit, Button, Fieldset from crispy_forms.bootstrap import TabHolder, Tab, StrictButton, FieldWithButtons, Div, Field class SignupForm(forms.Form): ...
{ "repo_name": "dylanleong/mysite", "path": "userprofile/forms.py", "copies": "1", "size": "5426", "license": "mit", "hash": -5893786421554983000, "line_mean": 38.0431654676, "line_max": 127, "alpha_frac": 0.5571323258, "autogenerated": false, "ratio": 3.7759220598469034, "config_test": false, ...
from django import forms from users.fields import UserNameField from django.contrib.auth.models import User import re STATES = ( ('d','disabled'), ('l','locked'), ('a','active') ) class UserForm(forms.Form): username = forms.CharField(widget=forms.HiddenInput) def __init__(self,*ar...
{ "repo_name": "aarne-kyppo/bachelorthesis", "path": "users/forms.py", "copies": "1", "size": "1622", "license": "mit", "hash": -4892732249225861000, "line_mean": 34.2826086957, "line_max": 70, "alpha_frac": 0.6769420469, "autogenerated": false, "ratio": 3.9950738916256157, "config_test": false,...
from django import forms from users.models import AdminUser, MemberUser class AdminUserForm(forms.Form): username = forms.CharField(label='Username', max_length=10) first_name = forms.CharField(label='First Name', max_length=30) last_name = forms.CharField(label='Last Name', max_length=30) email = for...
{ "repo_name": "mmunchkinn/Hex-Omega", "path": "users/user_form.py", "copies": "1", "size": "2800", "license": "mit", "hash": 497284538821229500, "line_mean": 39.0142857143, "line_max": 106, "alpha_frac": 0.6742857143, "autogenerated": false, "ratio": 3.9829302987197726, "config_test": false, ...
from django import forms from users.models import AdminUser class AdminUserForm(forms.Form): username = forms.CharField(label='Username', max_length=10) first_name = forms.CharField(label='First Name', max_length=30) last_name = forms.CharField(label='Last Name', max_length=30) email = forms.EmailFiel...
{ "repo_name": "defstryker/Hex-Omega", "path": "users/Claudia/add_user_form.py", "copies": "1", "size": "1282", "license": "mit", "hash": -402827321616564500, "line_mean": 40.3548387097, "line_max": 106, "alpha_frac": 0.7254290172, "autogenerated": false, "ratio": 3.662857142857143, "config_test...
from django import forms from users.models import AdminUser, User class AdminUserForm(forms.Form): username = forms.CharField(label='Username', max_length=8, min_length=8) first_name = forms.CharField(label='First Name', max_length=30) last_name = forms.CharField(label='Last Name', max_length=30) emai...
{ "repo_name": "defstryker/Hex-Omega", "path": "users/Claudia/user_form.py", "copies": "1", "size": "2344", "license": "mit", "hash": 5623318463653633000, "line_mean": 38.7288135593, "line_max": 106, "alpha_frac": 0.6642491468, "autogenerated": false, "ratio": 4.013698630136986, "config_test": f...
from django import forms from users.models import UserProfile class RegistrationForm(forms.Form): name = forms.CharField(max_length=50, required=True) email = forms.EmailField(max_length=100, required=True) password = forms.CharField(max_length=128, required=True, widget=forms.PasswordInput()) next_url...
{ "repo_name": "none-da/zeshare", "path": "users/forms.py", "copies": "1", "size": "1259", "license": "bsd-3-clause", "hash": -835845494345404000, "line_mean": 42.4482758621, "line_max": 96, "alpha_frac": 0.6894360604, "autogenerated": false, "ratio": 4.239057239057239, "config_test": false, "...
from django import forms from usuarios.models import Usuario from corporaciones.models import Corporacion #from captcha.fields import ReCaptchaField """ Este formulario se encuentran los datos para logueo del usuario """ class FormularioLogin(forms.Form): # captcha = ReCaptchaField(attrs={'theme' : 'clean' , 'class...
{ "repo_name": "Jorgesolis1989/SIVORE", "path": "usuarios/forms.py", "copies": "1", "size": "4751", "license": "apache-2.0", "hash": -8043484779182248000, "line_mean": 49.3404255319, "line_max": 169, "alpha_frac": 0.7018174134, "autogenerated": false, "ratio": 3.332394366197183, "config_test": f...
from django import forms from usuarios.models import Usuario from corporaciones.models import Corporacion from votantes.models import Votante """ Este formulario se encuentran los datos para registrar el votante """ class FormularioRegistroVotante(forms.Form): cedula_usuario = forms.IntegerField( widget=f...
{ "repo_name": "Jorgesolis1989/SIVORE", "path": "votantes/forms.py", "copies": "1", "size": "3087", "license": "apache-2.0", "hash": 454698145398296300, "line_mean": 47.8095238095, "line_max": 169, "alpha_frac": 0.7079674797, "autogenerated": false, "ratio": 3.306451612903226, "config_test": fal...
from django import forms from utilities.forms import ConnectionInfoForm from utilities.models import ConnectionInfo from xui.data_dog.data_dog_helper import DataDog class DataDogConnectionForm(ConnectionInfoForm): protocol = forms.ChoiceField( choices=[('http', 'HTTP'), ('https', 'HTTPS')], label='Protoc...
{ "repo_name": "CloudBoltSoftware/cloudbolt-forge", "path": "ui_extensions/data_dog/forms.py", "copies": "1", "size": "2169", "license": "apache-2.0", "hash": -509229868297741700, "line_mean": 39.9245283019, "line_max": 118, "alpha_frac": 0.6071922545, "autogenerated": false, "ratio": 4.4906832298...
from django import forms from .utils import get_kv, LICENSES_FORM from zipfile import ZipFile, BadZipFile from .model_extractor import ModelExtractor from pywavefront import Wavefront class TagField(forms.CharField): def __init__(self, *args, **kwargs): if not kwargs.get('widget'): kwargs['widg...
{ "repo_name": "kartta-labs/reservoir", "path": "third_party/3dmr/mainapp/forms.py", "copies": "1", "size": "7031", "license": "apache-2.0", "hash": 6753206346098402000, "line_mean": 34.8724489796, "line_max": 120, "alpha_frac": 0.561371071, "autogenerated": false, "ratio": 4.071221771858714, "c...
from django import forms from .validators import IBANValidator, swift_bic_validator, IBAN_COUNTRY_CODE_LENGTH IBAN_MIN_LENGTH = min(IBAN_COUNTRY_CODE_LENGTH.values()) class IBANFormField(forms.CharField): """ An IBAN consists of up to 34 alphanumeric characters. To limit validation to specific countrie...
{ "repo_name": "benkonrath/django-iban", "path": "django_iban/forms.py", "copies": "1", "size": "2977", "license": "bsd-3-clause", "hash": 3702897560227242500, "line_mean": 36.6835443038, "line_max": 118, "alpha_frac": 0.6630836412, "autogenerated": false, "ratio": 3.768354430379747, "config_tes...
from django import forms from vendor.zebra.forms import StripePaymentForm from django.utils.safestring import mark_safe from django.contrib.auth import authenticate from django.contrib.auth.models import User from apps.profile.models import change_password, blank_authenticate from apps.social.models import MSocialProfi...
{ "repo_name": "eric-stanley/NewsBlur", "path": "apps/profile/forms.py", "copies": "2", "size": "7626", "license": "mit", "hash": -5449859648254048000, "line_mean": 41.3722222222, "line_max": 124, "alpha_frac": 0.5658274325, "autogenerated": false, "ratio": 4.616222760290557, "config_test": fals...
from django import forms from vodkamartiniarticle.models import Article class ArticleForm(forms.Form): def __init__(self, author, article_id=0, *args, **kwargs): super(ArticleForm, self).__init__(*args, **kwargs) self.author = author self.article_id = article_id error_css_class = 'erro...
{ "repo_name": "alexisbellido/django-vodkamartini-article", "path": "vodkamartiniarticle/forms.py", "copies": "1", "size": "2624", "license": "bsd-3-clause", "hash": -7688689296568647000, "line_mean": 38.1641791045, "line_max": 121, "alpha_frac": 0.5731707317, "autogenerated": false, "ratio": 4.29...
from django import forms from vote_boat.models import Poll, User css_vote_boat_input = 'vote_boat_input' css_vote_boat_text_area = "vote_boat_text_area" class PollForm (forms.ModelForm): description = forms.CharField(max_length=300,required=False) # create a new user # username = forms.CharField(max_...
{ "repo_name": "astrodsg/django-vote-boat", "path": "vote_boat/forms.py", "copies": "1", "size": "1427", "license": "bsd-3-clause", "hash": 4739819833925687000, "line_mean": 36.5526315789, "line_max": 105, "alpha_frac": 0.6384022425, "autogenerated": false, "ratio": 3.5675, "config_test": false,...
from django import forms from voting.managers import normal_votes from issue.models import Issue from issue.models import source_types class IssueForm(forms.Form): title = forms.CharField(max_length = 100) body = forms.CharField( widget = forms.Textarea(), max_length = 2000, ) url = fo...
{ "repo_name": "spreeker/democracygame", "path": "democracy/api/forms.py", "copies": "1", "size": "1090", "license": "bsd-3-clause", "hash": 2104306961032956700, "line_mean": 33.0625, "line_max": 85, "alpha_frac": 0.6853211009, "autogenerated": false, "ratio": 3.8790035587188614, "config_test": ...
from django import forms from web.models import Questionnaire, Question from web.validators import validate_num_selectiveanswers class SignupForm(forms.Form): username = forms.CharField(max_length=30) email = forms.EmailField(max_length=75) password = forms.CharField(min_length=8, max_length=24) class P...
{ "repo_name": "otoyo/satisfactory-mobile", "path": "web/forms.py", "copies": "1", "size": "1598", "license": "mit", "hash": 3149586719017276400, "line_mean": 27.5357142857, "line_max": 67, "alpha_frac": 0.6113892365, "autogenerated": false, "ratio": 4.015075376884422, "config_test": false, "h...
from django import forms from website.apps.survey.models import Question from website.apps.survey.models import ( Response, IntegerResponse, FloatResponse, TextResponse, OptionResponse, ) from django_select2 import * class ExportForm(forms.Form): questions = forms.MultipleChoiceField(widget=forms.CheckboxSele...
{ "repo_name": "shh-dlce/pulotu", "path": "website/apps/survey/forms.py", "copies": "1", "size": "8153", "license": "apache-2.0", "hash": 2745346629765495300, "line_mean": 36.7453703704, "line_max": 90, "alpha_frac": 0.6254139581, "autogenerated": false, "ratio": 4.168200408997955, "config_test"...
from django import forms from webui.models import Branch, BuildConfiguration, PackageNameMapping class BranchForm(forms.ModelForm): class Meta: model = Branch fields = ['name', 'path', 'maintainer', 'is_virtual'] CONF_TYPE = ( ("deb", "Debian package"), ("remote", "Remote script"), ) c...
{ "repo_name": "daniel-yavorovich/cpan2repo", "path": "webui/forms.py", "copies": "1", "size": "1830", "license": "apache-2.0", "hash": 8908011251084218000, "line_mean": 30.0338983051, "line_max": 78, "alpha_frac": 0.5912568306, "autogenerated": false, "ratio": 3.8204592901878915, "config_test":...
from django import forms from whats_fresh import base from django.utils.safestring import mark_safe class ColorPickerWidget(forms.TextInput): class Media: css = { 'all': ( 'https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.7.1/spectrum.min.css', # noqa ) }...
{ "repo_name": "osu-cass/whats-fresh-api", "path": "whats_fresh/whats_fresh_api/widgets.py", "copies": "2", "size": "1995", "license": "apache-2.0", "hash": -7497810391202074000, "line_mean": 46.5, "line_max": 102, "alpha_frac": 0.5087719298, "autogenerated": false, "ratio": 2.9776119402985075, ...
from django import forms from whistlepig.whistlepig.models import SourceEmailAddress, DestinationEmailAddress from whistlepig.whistlepig.models import StatusUpdate, OutageNotificationTemplate class OutageNotificationForm(forms.Form): source_email_address = forms.ChoiceField(required=True) destination_email_add...
{ "repo_name": "rtucker-mozilla/WhistlePig", "path": "whistlepig/admin_overrides/forms.py", "copies": "1", "size": "2882", "license": "bsd-3-clause", "hash": 3083805167628239000, "line_mean": 63.0444444444, "line_max": 127, "alpha_frac": 0.7009021513, "autogenerated": false, "ratio": 4.05915492957...
from django import forms from widgets import NumberInput from defs import default_values #from defs import definitions class QuestForm(forms.Form): #name = forms.CharField(required=False, max_length=100) #print (kwargs) def __init__(self, *args, **kwargs): # print (kwargs) definition = kwar...
{ "repo_name": "MikkoJo/Questionnaire-prototype", "path": "quest_proto/forms_proto/forms.py", "copies": "1", "size": "1619", "license": "mit", "hash": -7631303394795481000, "line_mean": 41.6315789474, "line_max": 125, "alpha_frac": 0.5799876467, "autogenerated": false, "ratio": 3.948780487804878, ...
from django import forms from .widgets import VersionedImageCropperInput class VersionedImageField(forms.ImageField): widget = VersionedImageCropperInput def clean(self, data, initial=None): """ Receives output from VersionedImageCropperInput Widget where `data` is expected to be (ori...
{ "repo_name": "cirlabs/awesome_imagefield", "path": "awesome_imagefield/form/fields.py", "copies": "1", "size": "1791", "license": "mit", "hash": -1457042214037201700, "line_mean": 38.8, "line_max": 80, "alpha_frac": 0.5616973758, "autogenerated": false, "ratio": 4.651948051948052, "config_test...