text
stringlengths
0
1.05M
meta
dict
from django import forms from django.core import exceptions from django.utils.translation import ugettext_lazy as _ from treebeard.forms import movenodeform_factory from oscar.core.loading import get_class, get_model from oscar.core.utils import slugify from oscar.forms.widgets import ImageInput, DateTimePickerInput ...
{ "repo_name": "anandsimmy/ecommerce", "path": "src/oscar/apps/dashboard/catalogue/forms.py", "copies": "1", "size": "12493", "license": "bsd-3-clause", "hash": -4538031613049218000, "line_mean": 33.6066481994, "line_max": 79, "alpha_frac": 0.6209877531, "autogenerated": false, "ratio": 4.32433367...
from django import forms from django.core import exceptions from django.utils.translation import ugettext_lazy as _ def validate_username(username): if ',' in username: raise exceptions.ValidationError(_('No comma in username')) class CreateListForm(forms.Form): name = forms.CharField(max_length=30, w...
{ "repo_name": "bolecki/lister", "path": "lister/lists/forms.py", "copies": "1", "size": "1985", "license": "mit", "hash": -1339659916958624800, "line_mean": 46.2619047619, "line_max": 167, "alpha_frac": 0.6629722922, "autogenerated": false, "ratio": 4.067622950819672, "config_test": false, "h...
from django import forms from django.core import exceptions, validators from django.utils.translation import ugettext_lazy as _ from topnotchdev.files_widget.conf import * class UnicodeWithAttr(unicode): deleted_files = None moved_files = None class FilesFormField(forms.MultiValueField): def __init__(se...
{ "repo_name": "mionch/django-files-widget", "path": "topnotchdev/files_widget/forms/fields.py", "copies": "3", "size": "2340", "license": "mit", "hash": -4201207512659900400, "line_mean": 36.7419354839, "line_max": 87, "alpha_frac": 0.6085470085, "autogenerated": false, "ratio": 4.543689320388349...
from django import forms from django.core import signing from django.core.signing import BadSignature from django.forms.models import ModelForm from django.template import RequestContext from django.utils.translation import gettext from cms.models import CMSPlugin from .models import Text from .utils import _render_c...
{ "repo_name": "divio/djangocms-text-ckeditor", "path": "djangocms_text_ckeditor/forms.py", "copies": "1", "size": "3392", "license": "bsd-3-clause", "hash": -6565591072081578000, "line_mean": 29.5585585586, "line_max": 76, "alpha_frac": 0.6311910377, "autogenerated": false, "ratio": 4.24, "conf...
from django import forms from django.core import urlresolvers from django.core.validators import RegexValidator, MinLengthValidator from django.core.exceptions import ValidationError from captcha.fields import CaptchaField from .models import User class SignupForm(forms.ModelForm): captcha = CaptchaField(label=...
{ "repo_name": "lsdlab/awesome_coffice", "path": "user/forms.py", "copies": "1", "size": "1393", "license": "mit", "hash": -7956786017167649000, "line_mean": 32.8205128205, "line_max": 95, "alpha_frac": 0.6186504928, "autogenerated": false, "ratio": 3.643646408839779, "config_test": false, "ha...
from django import forms from django.core import urlresolvers from django.utils.translation import ugettext, ugettext_lazy as _ from payment.utils import capture_authorizations from livesettings import config_value import logging log = logging.getLogger('payment.listeners') def form_terms_listener(sender, form=None, ...
{ "repo_name": "Ryati/satchmo", "path": "satchmo/apps/payment/listeners.py", "copies": "12", "size": "1519", "license": "bsd-3-clause", "hash": 7921853653315459000, "line_mean": 43.6764705882, "line_max": 129, "alpha_frac": 0.6965108624, "autogenerated": false, "ratio": 3.9557291666666665, "conf...
from django import forms from django.core import validators from comperio.accounts.models import cUser, Settings, cGroup from django.core.validators import email_re import random, datetime, sha MIN_PASSWORD_LENGTH = 6 class LoginForm(forms.Form): """account login form""" username = forms.CharField(widget=form...
{ "repo_name": "neutrinog/Comperio", "path": "comperio/accounts/forms.py", "copies": "1", "size": "8980", "license": "bsd-3-clause", "hash": -364518602679300600, "line_mean": 47.0213903743, "line_max": 224, "alpha_frac": 0.6259465479, "autogenerated": false, "ratio": 4.323543572460279, "config_t...
from django import forms from django.core import validators from django.conf import settings from django.contrib.auth.models import User from managers.models import Manager, ManagerProfile import os class ManagerUserForm(forms.ModelForm): username = forms.CharField( max_length=35, label='Username...
{ "repo_name": "ritashugisha/ASUEvents", "path": "ASUEvents/managers/forms.py", "copies": "1", "size": "6547", "license": "mit", "hash": 4083446876042834400, "line_mean": 26.9786324786, "line_max": 79, "alpha_frac": 0.5008400794, "autogenerated": false, "ratio": 4.643262411347518, "config_test":...
from django import forms from django.core import validators from django.contrib.admin.widgets import AdminTimeWidget,AdminDateWidget import re class_join_option = [['','A class: Monday and Thurday 1800-1930'],['','B class : Tuesday and Friday 1800-1930'],['3','I am OK with either of them']] def is_empty(value): i...
{ "repo_name": "Pravandan/sab_lang", "path": "form_app/forms.py", "copies": "1", "size": "6973", "license": "mit", "hash": -4365408532863316000, "line_mean": 90.75, "line_max": 532, "alpha_frac": 0.700989531, "autogenerated": false, "ratio": 3.4366683095120747, "config_test": false, "has_no_ke...
from django import forms # from django.core import validators from django.contrib.auth.models import User from django.contrib.auth.forms import AuthenticationForm class LoginForm(AuthenticationForm): username = forms.CharField( label="Username", max_length=30, widget=forms....
{ "repo_name": "benwilburn/fitist", "path": "FITist_project/user_profiles/forms.py", "copies": "1", "size": "1871", "license": "mit", "hash": 1448815484996086000, "line_mean": 32.4107142857, "line_max": 75, "alpha_frac": 0.5489043292, "autogenerated": false, "ratio": 4.897905759162303, "config_t...
from django import forms from django.core import validators from django.contrib.auth.models import User from django.utils.html import format_html class LoginForm(forms.Form): username_or_email = forms.CharField( max_length=20, label='Username or Email') ...
{ "repo_name": "shakib609/AskFmClone", "path": "apps/auth/forms.py", "copies": "1", "size": "3973", "license": "mit", "hash": -122788729318105340, "line_mean": 37.9509803922, "line_max": 107, "alpha_frac": 0.4769695444, "autogenerated": false, "ratio": 5.564425770308123, "config_test": false, ...
from django import forms from django.core import validators from django.core.exceptions import ValidationError from django.db import models from django.utils import deconstruct from django.utils.translation import gettext as _ import re regex_format = r"^\/(([a-z0-9_\-])+\/)*(([a-z0-9_\-\.])+\.[a-z0-9]{2,4})?$" @dec...
{ "repo_name": "ashbc/tgrsite", "path": "navbar/validators.py", "copies": "1", "size": "1712", "license": "isc", "hash": -4967021444125448000, "line_mean": 29.5714285714, "line_max": 75, "alpha_frac": 0.625, "autogenerated": false, "ratio": 4.105515587529976, "config_test": false, "has_no_keyw...
from django import forms from django.core import validators from django.core.exceptions import ValidationError from django.forms import FileInput, ImageField, Form, ChoiceField, FileField, CharField, BooleanField, TextInput, DateField, HiddenInput from django.utils.translation import ugettext_lazy as _ from upload.util...
{ "repo_name": "DevangS/CoralNet", "path": "upload/forms.py", "copies": "1", "size": "19685", "license": "bsd-2-clause", "hash": -3506479201332523500, "line_mean": 37.5980392157, "line_max": 136, "alpha_frac": 0.5978663957, "autogenerated": false, "ratio": 4.214301006208521, "config_test": false...
from django import forms from django.core import validators from django.core.exceptions import ValidationError from django.utils.encoding import smart_str from django.contrib import messages from django.http import HttpResponseRedirect from django.utils.translation import ugettext_lazy as _ import phonenumbers from os...
{ "repo_name": "abhidrona/gn-osc-custom", "path": "oscar/views/generic.py", "copies": "2", "size": "5757", "license": "bsd-3-clause", "hash": 5449215778965122000, "line_mean": 38.1632653061, "line_max": 91, "alpha_frac": 0.6133402814, "autogenerated": false, "ratio": 4.49765625, "config_test": f...
from django import forms from django.core import validators from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ import phonenumbers from oscar.core.phonenumber import PhoneNumber class PhoneNumberMixin(object): """ Validation mixin for forms with a phon...
{ "repo_name": "machtfit/django-oscar", "path": "src/oscar/views/generic.py", "copies": "1", "size": "2767", "license": "bsd-3-clause", "hash": -499524723944514370, "line_mean": 37.9718309859, "line_max": 78, "alpha_frac": 0.6158294181, "autogenerated": false, "ratio": 4.7624784853700515, "confi...
from django import forms from django.core import validators from django.db import models from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ class StringField(models.Field): description = _("String") def __init__(self, *args, **kwargs): kwargs.setde...
{ "repo_name": "aino/django-stringfield", "path": "stringfield/base.py", "copies": "1", "size": "2977", "license": "bsd-3-clause", "hash": 7101165881981811000, "line_mean": 31.3586956522, "line_max": 84, "alpha_frac": 0.6214309708, "autogenerated": false, "ratio": 4.365102639296188, "config_test...
from django import forms from django.core import validators from django.db.models import get_model from django.utils.translation import ugettext_lazy as _ from oscar.apps.customer.forms import EmailUserCreationForm, CommonPasswordValidator from oscar.core.compat import get_user_model User = get_user_model() Partner =...
{ "repo_name": "makielab/django-oscar", "path": "oscar/apps/dashboard/partners/forms.py", "copies": "3", "size": "2760", "license": "bsd-3-clause", "hash": -1469927593274770200, "line_mean": 29, "line_max": 84, "alpha_frac": 0.6445652174, "autogenerated": false, "ratio": 4.1441441441441444, "con...
from django import forms from django.core import validators from django.forms.widgets import TextInput from django.contrib.auth import get_user_model from django.contrib.auth.forms import AuthenticationForm, PasswordResetForm from django.utils.translation import ugettext as _ from django.utils.translation import ungett...
{ "repo_name": "chimeno/wagtail", "path": "wagtail/wagtailadmin/forms.py", "copies": "3", "size": "7956", "license": "bsd-3-clause", "hash": 7984760657075117000, "line_mean": 40.8736842105, "line_max": 143, "alpha_frac": 0.6283308195, "autogenerated": false, "ratio": 4.316874660879002, "config_t...
from django import forms from django.core import validators from django.forms.widgets import TextInput from django.utils.translation import gettext_lazy as _ class URLOrAbsolutePathValidator(validators.URLValidator): @staticmethod def is_absolute_path(value): return value.startswith('/') def __ca...
{ "repo_name": "torchbox/wagtail", "path": "wagtail/admin/forms/choosers.py", "copies": "10", "size": "1358", "license": "bsd-3-clause", "hash": 5970191561087218000, "line_mean": 28.5217391304, "line_max": 66, "alpha_frac": 0.7179675994, "autogenerated": false, "ratio": 3.9707602339181287, "conf...
from django import forms from django.core import validators from django.forms.widgets import TextInput from django.utils.translation import ugettext_lazy as _ class URLOrAbsolutePathValidator(validators.URLValidator): @staticmethod def is_absolute_path(value): return value.startswith('/') def __c...
{ "repo_name": "nimasmi/wagtail", "path": "wagtail/admin/forms/choosers.py", "copies": "3", "size": "1359", "license": "bsd-3-clause", "hash": 101896073407109890, "line_mean": 28.5434782609, "line_max": 66, "alpha_frac": 0.7181751288, "autogenerated": false, "ratio": 3.973684210526316, "config_t...
from django import forms from django.core import validators from django.forms.widgets import TextInput from django.utils.translation import ugettext_lazy class URLOrAbsolutePathValidator(validators.URLValidator): @staticmethod def is_absolute_path(value): return value.startswith('/') def __call__...
{ "repo_name": "mikedingjan/wagtail", "path": "wagtail/admin/forms/choosers.py", "copies": "1", "size": "1378", "license": "bsd-3-clause", "hash": 7294515008899779000, "line_mean": 28.9565217391, "line_max": 72, "alpha_frac": 0.7220609579, "autogenerated": false, "ratio": 3.9826589595375723, "co...
from django import forms from django.core import validators from django.utils.datastructures import SortedDict from itertools import chain from django.utils.encoding import StrAndUnicode, force_unicode from django.utils.html import escape, conditional_escape from django.utils.safestring import mark_safe from django.for...
{ "repo_name": "joskid/tiote", "path": "tiote/forms.py", "copies": "1", "size": "25857", "license": "mit", "hash": 7195407619133889000, "line_mean": 42.2391304348, "line_max": 125, "alpha_frac": 0.5540472599, "autogenerated": false, "ratio": 4.127214684756584, "config_test": false, "has_no_key...
from django import forms from django.core import validators from django.utils.translation import ugettext_lazy as _ from mailme.models.user import User class UserDetailsForm(forms.ModelForm): class Meta: model = User fields = ('username', 'email') class RegistrationForm(forms.ModelForm): pa...
{ "repo_name": "mailme/mailme.io", "path": "src/mailme/web/forms.py", "copies": "1", "size": "3175", "license": "bsd-3-clause", "hash": 5585833915183957000, "line_mean": 30.75, "line_max": 85, "alpha_frac": 0.6088188976, "autogenerated": false, "ratio": 4.59479015918958, "config_test": false, ...
from django import forms from django.core import validators from django.utils.translation import ugettext_lazy as _ from ....payment.fields import (CreditCardExpirationField, CreditCardNumberField) from . import models CVV_VALIDATOR = validators.RegexValidator('^[0-9]{1,4}$', ...
{ "repo_name": "fusionbox/satchless", "path": "satchless/contrib/payment/authorizenet_provider/forms.py", "copies": "1", "size": "1088", "license": "bsd-3-clause", "hash": -255463451204680960, "line_mean": 44.3333333333, "line_max": 78, "alpha_frac": 0.6130514706, "autogenerated": false, "ratio": ...
from django import forms from django.core import validators from events.models import Event from buildings.models import Building from rooms.models import Room import time class EventForm(forms.ModelForm): __buildings_initial = Building.objects.all() try: __rooms_initial = Room.objects.filter( ...
{ "repo_name": "ritashugisha/ASUEvents", "path": "ASUEvents/events/forms.py", "copies": "1", "size": "3602", "license": "mit", "hash": -2200821238866671600, "line_mean": 29.0166666667, "line_max": 75, "alpha_frac": 0.5016657413, "autogenerated": false, "ratio": 4.232667450058754, "config_test": ...
from django import forms from django.core import validators from allauth.socialaccount.forms import SignupForm as BaseSignupForm from tower import ugettext_lazy as _ USERNAME_REQUIRED = _(u'Username is required.') USERNAME_SHORT = _(u'Username is too short (%(show_value)s characters). ' u'It must b...
{ "repo_name": "bluemini/kuma", "path": "kuma/users/signup.py", "copies": "12", "size": "3516", "license": "mpl-2.0", "hash": 2581604109885230000, "line_mean": 40.8571428571, "line_max": 82, "alpha_frac": 0.6234357224, "autogenerated": false, "ratio": 4.356877323420075, "config_test": false, "...
from django import forms from django.core import validators class FormName(forms.Form): name = forms.CharField() email = forms.EmailField() verify_email = forms.EmailField(label='Enter your email again:') text = forms.CharField(widget=forms.Textarea) def clean(self): all_clean_data = sup...
{ "repo_name": "RubenDuran/py_learning", "path": "MegaCourse/Django_lev_3/basicforms/basicapp/forms.py", "copies": "1", "size": "1339", "license": "mit", "hash": 3216014229797432000, "line_mean": 29.4318181818, "line_max": 81, "alpha_frac": 0.6280806572, "autogenerated": false, "ratio": 3.82571428...
from django import forms from django.core.mail import EmailMessage from django.utils.translation import ugettext_lazy as _ from config.settings.common import EMAIL_WEBMASTER, DEFAULT_FROM_EMAIL from texaslan.users.models import UserService from texaslan.utils.utils import subscribe_to_newsletter class NotifyForm(for...
{ "repo_name": "TexasLAN/texaslan.org", "path": "texaslan/notify/forms.py", "copies": "1", "size": "2431", "license": "mit", "hash": 3353973820940239000, "line_mean": 34.231884058, "line_max": 75, "alpha_frac": 0.5746606335, "autogenerated": false, "ratio": 3.8526148969889067, "config_test": fal...
from django import forms from django.core.mail import mail_managers from .models import Song, Comment from .utils import strip_whitespace_lines from captcha.fields import ReCaptchaField class AddSongForm(forms.ModelForm): artist_txt = forms.CharField( max_length=100, label='Artist', ...
{ "repo_name": "Ilias95/guitarchords", "path": "chords/forms.py", "copies": "1", "size": "3332", "license": "mit", "hash": 3374848976885446700, "line_mean": 28.2280701754, "line_max": 83, "alpha_frac": 0.56272509, "autogenerated": false, "ratio": 3.7734994337485843, "config_test": false, "has_...
from django import forms from django.core.mail import send_mail from css.models import CUser, Room, Course, SectionType, Schedule, Section, Availability, FacultyCoursePreferences from django.http import HttpResponseRedirect from settings import DEPARTMENT_SETTINGS, HOSTNAME import re from django.forms import ModelChoic...
{ "repo_name": "makennajohnstone/CSS", "path": "css/forms.py", "copies": "1", "size": "11524", "license": "mit", "hash": 6763797432747708000, "line_mean": 42.6515151515, "line_max": 228, "alpha_frac": 0.6312912183, "autogenerated": false, "ratio": 3.9331058020477814, "config_test": false, "has...
from django import forms from django.core.mail import send_mail from django.conf import settings from gitology.d import recaptcha_forms class CommentForm(recaptcha_forms.RecaptchaForm): name = forms.CharField(max_length=100) url = forms.URLField(required=False) follow = forms.BooleanField(required=False,...
{ "repo_name": "amitu/gitology", "path": "src/gitology/d/forms.py", "copies": "1", "size": "2076", "license": "bsd-3-clause", "hash": 3481534277022102500, "line_mean": 33.0327868852, "line_max": 93, "alpha_frac": 0.5886319846, "autogenerated": false, "ratio": 3.8232044198895028, "config_test": f...
from django import forms from django.core.mail import send_mail from django.core.urlresolvers import reverse from django.forms import Form, ModelForm from crispy_forms.helper import FormHelper from crispy_forms.layout import ButtonHolder, Column, Field, Fieldset, \ Layout, Row, Submit from surgery.models import S...
{ "repo_name": "curlyjr25/FrogWebsite", "path": "frogs/apps/surgery/forms.py", "copies": "1", "size": "1840", "license": "bsd-3-clause", "hash": -7965279235055219000, "line_mean": 41.7906976744, "line_max": 80, "alpha_frac": 0.6092391304, "autogenerated": false, "ratio": 3.6435643564356437, "con...
from django import forms from django.core.mail import send_mail from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.views.generic.edit import FormView from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from studentsdb.settings import ADM...
{ "repo_name": "samitnuk/studentsdb", "path": "students/views/contact_admin.py", "copies": "1", "size": "3753", "license": "mit", "hash": 7536981136838783000, "line_mean": 33.3168316832, "line_max": 88, "alpha_frac": 0.6200230814, "autogenerated": false, "ratio": 3.285308056872038, "config_test"...
from django import forms from django.core.mail import send_mail from django.template import loader from django.conf import settings from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.sites.shortcuts import...
{ "repo_name": "fausecteam/ctf-gameserver", "path": "src/ctf_gameserver/web/registration/forms.py", "copies": "1", "size": "8881", "license": "isc", "hash": 794840971447073400, "line_mean": 35.2489795918, "line_max": 109, "alpha_frac": 0.6151334309, "autogenerated": false, "ratio": 4.3406647116324...
from django import forms from django.core.mail import send_mail from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django.conf import settings from .models import Contact def my_mail_sen...
{ "repo_name": "watchdogpolska/django-multi-contact", "path": "contact/forms.py", "copies": "1", "size": "1531", "license": "mit", "hash": 8732137861241312000, "line_mean": 39.2894736842, "line_max": 88, "alpha_frac": 0.6740692358, "autogenerated": false, "ratio": 3.7990074441687347, "config_tes...
from django import forms from django.core.management import settings from django.forms import ValidationError TIME_ZONES = ( (settings.TIME_ZONE, 'Default ({0})'.format(settings.TIME_ZONE)), ('Etc/GMT-3', 'Etc/GMT-3 (Moscow)'), ('Etc/GMT-7', 'Etc/GMT-7 (Krasnoyarsk)'), ) class ListDateIntervalForm(forms.F...
{ "repo_name": "k-vinogradov/noclite", "path": "reports/accidents/forms.py", "copies": "1", "size": "1086", "license": "bsd-3-clause", "hash": 8377936221827747000, "line_mean": 37.8214285714, "line_max": 102, "alpha_frac": 0.6924493554, "autogenerated": false, "ratio": 3.668918918918919, "config...
from django import forms from django.core.paginator import Paginator from django.shortcuts import render from django.utils.translation import ugettext as _ from wagtail.admin import messages from wagtail.admin.forms.search import SearchForm from wagtail.admin.rich_text import get_rich_text_editor_widget from wagtail.a...
{ "repo_name": "nimasmi/wagtail", "path": "wagtail/contrib/styleguide/views.py", "copies": "4", "size": "3029", "license": "bsd-3-clause", "hash": -2415256169380398600, "line_mean": 37.8333333333, "line_max": 99, "alpha_frac": 0.6906569825, "autogenerated": false, "ratio": 4.172176308539945, "co...
from django import forms from django.core.paginator import Paginator from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from IssueTracker.models import * from Machine.models import Item as mItem import LabtrackerCore.models import LabtrackerCore.utils class Is...
{ "repo_name": "abztrakt/labtracker", "path": "IssueTracker/utils.py", "copies": "1", "size": "4882", "license": "apache-2.0", "hash": 6819961403885369000, "line_mean": 26.7386363636, "line_max": 90, "alpha_frac": 0.6083572306, "autogenerated": false, "ratio": 3.9370967741935483, "config_test": ...
from django import forms from django.core.paginator import Paginator from django.template.response import TemplateResponse from django.utils.translation import gettext as _ from wagtail.admin import messages from wagtail.admin.forms.search import SearchForm from wagtail.admin.rich_text import get_rich_text_editor_widg...
{ "repo_name": "torchbox/wagtail", "path": "wagtail/contrib/styleguide/views.py", "copies": "5", "size": "3056", "license": "bsd-3-clause", "hash": 469743158609079200, "line_mean": 38.1794871795, "line_max": 99, "alpha_frac": 0.6930628272, "autogenerated": false, "ratio": 4.197802197802198, "con...
from django import forms from django.core.paginator import Paginator from django.template.context import RequestContext from django.template.loader import render_to_string from django.utils.translation import ugettext_lazy as _ from .models import Venue, Event, Category from django.db import models class EventsCon...
{ "repo_name": "feinheit/feincms-elephantagenda", "path": "elephantagenda/contents.py", "copies": "1", "size": "2644", "license": "mit", "hash": 2696968175308971500, "line_mean": 32.05, "line_max": 80, "alpha_frac": 0.5775340393, "autogenerated": false, "ratio": 3.9640179910044977, "config_test"...
from django import forms from django.core.serializers.json import DjangoJSONEncoder from django.db import models from django.utils import simplejson as json from south.modelsinspector import add_introspection_rules class JSONWidget(forms.Textarea): def render(self, name, value, attrs=None): if not isins...
{ "repo_name": "crate-archive/crate-site", "path": "crateweb/apps/crate/fields/json.py", "copies": "1", "size": "1721", "license": "bsd-2-clause", "hash": 2478656027505955300, "line_mean": 28.6724137931, "line_max": 83, "alpha_frac": 0.6618245206, "autogenerated": false, "ratio": 4.167070217917676...
from django import forms from django.core.serializers.json import json BASE_PATH = 'templatesadmin/codemirror' MODES = {'css': [BASE_PATH + '/mode/css/css.js', ], 'htmlmixed': [BASE_PATH + '/mode/htmlmixed/htmlmixed.js', BASE_PATH + '/mode/javascript/javascript.js', ...
{ "repo_name": "GrandComicsDatabase/django-templatesadmin", "path": "templatesadmin/widgets/codemirror.py", "copies": "1", "size": "2460", "license": "bsd-3-clause", "hash": -8423528304875505000, "line_mean": 36.8461538462, "line_max": 78, "alpha_frac": 0.5333333333, "autogenerated": false, "ratio...
from django import forms from django.core.signing import TimestampSigner from django.db import models from datetime import datetime, timedelta from satori.tools.params import OaTypeTime from copy import deepcopy from satori.web.utils.tables import format_html from satori.tools.params import total_seconds class StatusB...
{ "repo_name": "zielmicha/satori", "path": "satori.web/satori/web/utils/forms.py", "copies": "1", "size": "3613", "license": "mit", "hash": -6368511723140938000, "line_mean": 37.0315789474, "line_max": 191, "alpha_frac": 0.6551342375, "autogenerated": false, "ratio": 3.6905005107252298, "config_...
from django import forms from django.core.urlresolvers import reverse, get_urlconf, get_resolver, NoReverseMatch from django.db import models from djangorestframework.response import ErrorResponse from djangorestframework.serializer import Serializer, _SkipField from djangorestframework.utils import as_tuple class B...
{ "repo_name": "seanfisk/buzzword-bingo-server", "path": "djangorestframework/resources.py", "copies": "1", "size": "15185", "license": "bsd-3-clause", "hash": -7805914392219240000, "line_mean": 38.3393782383, "line_max": 277, "alpha_frac": 0.6227197893, "autogenerated": false, "ratio": 4.36601495...
from django import forms from django.core.urlresolvers import reverse_lazy from django.contrib import messages from django.contrib.auth.mixins import LoginRequiredMixin from django.views import generic from django.views.generic.edit import UpdateView from ..ldap.actions import LDAPAccountUpdater from ..ldap.utils impo...
{ "repo_name": "Atilla106/members.atilla.org", "path": "accounts/views/profile.py", "copies": "1", "size": "2648", "license": "mit", "hash": 2125723649506508500, "line_mean": 36.2957746479, "line_max": 91, "alpha_frac": 0.6453927492, "autogenerated": false, "ratio": 4.291734197730956, "config_te...
from django import forms from django.core.urlresolvers import reverse_lazy from django.forms import ValidationError from django.shortcuts import get_object_or_404 from django.views import generic from ..models import PendingUser from ..ldap.actions import LDAPAccountAdder class ValidateRegistrationForm(forms.Form): ...
{ "repo_name": "Atilla106/members.atilla.org", "path": "accounts/views/validation.py", "copies": "1", "size": "2247", "license": "mit", "hash": -6047809120708756000, "line_mean": 34.6666666667, "line_max": 79, "alpha_frac": 0.6364040943, "autogenerated": false, "ratio": 4.604508196721311, "confi...
from django import forms from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ from django_select2.forms import ModelSelect2Widget from leonardo.forms.fields.dynamic import (DynamicModelChoiceField, DynamicSelectWidget) from ...
{ "repo_name": "django-leonardo/django-leonardo", "path": "leonardo/module/media/fields/utils.py", "copies": "1", "size": "1563", "license": "bsd-3-clause", "hash": -8717377602013628000, "line_mean": 25.9482758621, "line_max": 72, "alpha_frac": 0.682021753, "autogenerated": false, "ratio": 4.10236...
from django import forms from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext_lazy as _ from django.utils.translation import string_concat from crispy_forms.helper import FormHelper from django.contrib.auth.models import User from .models import UserProfile class Username...
{ "repo_name": "matus-stehlik/roots", "path": "profiles/forms.py", "copies": "3", "size": "2234", "license": "mit", "hash": 9096847038618788000, "line_mean": 30.0277777778, "line_max": 77, "alpha_frac": 0.5823634736, "autogenerated": false, "ratio": 4.450199203187251, "config_test": false, "ha...
from django import forms from django.core.urlresolvers import reverse_lazy from yawdadmin.widgets import AutoCompleteTextInput, Select2MultipleWidget, \ Select2Widget, SwitchWidget, BootstrapRadioRenderer class SideBarExampleAdminForm(forms.ModelForm): class Meta: widgets = { 'field2': for...
{ "repo_name": "mwolff44/yawd-admin", "path": "example_project/demo_application/forms.py", "copies": "3", "size": "1787", "license": "bsd-3-clause", "hash": -4826509576811714000, "line_mean": 48.6388888889, "line_max": 86, "alpha_frac": 0.533855624, "autogenerated": false, "ratio": 4.6295336787564...
from django import forms from django.core.urlresolvers import reverse_lazy from example.models import Meatball, Noodle, Spaghetti from fsm.widget import FSM class SpaghettiForm(forms.ModelForm): class Meta: model = Spaghetti meatballs = forms.ModelMultipleChoiceField(Meatball.objects.all(), ...
{ "repo_name": "pombredanne/django-fsm-widget", "path": "example/forms.py", "copies": "1", "size": "1210", "license": "mit", "hash": -2341421929803650600, "line_mean": 45.5769230769, "line_max": 80, "alpha_frac": 0.5008264463, "autogenerated": false, "ratio": 4.671814671814672, "config_test": fa...
from django import forms from django.core.urlresolvers import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Field from crispy_forms.bootstrap import FieldWithButtons, StrictButton class StatesSearchForm(forms.Form): q = forms.CharField(label='Search') def __init_...
{ "repo_name": "Stupeflix/japper", "path": "japper/monitoring/forms.py", "copies": "1", "size": "1050", "license": "mpl-2.0", "hash": 7323058089277604000, "line_mean": 35.2068965517, "line_max": 71, "alpha_frac": 0.6066666667, "autogenerated": false, "ratio": 4.216867469879518, "config_test": fa...
from django import forms from django.core.urlresolvers import reverse from django.conf import settings from django.utils.html import escapejs from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as _ from taggit.utils import edit_string_for_tags class TagAutocomplete(forms...
{ "repo_name": "decibyte/django-taggit", "path": "taggit/widgets.py", "copies": "1", "size": "2210", "license": "bsd-3-clause", "hash": 7984481272727398000, "line_mean": 34.0793650794, "line_max": 117, "alpha_frac": 0.5158371041, "autogenerated": false, "ratio": 3.953488372093023, "config_test":...
from django import forms from django.core.urlresolvers import reverse from django.conf import settings from django.utils.translation import ugettext_lazy as _ from turbion.bits.profiles.models import Profile from turbion.bits.openid import utils class OpenidLoginForm(forms.ModelForm): class Meta: model = ...
{ "repo_name": "strogo/turbion", "path": "turbion/bits/openid/forms.py", "copies": "1", "size": "1963", "license": "bsd-3-clause", "hash": 4192365726968979000, "line_mean": 30.6612903226, "line_max": 89, "alpha_frac": 0.6535914417, "autogenerated": false, "ratio": 3.9979633401221997, "config_tes...
from django import forms from django.core.urlresolvers import reverse from django.conf import settings from django.views.generic import FormView from django.utils.translation import ugettext as _ from mailsnake import MailSnake class SubscriptionForm(forms.Form): name = forms.CharField(label=_('Name'), max_length...
{ "repo_name": "simonluijk/django-chimps", "path": "chimps/views.py", "copies": "1", "size": "1145", "license": "bsd-3-clause", "hash": 1748548791385592000, "line_mean": 33.696969697, "line_max": 78, "alpha_frac": 0.6698689956, "autogenerated": false, "ratio": 3.7913907284768213, "config_test": ...
from django import forms from django.core.urlresolvers import reverse from django.contrib.auth.models import User from crispy_forms.helper import FormHelper, Layout from crispy_forms.layout import Button, Submit, Fieldset, HTML, Field from crispy_forms.bootstrap import FormActions from timezone_field import TimeZoneFo...
{ "repo_name": "jcalazan/glucose-tracker", "path": "glucosetracker/accounts/forms.py", "copies": "1", "size": "5418", "license": "mit", "hash": -1096654813169228300, "line_mean": 36.8881118881, "line_max": 79, "alpha_frac": 0.5690291621, "autogenerated": false, "ratio": 4.0553892215568865, "conf...
from django import forms from django.core.urlresolvers import reverse from django.contrib.sites.models import Site from django.utils.safestring import SafeUnicode from django_banklink import settings from django_banklink.utils import create_signature from django_banklink.models import Transaction from warnings import...
{ "repo_name": "truevision/django_banklink", "path": "django_banklink/forms.py", "copies": "1", "size": "3995", "license": "bsd-3-clause", "hash": -8375001399081903000, "line_mean": 47.7073170732, "line_max": 118, "alpha_frac": 0.6304456685, "autogenerated": false, "ratio": 3.9388560157790926, "...
from django import forms from django.core.urlresolvers import reverse from django.db.models import ObjectDoesNotExist from django.db.models.fields import BLANK_CHOICE_DASH from django.utils.safestring import mark_safe _PICKER_TEMPLATE = u''' <div class="input-group"> %(select)s <a href="%(picker)s?field=%(field)s" cl...
{ "repo_name": "matthiask/towel-bootstrap", "path": "towel_bootstrap/widgets.py", "copies": "1", "size": "3736", "license": "bsd-3-clause", "hash": -1769214238659254500, "line_mean": 30.6610169492, "line_max": 77, "alpha_frac": 0.5203426124, "autogenerated": false, "ratio": 3.9618239660657477, "...
from django import forms from django.core.urlresolvers import reverse from django.db.models import Q from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Reset, Layout, Div from .models import Acta, Grupo, Lote, Rodado, Subasta from personas.models import Persona, Profesional class Act...
{ "repo_name": "diegoduncan21/subastas", "path": "subastas_repo/subastas/forms.py", "copies": "1", "size": "7376", "license": "bsd-3-clause", "hash": -3669846820982206500, "line_mean": 31.9285714286, "line_max": 89, "alpha_frac": 0.5329446855, "autogenerated": false, "ratio": 3.9677245831091983, ...
from django import forms from django.core.urlresolvers import reverse from django.shortcuts import get_object_or_404 from libs.django_utils import render_to_response from django.views.generic.edit import FormView from django.views.generic import DetailView from django.core import exceptions from django.contrib.auth.mod...
{ "repo_name": "instituteofdesign/django-lms", "path": "apps/profiles/views.py", "copies": "1", "size": "2763", "license": "bsd-3-clause", "hash": -8767783673525924000, "line_mean": 33.5375, "line_max": 88, "alpha_frac": 0.6699239957, "autogenerated": false, "ratio": 4.142428785607196, "config_t...
from django import forms from django.core.urlresolvers import reverse from django.shortcuts import render_to_response from django.template.loader import render_to_string from django.template import RequestContext from django.http import HttpResponse, HttpResponseRedirect from django.contrib.admin.views.decorators impor...
{ "repo_name": "MasonM/hssonline-conference", "path": "django_conference/admin_tasks.py", "copies": "1", "size": "5366", "license": "bsd-3-clause", "hash": 5897234667582095000, "line_mean": 36.2638888889, "line_max": 79, "alpha_frac": 0.6358553858, "autogenerated": false, "ratio": 4.04981132075471...
from django import forms from django.core.urlresolvers import reverse from django.test import TestCase from jet.templatetags.jet_tags import jet_select2_lookups, jet_next_object_url, jet_previous_object_url from jet.tests.models import TestModel, SearchableTestModel from django.test.client import RequestFactory class ...
{ "repo_name": "huanpc/IoT-1", "path": "gui/controller/.venv/lib/python3.5/site-packages/jet/tests/test_tags.py", "copies": "3", "size": "3624", "license": "mit", "hash": -1481672489712207400, "line_mean": 35.9795918367, "line_max": 103, "alpha_frac": 0.6412803532, "autogenerated": false, "ratio":...
from django import forms from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from haystack.forms import FacetedSearchForm, SearchForm def get_range_parts(value_range): """Returns a tuple of start value and end value extracted from `value_range`. `value_range` should...
{ "repo_name": "kingsdigitallab/dprr-django", "path": "promrep/forms.py", "copies": "1", "size": "15195", "license": "mit", "hash": -1679693741106292000, "line_mean": 32.5430463576, "line_max": 78, "alpha_frac": 0.5871010201, "autogenerated": false, "ratio": 3.79875, "config_test": false, "has...
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from tabbed_admin import TabbedModelAdmin from django.utils.safestring import mark_safe from django.utils.html import format_html from django.utils.encoding import force_text def get_circuit_id_fr...
{ "repo_name": "SRJ9/django-driver27", "path": "driver27/admin/common.py", "copies": "1", "size": "2945", "license": "mit", "hash": -4950375513021858000, "line_mean": 40.4788732394, "line_max": 129, "alpha_frac": 0.6522920204, "autogenerated": false, "ratio": 3.9424364123159306, "config_test": f...
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, HTML from markitup.widgets import MarkItUpWidget from wafer.talks.m...
{ "repo_name": "CarlFK/wafer", "path": "wafer/talks/forms.py", "copies": "1", "size": "1266", "license": "isc", "hash": 4559543429209313300, "line_mean": 33.2162162162, "line_max": 78, "alpha_frac": 0.5924170616, "autogenerated": false, "ratio": 4.083870967741936, "config_test": false, "has_no...
from django import forms from django.core.urlresolvers import reverse from django.views.generic.edit import CreateView from forms_ext.views.generic import FormSetView from forms_ext.fields import ForeignKeyChoiceField, QuerysetChoiceField from sample import models class PersonForm(forms.ModelForm): eye_color = F...
{ "repo_name": "imtapps/django-forms-ext", "path": "example/sample/views.py", "copies": "1", "size": "1677", "license": "bsd-2-clause", "hash": 6842637925296039000, "line_mean": 28.4210526316, "line_max": 107, "alpha_frac": 0.709600477, "autogenerated": false, "ratio": 3.9, "config_test": false,...
from django import forms from django.core.urlresolvers import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, ButtonHolder, Submit, HTML from fabric_bolt.web_hooks import models class HookCreateForm(forms.ModelForm): button_prefix = "Create" project = forms.CharFi...
{ "repo_name": "brajput24/fabric-bolt", "path": "fabric_bolt/web_hooks/forms.py", "copies": "2", "size": "1693", "license": "mit", "hash": 3168242076665965600, "line_mean": 25.0615384615, "line_max": 92, "alpha_frac": 0.5735380981, "autogenerated": false, "ratio": 4.139364303178484, "config_test...
from django import forms from django.core.urlresolvers import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout from crispy_forms.bootstrap import StrictButton from planner.models import DayRecipe from recipes.models import Recipe class RedirectToDateForm(forms.Form): dat...
{ "repo_name": "brandonw/meal_planner", "path": "meal_planner/planner/forms.py", "copies": "1", "size": "1584", "license": "bsd-3-clause", "hash": -1896151816367757300, "line_mean": 30.68, "line_max": 76, "alpha_frac": 0.5965909091, "autogenerated": false, "ratio": 3.8823529411764706, "config_te...
from django import forms from django.core.urlresolvers import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout from smartfields.crispy.layout import ImageField, VideoField, LimitedField from smartfields.processors.image import supported_formats from .models import TextTesting...
{ "repo_name": "un33k/django-smartfields", "path": "tests/test_app/forms.py", "copies": "1", "size": "2326", "license": "mit", "hash": -5419955214090553000, "line_mean": 33.2058823529, "line_max": 83, "alpha_frac": 0.5279449699, "autogenerated": false, "ratio": 4.388679245283019, "config_test": ...
from django import forms from django.core.urlresolvers import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Submit, HTML from crispy_forms.bootstrap import FormActions from fabric_bolt.web_hooks import models class HookCreateForm(forms.ModelForm): button_prefix = "C...
{ "repo_name": "paperreduction/fabric-bolt", "path": "fabric_bolt/web_hooks/forms.py", "copies": "10", "size": "1724", "license": "mit", "hash": 4259743184169416700, "line_mean": 25.1363636364, "line_max": 92, "alpha_frac": 0.5788863109, "autogenerated": false, "ratio": 4.124401913875598, "confi...
from django import forms from django.core.urlresolvers import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Reset, Layout, Div from .models import Persona, Profesional class ProfesionalForm(forms.ModelForm): class Meta: fields = ["nombres", ...
{ "repo_name": "diegoduncan21/subastas", "path": "subastas_repo/personas/forms.py", "copies": "1", "size": "1586", "license": "bsd-3-clause", "hash": -71892186420018990, "line_mean": 27.8363636364, "line_max": 67, "alpha_frac": 0.5157629256, "autogenerated": false, "ratio": 3.965, "config_test":...
from django import forms from django.core.urlresolvers import reverse from .models import Event, TimelineMapping class TimelineMappingForm(forms.ModelForm): offset = forms.CharField() event_pk = forms.IntegerField(widget=forms.HiddenInput, required=False) event_description = forms.CharField(required=Fal...
{ "repo_name": "eldarion/synoptico", "path": "synoptico/forms.py", "copies": "1", "size": "1633", "license": "mit", "hash": -3818443342637220000, "line_mean": 31.66, "line_max": 79, "alpha_frac": 0.6031843233, "autogenerated": false, "ratio": 4.2973684210526315, "config_test": false, "has_no_k...
from django import forms from django.core.urlresolvers import reverse from sentry.plugins import Plugin from sentry.utils.http import absolute_uri from sentry_xmpp.bot import SentryNotificationBot import sentry_xmpp import logging log = logging.getLogger(__name__) class XMPPOptionsForm(forms.Form): jid = forms...
{ "repo_name": "chroto/sentry-xmpp", "path": "sentry_xmpp/plugin.py", "copies": "1", "size": "2619", "license": "mit", "hash": 9199195359257294000, "line_mean": 32.5769230769, "line_max": 95, "alpha_frac": 0.6261932035, "autogenerated": false, "ratio": 3.6578212290502794, "config_test": false, ...
from django import forms from django.core.urlresolvers import reverse from utils.urls import reverse_no_i18n from utils.widgets import MarkdownWidget from .models import TextContent, Image, MenuItem from django.utils.translation import ugettext_lazy as _ class TextContentAdminForm(forms.ModelForm): class Meta: ...
{ "repo_name": "andersonjonathan/Navitas", "path": "navitas/contents/forms.py", "copies": "1", "size": "1722", "license": "mit", "hash": -4805082477576808000, "line_mean": 32.7450980392, "line_max": 91, "alpha_frac": 0.5857059849, "autogenerated": false, "ratio": 3.7741228070175437, "config_test...
from django import forms from django.core.urlresolvers import reverse, NoReverseMatch from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ObjectDoesNotExist from django.core.validators import URLValidator from treenav.models import MenuItem from mptt.forms import TreeNodeChoic...
{ "repo_name": "NetstationMurator/django-treenav", "path": "treenav/forms.py", "copies": "1", "size": "2787", "license": "bsd-3-clause", "hash": -1600010706110938400, "line_mean": 35.1948051948, "line_max": 99, "alpha_frac": 0.6045927521, "autogenerated": false, "ratio": 4.444976076555024, "conf...
from django import forms from django.core.validators import EmailValidator from django.contrib.auth.models import User from main.models import Order, System, Character from lxml import etree import requests import urllib class OrderModelForm(forms.ModelForm): class Meta: model = Order exclude =...
{ "repo_name": "mosbasik/wormholesales-django", "path": "main/forms.py", "copies": "1", "size": "6260", "license": "apache-2.0", "hash": 1610785724485361200, "line_mean": 35.8235294118, "line_max": 92, "alpha_frac": 0.5498402556, "autogenerated": false, "ratio": 4.9252557041699445, "config_test"...
from django import forms from django.core.validators import EmailValidator from .models import User, Group from ...utils.tjldap import get_uid class UserForm(forms.ModelForm): username = forms.CharField(max_length=32, widget=forms.TextInput(attrs={"class": "form-control"})) em...
{ "repo_name": "tjcsl/director", "path": "web3/apps/users/forms.py", "copies": "1", "size": "2146", "license": "mit", "hash": -3831203821064291000, "line_mean": 34.1803278689, "line_max": 110, "alpha_frac": 0.572693383, "autogenerated": false, "ratio": 4.575692963752665, "config_test": false, ...
from django import forms from django.core.validators import EmailValidator, RegexValidator, MinLengthValidator, MaxLengthValidator from django.forms import ModelForm from .context_processors import validation_error_to_boolean from .lang.ru_RU import forms_error_messages from .models import User class RegisterForm(Mo...
{ "repo_name": "tvorogme/gotosite", "path": "main/forms.py", "copies": "1", "size": "3834", "license": "apache-2.0", "hash": 8547334560348831000, "line_mean": 40.0465116279, "line_max": 120, "alpha_frac": 0.6563739377, "autogenerated": false, "ratio": 3.4540117416829745, "config_test": false, ...
from django import forms from django.core.validators import EMPTY_VALUES from django.core.exceptions import ValidationError from django.utils.encoding import smart_unicode, force_unicode from django.utils.translation import ugettext_lazy as _ from django_mongoengine.forms.widgets import Dictionary from bson.objectid ...
{ "repo_name": "mishudark/indie", "path": "django_mongoengine/forms/fields.py", "copies": "3", "size": "8391", "license": "mit", "hash": -4332005569664083500, "line_mean": 35.1681034483, "line_max": 111, "alpha_frac": 0.6101775712, "autogenerated": false, "ratio": 4.156017830609213, "config_test...
from django import forms from django.core.validators import EMPTY_VALUES from django.core.exceptions import ValidationError from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ from django_mongoengine.utils import force_text from django_mongoengine.forms.widgets impor...
{ "repo_name": "vetional/django-mongoengine", "path": "django_mongoengine/forms/fields.py", "copies": "2", "size": "8418", "license": "bsd-3-clause", "hash": -2390860693159194000, "line_mean": 35.1287553648, "line_max": 111, "alpha_frac": 0.6109527204, "autogenerated": false, "ratio": 4.1529353724...
from django import forms from django.core.validators import EMPTY_VALUES from django_filters.filters import ChoiceFilter, ModelChoiceFilter from django_filters.filterset import FilterSet import amo import mkt from addons.models import Category from mkt.api.forms import SluggableModelChoiceField from mkt.collections.m...
{ "repo_name": "Joergen/zamboni", "path": "mkt/collections/filters.py", "copies": "1", "size": "6379", "license": "bsd-3-clause", "hash": 5056544287938856000, "line_mean": 32.9308510638, "line_max": 79, "alpha_frac": 0.5914720176, "autogenerated": false, "ratio": 4.255503669112742, "config_test"...
from django import forms from django.core.validators import EMPTY_VALUES from django_filters.filters import ChoiceFilter, ModelChoiceFilter from django_filters.filterset import FilterSet import mkt from mkt.api.forms import SluggableModelChoiceField from mkt.collections.models import Collection from mkt.constants.cat...
{ "repo_name": "andymckay/zamboni", "path": "mkt/collections/filters.py", "copies": "2", "size": "6584", "license": "bsd-3-clause", "hash": 4470596266252874000, "line_mean": 32.9381443299, "line_max": 79, "alpha_frac": 0.5915856622, "autogenerated": false, "ratio": 4.26701231367466, "config_test...
from django import forms from django.core.validators import EMPTY_VALUES from mongoengine.errors import ValidationError from mongoengine.base.fields import ObjectIdField from bson.son import SON from UserDict import UserDict def mongoengine_validate_wrapper(old_clean, new_clean, required): """ A wrapper fun...
{ "repo_name": "pimentech/django-mongoforms", "path": "mongoforms/utils.py", "copies": "1", "size": "2415", "license": "bsd-3-clause", "hash": -7277068357496253000, "line_mean": 29.1875, "line_max": 70, "alpha_frac": 0.6144927536, "autogenerated": false, "ratio": 4.086294416243655, "config_test"...
from django import forms from django.core.validators import EMPTY_VALUES, RegexValidator from django.utils.encoding import smart_unicode from django.db.models.options import get_verbose_name from django.utils.text import capfirst from mongoengine import ReferenceField as MongoReferenceField from mongoengine.fields imp...
{ "repo_name": "mishudark/indie", "path": "django_mongoengine/forms/field_generator.py", "copies": "1", "size": "12085", "license": "mit", "hash": -2523400812613144600, "line_mean": 34.3362573099, "line_max": 132, "alpha_frac": 0.5641704592, "autogenerated": false, "ratio": 4.397743813682679, "c...
from django import forms from django.core.validators import EMPTY_VALUES, RegexValidator from django.utils.encoding import smart_unicode from django.utils.text import capfirst try: from django.db.models.options import get_verbose_name except ImportError: from django.utils.text import camel_case_to_spaces as get...
{ "repo_name": "arpitgoyaiitkgp/django-mongoengine", "path": "django_mongoengine/forms/field_generator.py", "copies": "2", "size": "11390", "license": "bsd-3-clause", "hash": 9041321425412071000, "line_mean": 34.59375, "line_max": 132, "alpha_frac": 0.564881475, "autogenerated": false, "ratio": 4....
from django import forms from django.core.validators import ip_address_validator_map, MinValueValidator from django.utils.translation import ugettext_lazy as _ from fobi.base import BaseFormFieldPluginForm, get_theme from fobi.settings import DEFAULT_MAX_LENGTH, DEFAULT_MIN_LENGTH from fobi.widgets import NumberInput ...
{ "repo_name": "mansonul/events", "path": "events/contrib/plugins/form_elements/fields/ip_address/forms.py", "copies": "1", "size": "3562", "license": "mit", "hash": 3857574114997548000, "line_mean": 31.0900900901, "line_max": 78, "alpha_frac": 0.5797304885, "autogenerated": false, "ratio": 4.0067...
from django import forms from django.core.validators import MaxLengthValidator from .validators import * class ManageFileSystems(forms.Form): datasets = forms.ChoiceField(widget=forms.Select()) compression = forms.ChoiceField(widget=forms.Select()) # filesystem = forms.Textarea(widget=forms.Textarea, vali...
{ "repo_name": "ZWS2014/freebsdashboard", "path": "ZFSAdmin/forms.py", "copies": "1", "size": "3625", "license": "bsd-3-clause", "hash": -2703356738890314000, "line_mean": 50.7857142857, "line_max": 103, "alpha_frac": 0.6187586207, "autogenerated": false, "ratio": 4.356971153846154, "config_test...
from django import forms from django.core.validators import MaxLengthValidator from frequencia.accounts.models import User from frequencia.vinculos.models import Vinculo from .models import Maquina class EditMaquinaForm(forms.ModelForm): class Meta: model = Maquina fields = ['nome', 'descricao', '...
{ "repo_name": "bczmufrn/frequencia", "path": "frequencia/registro/forms.py", "copies": "1", "size": "1497", "license": "mit", "hash": -7679319141655270000, "line_mean": 37.2307692308, "line_max": 163, "alpha_frac": 0.6418511066, "autogenerated": false, "ratio": 3.736842105263158, "config_test":...
from django import forms from django.core.validators import MaxLengthValidator, RegexValidator from django.db import models from django.utils.safestring import mark_safe from django_select2.forms import ( ModelSelect2MultipleWidget as DS2_ModelSelect2MultipleWidget, ) from django_select2.forms import ModelSelect2Wi...
{ "repo_name": "pbanaszkiewicz/amy", "path": "amy/workshops/fields.py", "copies": "1", "size": "7271", "license": "mit", "hash": -8409583255170474000, "line_mean": 34.2961165049, "line_max": 124, "alpha_frac": 0.6784486315, "autogenerated": false, "ratio": 4.105590062111801, "config_test": false...
from django import forms from django.core.validators import MinLengthValidator, MinValueValidator, MaxValueValidator, \ RegexValidator from django.db import models from django.forms.models import ModelForm import pyquery from books.utils import isbn_regex import what_transcode.utils from books import utils class...
{ "repo_name": "karamanolev/WhatManager2", "path": "books/models.py", "copies": "4", "size": "3686", "license": "mit", "hash": 4497757938410698000, "line_mean": 45.6582278481, "line_max": 97, "alpha_frac": 0.6486706457, "autogenerated": false, "ratio": 3.642292490118577, "config_test": false, ...
from django import forms from django.core.validators import MinLengthValidator from corehq.apps.style.forms.fields import MultiEmailField from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import ReportNotification class ScheduledReportForm(forms.Form): config_ids = for...
{ "repo_name": "SEL-Columbia/commcare-hq", "path": "corehq/apps/reports/forms.py", "copies": "1", "size": "2529", "license": "bsd-3-clause", "hash": 2417951890536383500, "line_mean": 32.2894736842, "line_max": 83, "alpha_frac": 0.6445235271, "autogenerated": false, "ratio": 4.222036727879799, "c...
from django import forms from django.core.validators import MinLengthValidator from django.db import models from treebeard.mp_tree import MP_Node from wagtail.admin.edit_handlers import FieldPanel from wagtail.admin.forms import WagtailAdminModelForm from .models import StructureNode class BasicNodeChoiceField(for...
{ "repo_name": "mcdale/project-resources", "path": "core/forms.py", "copies": "1", "size": "1969", "license": "mit", "hash": -4476819755494940000, "line_mean": 32.3728813559, "line_max": 75, "alpha_frac": 0.6277298121, "autogenerated": false, "ratio": 4.2162740899357605, "config_test": false, ...
from django import forms from django.core.validators import MinLengthValidator from django.db import models from treebeard.mp_tree import MP_Node from wagtail.admin.edit_handlers import FieldPanel # Create your models here. class StructureNode(MP_Node): """Represents a single nestable Node""" # editable fie...
{ "repo_name": "mcdale/project-resources", "path": "core/models.py", "copies": "1", "size": "1033", "license": "mit", "hash": -6152665214957485000, "line_mean": 25.4871794872, "line_max": 74, "alpha_frac": 0.6389157793, "autogenerated": false, "ratio": 3.9277566539923954, "config_test": false, ...
from django import forms from django.core.validators import MinLengthValidator from hqstyle.forms.fields import MultiEmailField from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import ReportNotification class ScheduledReportForm(forms.Form): config_ids = forms.Multipl...
{ "repo_name": "gmimano/commcaretest", "path": "corehq/apps/reports/forms.py", "copies": "1", "size": "2583", "license": "bsd-3-clause", "hash": 2956780014781747700, "line_mean": 32.5584415584, "line_max": 83, "alpha_frac": 0.643437863, "autogenerated": false, "ratio": 4.220588235294118, "config...
from django import forms from django.core.validators import MinLengthValidator from .models import DemoUser class DemoUserEditForm(forms.ModelForm): """Form for viewing and editing name fields in a DemoUser object. A good reference for Django forms is: http://pydanny.com/core-concepts-django-modelforms....
{ "repo_name": "py-geek/City-Air", "path": "allauthdemo/auth/forms.py", "copies": "2", "size": "1134", "license": "mit", "hash": 58376019127310264, "line_mean": 32.3529411765, "line_max": 109, "alpha_frac": 0.6631393298, "autogenerated": false, "ratio": 3.6938110749185666, "config_test": false, ...
from django import forms from django.core.validators import MinValueValidator, MaxValueValidator from gradapp.models import Assignmentype, Assignment from datetimewidget.widgets import DateTimeWidget class AssignmentypeForm(forms.ModelForm): class Meta: model = Assignmentype exclude = ['prof', 'a...
{ "repo_name": "classgrade/classgrade", "path": "classgrade/gradapp/forms.py", "copies": "1", "size": "3126", "license": "mit", "hash": -4528505596598747600, "line_mean": 36.6626506024, "line_max": 80, "alpha_frac": 0.5684580934, "autogenerated": false, "ratio": 4.253061224489796, "config_test":...
from django import forms from django.core.validators import MinValueValidator, MaxValueValidator class LoginForm(forms.Form): username = forms.CharField(label='', max_length=100, widget=forms.TextInput(attrs={'placeholder': 'Username'})) password = forms.CharField(label='', max_length=100, widget=forms.Passwo...
{ "repo_name": "emccode/HeliosBurn", "path": "heliosburn/django/hbproject/webui/forms.py", "copies": "1", "size": "9620", "license": "mit", "hash": 232866784751933280, "line_mean": 45.4782608696, "line_max": 220, "alpha_frac": 0.6047817048, "autogenerated": false, "ratio": 4.44547134935305, "con...
from django import forms from django.core.validators import RegexValidator from datetime import date from codelabs.config import FIRST_PASS_OUT_BATCH class ForgotPasswordForm(forms.Form): email = forms.EmailField( max_length=254, widget = forms.TextInput( attrs={...
{ "repo_name": "rachitnaruzu/codearena", "path": "codelabs/forms.py", "copies": "1", "size": "25302", "license": "mit", "hash": -2804227982166406700, "line_mean": 39.4832, "line_max": 157, "alpha_frac": 0.3832898585, "autogenerated": false, "ratio": 5.385696040868455, "config_test": false, "ha...
from django import forms from django.core.validators import RegexValidator from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ class AuthenticationAttributeField(forms.CharField): """ A helper field to be used for authentication fields in DataRequestForm ...
{ "repo_name": "sakset/getyourdata", "path": "getyourdata/data_request/forms.py", "copies": "1", "size": "6760", "license": "mit", "hash": 8858674056068198000, "line_mean": 38.7647058824, "line_max": 83, "alpha_frac": 0.573816568, "autogenerated": false, "ratio": 4.863309352517986, "config_test"...
from django import forms from django.core.validators import RegexValidator from django.core.exceptions import ValidationError from . import models def ModelFormFactory(model_class, ex=[]): class Form(forms.ModelForm): class Meta: model = model_class exclude = ex return Form ...
{ "repo_name": "ainterr/scoring_engine", "path": "engine/forms.py", "copies": "1", "size": "3196", "license": "mit", "hash": 7295055920408133000, "line_mean": 35.7356321839, "line_max": 110, "alpha_frac": 0.5732165207, "autogenerated": false, "ratio": 4.665693430656934, "config_test": false, "...
from django import forms from django.core.validators import RegexValidator from django.core.validators import EmailValidator class UserForm(forms.Form): CounterBucketName = "users" # https://docs.djangoproject.com/en/1.8/ref/forms/fields/ user_id = forms.CharField(min_length=1, max_length=64, required=Tr...
{ "repo_name": "nakamura-akifumi/kassis_orange", "path": "app_admin/models/user_form.py", "copies": "1", "size": "1470", "license": "mit", "hash": -8935766821761650000, "line_mean": 30.9069767442, "line_max": 91, "alpha_frac": 0.6144314869, "autogenerated": false, "ratio": 3.2744630071599046, "c...