text
stringlengths
0
1.05M
meta
dict
from django import forms from django.utils.translation import ugettext_noop, ugettext as _ from crispy_forms.helper import FormHelper from crispy_forms import layout as crispy from crispy_forms import bootstrap as twbscrispy from corehq.apps.style import crispy as hqcrispy class ExampleUserLoginForm(forms.Form): ...
{ "repo_name": "qedsoftware/commcare-hq", "path": "corehq/apps/styleguide/examples/simple_crispy_form/forms.py", "copies": "1", "size": "3099", "license": "bsd-3-clause", "hash": -7661795199660235000, "line_mean": 37.2592592593, "line_max": 92, "alpha_frac": 0.588899645, "autogenerated": false, "r...
from django import forms from django.utils.translation import ugettext_noop, ugettext as _ # todo proper B3 Handle from crispy_forms import bootstrap as twbs from crispy_forms.helper import FormHelper from crispy_forms import layout as crispy from corehq.apps.style.crispy import FormActions class ImportIndicatorsFr...
{ "repo_name": "qedsoftware/commcare-hq", "path": "corehq/apps/indicators/forms.py", "copies": "1", "size": "1280", "license": "bsd-3-clause", "hash": 9102831315199344000, "line_mean": 31.8205128205, "line_max": 79, "alpha_frac": 0.61875, "autogenerated": false, "ratio": 4, "config_test": false,...
from django import forms from django.utils.translation import ugettext_noop, ugettext as _, ugettext_lazy from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit, HTML from corehq.apps.hqwebapp.forms import FormListForm from corehq.apps.products.models import P...
{ "repo_name": "puttarajubr/commcare-hq", "path": "corehq/apps/commtrack/forms.py", "copies": "2", "size": "6913", "license": "bsd-3-clause", "hash": -6588333613340527000, "line_mean": 37.6201117318, "line_max": 114, "alpha_frac": 0.598003761, "autogenerated": false, "ratio": 4.425736235595391, ...
from django import forms from django.utils.translation import ugettext, ugettext_lazy as _ from django.contrib.auth.forms import UserChangeForm, UserCreationForm from dragon_portal.models import DragonUser, ParentProfile, StudentProfile from django.forms.models import fields_for_model, mo...
{ "repo_name": "eje211/digital-dragon", "path": "dragon_portal/forms.py", "copies": "1", "size": "5537", "license": "apache-2.0", "hash": -8393779256499646000, "line_mean": 39.7132352941, "line_max": 107, "alpha_frac": 0.6230810908, "autogenerated": false, "ratio": 4.107566765578635, "config_tes...
from django import forms from django.utils.translation import ugettext, ugettext_lazy as _ from django.contrib.auth.models import User from eventsfinder.models import Event, Staff import datetime class EventCreationForm(forms.ModelForm): error_messages = { 'invalid_address': _("Please provide a valid ad...
{ "repo_name": "axsauze/eventsfinder", "path": "eventsfinder/tools/forms.py", "copies": "1", "size": "5899", "license": "bsd-3-clause", "hash": -458219567805142300, "line_mean": 37.5620915033, "line_max": 90, "alpha_frac": 0.6128157315, "autogenerated": false, "ratio": 4.139649122807017, "config...
from django import forms from django.utils.translation import ugettext, ugettext_lazy as _ from django.contrib.auth.models import User from Finpy.models import UserProfile, Entry, InvestmentSimulation class UserCreationForm(forms.ModelForm): """Classe UserCreationForm. Classe que possui os tratamentos ine...
{ "repo_name": "KanJam/Finpy", "path": "Finpy/forms.py", "copies": "1", "size": "3304", "license": "mit", "hash": 2475738690095671300, "line_mean": 29.1666666667, "line_max": 75, "alpha_frac": 0.6534683855, "autogenerated": false, "ratio": 3.7577854671280275, "config_test": false, "has_no_keyw...
from django import forms from django.utils.translation import ugettext, ugettext_lazy as _ from django.contrib.auth.models import User class UserCreationForm(forms.ModelForm): """ A form that creates a user, with no privileges, from the given username, email, and password. """ error_messages = { ...
{ "repo_name": "dennispr/glsPinry", "path": "pinry/users/forms.py", "copies": "1", "size": "1439", "license": "bsd-2-clause", "hash": 3202170691356095500, "line_mean": 34.975, "line_max": 78, "alpha_frac": 0.6407227241, "autogenerated": false, "ratio": 4.3343373493975905, "config_test": false, ...
from django import forms from django.utils.translation import ugettext, ugettext_lazy as _ from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.forms import ReadOnlyPasswordHashField from django.contrib.auth.models import Group from users.models import OCUser, Member...
{ "repo_name": "hasadna/OpenCommunity", "path": "src/users/admin.py", "copies": "1", "size": "3879", "license": "bsd-3-clause", "hash": -8975380714010277000, "line_mean": 34.2636363636, "line_max": 97, "alpha_frac": 0.6439804073, "autogenerated": false, "ratio": 4.188984881209503, "config_test":...
from django import forms from django.utils.translation import ugettext, ugettext_lazy as _ import logging logger = logging.getLogger(__name__) class LoginForm(forms.Form): pass class AuthenticationForm(forms.Form): error_messages = { 'invalid_login': _('Please enter a correct username and password....
{ "repo_name": "allanlei/django-oauthentication", "path": "oauthentication/base/forms.py", "copies": "1", "size": "1380", "license": "bsd-3-clause", "hash": 4601777864109144600, "line_mean": 29.6666666667, "line_max": 118, "alpha_frac": 0.6427536232, "autogenerated": false, "ratio": 4.495114006514...
from django import forms from django.utils.translation import ugettext, ugettext_lazy as _ import six from django_statsd.clients import statsd import olympia.core.logger from olympia import amo from olympia.amo.utils import clean_nl, has_links, slug_validator, slugify from olympia.translations.widgets import ( ...
{ "repo_name": "wagnerand/olympia", "path": "src/olympia/bandwagon/forms.py", "copies": "2", "size": "4812", "license": "bsd-3-clause", "hash": 136702137654273810, "line_mean": 31.9589041096, "line_max": 78, "alpha_frac": 0.6236492103, "autogenerated": false, "ratio": 4.191637630662021, "config_...
from django import forms from django.utils.translation import ungettext_lazy, ugettext_lazy as _ from django.utils.six import text_type # noinspection PyCompatibility import ipaddress from api.dc.network.views import dc_network from api.network.base.views import net_manage from api.network.ip.views import net_ip, net...
{ "repo_name": "erigones/esdc-ce", "path": "gui/dc/network/forms.py", "copies": "1", "size": "11559", "license": "apache-2.0", "hash": 3996555927275851300, "line_mean": 43.8023255814, "line_max": 119, "alpha_frac": 0.5709836491, "autogenerated": false, "ratio": 4.366830374008312, "config_test": ...
from django import forms from django.views.generic import TemplateView from rest_framework import viewsets from tinymce.widgets import TinyMCE from mes_fichiers.models import MonAlbum, MonFichier from mes_fichiers.serializers import AlbumSerializer, \ FileSerializer, AlbumListSerializer, FileCreationSerializer, B...
{ "repo_name": "pavelulyashev/django-mes-fichiers", "path": "mes_fichiers/views.py", "copies": "1", "size": "2004", "license": "bsd-3-clause", "hash": 4985294872220758000, "line_mean": 32.4, "line_max": 84, "alpha_frac": 0.6856287425, "autogenerated": false, "ratio": 3.7882797731569, "config_tes...
from django import forms from djangovoice.models import Feedback class WidgetForm(forms.ModelForm): class Meta: model = Feedback fields = ( 'email', 'type', 'anonymous', 'private', 'title', 'description') class FeedbackForm(forms.ModelForm): class Meta: model = Feedback ...
{ "repo_name": "gkmngrgn/django-voice", "path": "djangovoice/forms.py", "copies": "1", "size": "1540", "license": "bsd-3-clause", "hash": -6876470040433383000, "line_mean": 29.8, "line_max": 76, "alpha_frac": 0.6, "autogenerated": false, "ratio": 4.1961852861035425, "config_test": false, "has_...
from django import forms from djbase.forms import ISODateTimeField from djajax.decorators import ajax from djajax.exceptions import AjaxError class PostForm(forms.Form): param1 = ISODateTimeField(required=False) param2 = forms.CharField(max_length=5, required=True) class EmailTakenError(AjaxError): """...
{ "repo_name": "lucastan/django-starter-box", "path": "djajax/tests/ajax.py", "copies": "1", "size": "1624", "license": "mit", "hash": 7706142361229132000, "line_mean": 24.7777777778, "line_max": 90, "alpha_frac": 0.6637931034, "autogenerated": false, "ratio": 3.440677966101695, "config_test": f...
from django import forms from djblets.siteconfig.forms import SiteSettingsForm from djblets.siteconfig.models import SiteConfiguration from reviewboard.accounts.backends import AuthBackend from django.contrib.auth.models import User from reviewboard.reviews.models import Group import requests import json import logging...
{ "repo_name": "asterisk/reviewboard-crowd", "path": "crowd/__init__.py", "copies": "1", "size": "4497", "license": "mit", "hash": 3335714207157831700, "line_mean": 37.7672413793, "line_max": 100, "alpha_frac": 0.599066044, "autogenerated": false, "ratio": 4.3617846750727445, "config_test": true...
from django import forms from djexperience.utils.lists import GENDER from .models import Customer, Employee, Provider class CustomerForm(forms.ModelForm): gender = forms.ChoiceField( label='Sexo', choices=GENDER, initial='M', widget=forms.RadioSelect) class Meta: model = Customer fiel...
{ "repo_name": "rg3915/django-experience", "path": "djexperience/crm/forms.py", "copies": "1", "size": "1295", "license": "mit", "hash": 1924592548517820200, "line_mean": 29.8333333333, "line_max": 76, "alpha_frac": 0.6115830116, "autogenerated": false, "ratio": 3.831360946745562, "config_test":...
from django import forms from djmoney.forms.fields import MoneyField from foobar.wallet import api as wallet_api from django.utils.translation import ugettext as _ from .. import api class CorrectionForm(forms.Form): balance = MoneyField(label=_('Balance'), min_value=0) comment = forms.CharField(label=_('Comm...
{ "repo_name": "uppsaladatavetare/foobar-api", "path": "src/foobar/views/forms.py", "copies": "1", "size": "1582", "license": "mit", "hash": 652335350452996400, "line_mean": 34.9545454545, "line_max": 76, "alpha_frac": 0.6340075853, "autogenerated": false, "ratio": 3.8398058252427183, "config_te...
from django import forms from djwed.wedding.models import * from djwed.wedding.admin_actions import * from django.contrib import admin class RequireOneFormSet(forms.models.BaseInlineFormSet): """Require at least one form in the formset to be completed.""" def clean(self): """Check that at least one fo...
{ "repo_name": "garyp/djwed", "path": "wedding/admin.py", "copies": "1", "size": "10509", "license": "mit", "hash": 9020607368790616000, "line_mean": 33.1201298701, "line_max": 134, "alpha_frac": 0.5856884575, "autogenerated": false, "ratio": 3.836801752464403, "config_test": false, "has_no_ke...
from django import forms from dopomoga.models import * from django.contrib.auth.models import User # from django.utils import timezone class UserForm(forms.ModelForm): username = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Username'})) email = forms.CharField(widget=forms.TextInput(attrs={'p...
{ "repo_name": "andrenovax/dopomoga_project", "path": "dopomoga/forms.py", "copies": "1", "size": "3322", "license": "mit", "hash": -3545464736318642000, "line_mean": 45.7887323944, "line_max": 147, "alpha_frac": 0.6613485852, "autogenerated": false, "ratio": 4.126708074534162, "config_test": fa...
from django import forms from draftHost import models class AuthContext(object): """Fetches the current team & draft from the request""" def __init__(self, request): self.request = request self.find_key_from_req() self.find_team_from_key() self.find_draft_from_team() def fi...
{ "repo_name": "gnmerritt/autodraft", "path": "autodraft/draftHost/logic/auth.py", "copies": "1", "size": "1341", "license": "mit", "hash": 2470660920785778000, "line_mean": 30.1860465116, "line_max": 73, "alpha_frac": 0.5980611484, "autogenerated": false, "ratio": 3.853448275862069, "config_tes...
from django import forms from dropzone.utils import flatatt from django.template import loader, Context class TemplateBasedInput(forms.widgets.Input): template_name = '' def get_context_data(self, name, value, attrs): context = { 'upload_name': name, 'value': value, ...
{ "repo_name": "un33k/django-dropzone", "path": "example_project/dropzone/forms.py", "copies": "2", "size": "1474", "license": "mit", "hash": -8727617698651929000, "line_mean": 31.7777777778, "line_max": 86, "alpha_frac": 0.6322930801, "autogenerated": false, "ratio": 3.909814323607427, "config_...
from django import forms from enrollment.models import Servicio from enrollment.models import TipoServicio from enrollment.models import Matricula from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django.forms import ModelForm from utils.models import TiposNivel from utils.models im...
{ "repo_name": "furthz/colegio", "path": "src/enrollment/forms.py", "copies": "1", "size": "9870", "license": "mit", "hash": 2444194654460877000, "line_mean": 31.9531772575, "line_max": 101, "alpha_frac": 0.5400385669, "autogenerated": false, "ratio": 3.3685470085470084, "config_test": false, ...
from django import forms from etc.entities import create_handle from entity_items.models import ContentItem from org.models import Org, OrgIssueRelationship from issue.models import Issue from users.models import Location from django.contrib.admin.widgets import FilteredSelectMultiple from django.core.exceptions import...
{ "repo_name": "jumoconnect/openjumo", "path": "jumodjango/org/forms.py", "copies": "1", "size": "6280", "license": "mit", "hash": -6606738044854411000, "line_mean": 40.3157894737, "line_max": 135, "alpha_frac": 0.6202229299, "autogenerated": false, "ratio": 4.096542726679713, "config_test": fal...
from django import forms from extra_views import InlineFormSet from epiceditor.widgets import EpicEditorWidget from .models import ClaimRequest, Store, Address class BootstrapModelForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BootstrapModelForm, self).__init__(*args, **kwargs) ...
{ "repo_name": "nikdoof/vapemap", "path": "app/stores/forms.py", "copies": "1", "size": "1687", "license": "bsd-3-clause", "hash": 7275024627643912000, "line_mean": 27.593220339, "line_max": 105, "alpha_frac": 0.5880260818, "autogenerated": false, "ratio": 4.155172413793103, "config_test": false...
from django import forms from fluent_contents.models import Placeholder __all__ = ('ContentItemForm',) class ContentItemForm(forms.ModelForm): """ The base form for custom :class:`~fluent_contents.models.ContentItem` types. It displays the additional meta fields as hidden fields. When creating custo...
{ "repo_name": "jpotterm/django-fluent-contents", "path": "fluent_contents/forms/__init__.py", "copies": "3", "size": "1265", "license": "apache-2.0", "hash": 4088673756559862300, "line_mean": 47.6538461538, "line_max": 120, "alpha_frac": 0.7391304348, "autogenerated": false, "ratio": 4.2881355932...
from django import forms from .forms import PartSubmissionForm, UserForm, UserProfileForm, LoginForm, CSVImportForm from django.shortcuts import render from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from ...
{ "repo_name": "avistel/cyckotron", "path": "partdb/views.py", "copies": "1", "size": "4593", "license": "bsd-3-clause", "hash": -4491451382767006700, "line_mean": 32.5255474453, "line_max": 122, "alpha_frac": 0.6390158938, "autogenerated": false, "ratio": 4.2098991750687444, "config_test": fals...
from django import forms from freemix.dataset.models import Dataset class CreateDatasetForm(forms.ModelForm): def __init__(self, *args, **kwargs): self.owner = kwargs.pop('owner') self.datasource = kwargs.pop('datasource') super(CreateDatasetForm, self).__init__(*args, **kwargs) def s...
{ "repo_name": "zepheira/freemix", "path": "freemix/dataset/forms.py", "copies": "1", "size": "1158", "license": "apache-2.0", "hash": -6216581959278401000, "line_mean": 29.4736842105, "line_max": 90, "alpha_frac": 0.6010362694, "autogenerated": false, "ratio": 4.369811320754717, "config_test": ...
from django import forms from freemix.exhibit import conf from freemix.exhibit.models import Exhibit, Theme, Canvas class CreateExhibitForm(forms.ModelForm): def __init__(self, *args, **kwargs): self.owner = kwargs.pop('owner') self.dataset = kwargs.pop('dataset') self.canvas = kwargs.pop(...
{ "repo_name": "zepheira/freemix", "path": "freemix/exhibit/forms.py", "copies": "1", "size": "1306", "license": "apache-2.0", "hash": 7260810726677704000, "line_mean": 34.2972972973, "line_max": 106, "alpha_frac": 0.6225114855, "autogenerated": false, "ratio": 3.9696048632218845, "config_test":...
from django import forms from functools import partial from .models import Asado, User, Assignment, Supply, Invitation from datetimewidget.widgets import DateTimeWidget from django.utils import timezone from django.core.exceptions import ValidationError class AddAsadoForm(forms.ModelForm): class Meta: mod...
{ "repo_name": "TenStrings/organizador-de-asados", "path": "asados/forms.py", "copies": "1", "size": "2229", "license": "mit", "hash": -740259635292918700, "line_mean": 28.3289473684, "line_max": 70, "alpha_frac": 0.5262449529, "autogenerated": false, "ratio": 4.150837988826815, "config_test": f...
from django import forms from game.models import * class CreateAccountForm(forms.ModelForm): error_messages = { 'username_taken': "That username is taken.", 'password_mismatch': "Passwords do not match", } password1 = forms.CharField(label="Password", widget=forms.PasswordInput) passwor...
{ "repo_name": "dvcolgan/ludumdare27", "path": "game/forms.py", "copies": "1", "size": "1027", "license": "mit", "hash": -1260766782401653500, "line_mean": 34.4137931034, "line_max": 84, "alpha_frac": 0.6533592989, "autogenerated": false, "ratio": 4.351694915254237, "config_test": false, "has_...
from django import forms from geotrek.core.forms import TopologyForm from geotrek.core.widgets import PointTopologyWidget from .models import Infrastructure, InfrastructureType, Signage class BaseInfrastructureForm(TopologyForm): class Meta(TopologyForm.Meta): fields = TopologyForm.Meta.fields + \ ...
{ "repo_name": "camillemonchicourt/Geotrek", "path": "geotrek/infrastructure/forms.py", "copies": "1", "size": "1147", "license": "bsd-2-clause", "hash": 1190767654235738000, "line_mean": 33.7575757576, "line_max": 65, "alpha_frac": 0.6957279861, "autogenerated": false, "ratio": 3.888135593220339,...
from django import forms from gestionpedidos.models import Pedido, Cliente, PerfilUsuario from django.contrib.auth.models import User class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput()) class Meta: model = User fields = ('username', 'email', 'password') c...
{ "repo_name": "ignaciorecuerda/gestionpedidos_django", "path": "gestionpedidos/forms.py", "copies": "1", "size": "2520", "license": "cc0-1.0", "hash": 2966012440674711600, "line_mean": 40.3278688525, "line_max": 141, "alpha_frac": 0.6738095238, "autogenerated": false, "ratio": 3.766816143497758, ...
from django import forms from gge_proxy_manager.models import Unit, LogisticJob, Castle, Alliance from pushover.models import Client, Notify, MESSAGE_PRIORITY import re class PushoverClientForm(forms.ModelForm): class Meta: model = Client class PushoverNotificationForm(forms.Form): RETRY = ( ...
{ "repo_name": "mrcrgl/gge-storage", "path": "intern/forms/my.py", "copies": "1", "size": "6082", "license": "mit", "hash": 4422431541761443300, "line_mean": 41.838028169, "line_max": 172, "alpha_frac": 0.6724761592, "autogenerated": false, "ratio": 3.531939605110337, "config_test": false, "ha...
from django import forms from gibbs import constants import logging class ListFormField(forms.MultipleChoiceField): """ A form field for a list of values that are unchecked. The Django MultipleChoiceField does *almost* what we want, except it validates that each choice is in a supp...
{ "repo_name": "flamholz/equilibrator", "path": "gibbs/forms.py", "copies": "1", "size": "5819", "license": "mit", "hash": 3649324672363467300, "line_mean": 39.4097222222, "line_max": 87, "alpha_frac": 0.652173913, "autogenerated": false, "ratio": 4.225853304284676, "config_test": false, "has_...
from django import forms from gipsy.dashboard.settings import GIPSY_DASHBOARD_HAS_ROWS, GIPSY_DASHBOARD_DEFAULT_GRID class Dashboard(object): ''' This class is collecting the widgets setup in the settings.GIPSY_DASHBOARD constant. It is adding widget in rows in order to display them more efficiently ...
{ "repo_name": "Seha16/gipsy", "path": "gipsy/dashboard/dashboard.py", "copies": "4", "size": "2003", "license": "bsd-3-clause", "hash": -804631047223723400, "line_mean": 31.3064516129, "line_max": 91, "alpha_frac": 0.5716425362, "autogenerated": false, "ratio": 4.373362445414847, "config_test":...
from django import forms from greenmine.scrum.models import * class ProjectForm(forms.ModelForm): class Meta: model = Project fields = ('name', 'description') def clean_name(self): name = self.cleaned_data['name'] if self.instance is None: projectqs = Project.object...
{ "repo_name": "niwinz/Green-Mine", "path": "src/greenmine/scrum/forms/project.py", "copies": "1", "size": "1788", "license": "bsd-3-clause", "hash": -1312451119494132200, "line_mean": 32.1111111111, "line_max": 86, "alpha_frac": 0.6504474273, "autogenerated": false, "ratio": 4.082191780821918, ...
from django import forms from groove.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": "bobbybabra/codeGuild", "path": "geneGroove_project/groove/forms.py", "copies": "1", "size": "1815", "license": "bsd-2-clause", "hash": -1315731142620800300, "line_mean": 39.3333333333, "line_max": 92, "alpha_frac": 0.6545454545, "autogenerated": false, "ratio": 4.240654205607477, ...
from django import forms from group.models import Group from django.conf import settings ### add/edit group form class GroupForm(forms.ModelForm): class Meta: model = Group fields = ('name', 'interval_hours', 'publish', 'ignore_name_mismatch') def clean(self): ### get interval_hours fr...
{ "repo_name": "tykling/tlsscout", "path": "src/group/forms.py", "copies": "1", "size": "1535", "license": "bsd-3-clause", "hash": 4558769366413546500, "line_mean": 32.3695652174, "line_max": 154, "alpha_frac": 0.6, "autogenerated": false, "ratio": 4.595808383233533, "config_test": false, "has...
from django import forms from group.models import Group from livecenter.models import Location, Livelihood from livecenter.forms import DistrictForm from counter.tools import BaseForm from .models import People, Training, genders def groups(lc): items = [('','')] for group in Group.objects.filter(livecenter=l...
{ "repo_name": "rimbalinux/LMD3", "path": "people/forms.py", "copies": "1", "size": "1354", "license": "bsd-3-clause", "hash": 2235183812534182400, "line_mean": 31.2380952381, "line_max": 79, "alpha_frac": 0.6159527326, "autogenerated": false, "ratio": 3.970674486803519, "config_test": false, ...
from django import forms from Grundgeruest.models import ScholariumProfile from Produkte.models import Spendenstufe class Rechnung2PdfForm(forms.Form): firm = forms.CharField(max_length=50, initial='scholarium') author = forms.CharField(max_length=50, initial='Georg A. Schabetsberger') recipent = forms.Ch...
{ "repo_name": "valuehack/scholarium.at", "path": "Workflow/forms.py", "copies": "1", "size": "2187", "license": "mit", "hash": 2355056733479166500, "line_mean": 37.298245614, "line_max": 116, "alpha_frac": 0.6568941823, "autogenerated": false, "ratio": 3.317629179331307, "config_test": false, ...
from django import forms from guia.models import Menu from guia.models import City from guia.models import Local class MenuForm(forms.ModelForm): # description = forms.CharField(widget=forms.TextInput(attrs={'class': 'special', 'type' : 'email'})) id = forms.CharField(required=False, widget=forms.HiddenInput()) ...
{ "repo_name": "thaleslima/GuiaApp-adm", "path": "guia/forms.py", "copies": "1", "size": "3506", "license": "apache-2.0", "hash": 1692555086259821800, "line_mean": 44.5324675325, "line_max": 146, "alpha_frac": 0.698231603, "autogenerated": false, "ratio": 3.4171539961013644, "config_test": false...
from django import forms from h1ds.models import Device from h1ds_summary.models import SummaryAttribute from h1ds_summary.validators import shotslug_validator, attributeslug_validator from h1ds_summary.parsers import parse_shot_slug, parse_attr_str class SummaryAttributeForm(forms.ModelForm): class Meta: m...
{ "repo_name": "h1ds/h1ds", "path": "h1ds/h1ds_summary/forms.py", "copies": "1", "size": "1655", "license": "mit", "hash": -214507504021422080, "line_mean": 47.6764705882, "line_max": 100, "alpha_frac": 0.6725075529, "autogenerated": false, "ratio": 4.00726392251816, "config_test": false, "has...
from django import forms from hackday.users.models import User, UserProfile from hackday.teams.models import Team from hackday.voting.moremodels import Category, TYPE class UserChoiceField(forms.ModelChoiceField): def label_from_instance(self, user): return "{0} {1}".format(user.first_name, user.last_name)...
{ "repo_name": "mpirnat/hackday", "path": "hackday/teams/forms.py", "copies": "1", "size": "1151", "license": "mit", "hash": -7069720814874831000, "line_mean": 31.8857142857, "line_max": 73, "alpha_frac": 0.6976542137, "autogenerated": false, "ratio": 3.8112582781456954, "config_test": false, ...
from django import forms from hackday.voting.moremodels import Category, TYPE from hackday.teams.models import Team, STATUS, PROJECT_TYPE class VoteForm(forms.Form): def __init__(self, *args, **kwargs): super(VoteForm, self).__init__(*args, **kwargs) categories = Category.objects.filter(type=TYPE...
{ "repo_name": "mpirnat/hackday", "path": "hackday/voting/forms.py", "copies": "1", "size": "2343", "license": "mit", "hash": 946818364839609700, "line_mean": 42.3888888889, "line_max": 107, "alpha_frac": 0.5941101152, "autogenerated": false, "ratio": 4.0890052356020945, "config_test": false, ...
from django import forms from hackfsu_com.views.generic import ApiView from hackfsu_com.util import acl from hackfsu_com.util.forms import JsonField from api.models import Hackathon, JudgeInfo, JudgingAssignment class ResponseForm(forms.Form): judges = JsonField() class ApprovedAndCheckedInView(ApiView): ht...
{ "repo_name": "andrewsosa/hackfsu_com", "path": "api/api/views/judge/get/approved_and_checked_in.py", "copies": "2", "size": "1301", "license": "apache-2.0", "hash": -2754499400764367000, "line_mean": 36.1714285714, "line_max": 110, "alpha_frac": 0.6610299769, "autogenerated": false, "ratio": 3.8...
from django import forms from hashlib import md5 from django.conf import settings class WPHostedPaymentForm(forms.Form): def __init__(self, *args, **kwargs): super(WPHostedPaymentForm, self).__init__(*args, **kwargs) if self.initial: self.initial["signatureFields"] = self.initial.get("...
{ "repo_name": "agiliq/merchant", "path": "billing/forms/world_pay_forms.py", "copies": "3", "size": "2158", "license": "bsd-3-clause", "hash": -1872329265921327400, "line_mean": 51.6341463415, "line_max": 107, "alpha_frac": 0.6825764597, "autogenerated": false, "ratio": 4.198443579766537, "conf...
from django import forms from haystack.forms import FacetedSearchForm from crispy_forms.layout import * from crispy_forms.bootstrap import * import datetime class MyForm(FacetedSearchForm): #faceted_choices = (('author', 'Author'), ('creators', 'Creators'),('subjects', 'Subjects'), # ('publi...
{ "repo_name": "FescueFungiShare/hydroshare", "path": "hs_core/customer_form.py", "copies": "4", "size": "1403", "license": "bsd-3-clause", "hash": -5212181833262936000, "line_mean": 49.1071428571, "line_max": 140, "alpha_frac": 0.6478973628, "autogenerated": false, "ratio": 3.430317848410758, "...
from django import forms from haystack.forms import SearchForm, model_choices from base.models import * from haystack.inputs import Raw from haystack.query import SearchQuerySet, SQ, RelatedSearchQuerySet from django.db import models import re from mptt.forms import TreeNodeChoiceField from django_select2 import AutoMo...
{ "repo_name": "sashafr/uronline", "path": "base/forms.py", "copies": "1", "size": "62722", "license": "bsd-3-clause", "hash": -4936362759964619000, "line_mean": 43.9949784792, "line_max": 227, "alpha_frac": 0.5055642358, "autogenerated": false, "ratio": 4.295144833253441, "config_test": false, ...
from django import forms from haystack.forms import SearchForm from .models import Country GOVERNMENT_CHOICES = [('', '')] + [ (c['government_type'], c['government_type']) for c in Country.objects.values('government_type').distinct().order_by('government_type')] class CountrySearchForm(forms.Form): ...
{ "repo_name": "bennylope/ciafactbook", "path": "countries/forms.py", "copies": "1", "size": "1265", "license": "bsd-2-clause", "hash": 4720518000770201000, "line_mean": 27.1111111111, "line_max": 94, "alpha_frac": 0.6411067194, "autogenerated": false, "ratio": 3.8685015290519877, "config_test":...
from django import forms from haystack.forms import SearchForm from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit, Field class LackawannaSearchForm(SearchForm): query = forms.CharField(label='Query') def __init__(self, *args, **kwargs): ...
{ "repo_name": "allyjweir/lackawanna", "path": "lackawanna/search/forms.py", "copies": "1", "size": "1030", "license": "bsd-3-clause", "hash": 6689349005214421000, "line_mean": 28.4285714286, "line_max": 77, "alpha_frac": 0.5951456311, "autogenerated": false, "ratio": 3.946360153256705, "config_...
from django import forms from haystack.forms import SearchForm class DummyPoint(object): """ Satisfies the most basic needs of a Point object for the purpose of search distance without needing any of the GeoDjango dependencies. Haystack's `ensure_geometry` function simpy checks that the object has an...
{ "repo_name": "bennylope/ciafactbook", "path": "search/forms.py", "copies": "1", "size": "1813", "license": "bsd-2-clause", "hash": -6107214884998945000, "line_mean": 27.7777777778, "line_max": 79, "alpha_frac": 0.5857694429, "autogenerated": false, "ratio": 4.019955654101995, "config_test": fa...
from django import forms from hipchat import HipChat from sentry.plugins.bases.notify import NotificationPlugin from sentry.utils.strings import strip import xml.sax.saxutils as saxutils import sentry_notify_hipchat DEFAULT_HIPCHAT_ENDPOINT = 'https://api.hipchat.com/v1/' class NotifyHipchatForm(forms.Form): t...
{ "repo_name": "eagletmt/sentry-notify-hipchat", "path": "sentry_notify_hipchat/plugin.py", "copies": "1", "size": "2021", "license": "mit", "hash": 7528099834938609000, "line_mean": 37.8653846154, "line_max": 95, "alpha_frac": 0.6739238001, "autogenerated": false, "ratio": 3.539404553415061, "c...
from django import forms from hrzn.models import * class Registrationformins(forms.ModelForm): class Meta: # Set this form to use the Areas Model model = Registration # exclude these fields exclude = ('paid','user', 'qr_code') def __init__(self, *args, **kwargs): ...
{ "repo_name": "sheeshmohsin/horizon_2k15", "path": "app/hrzn/forms.py", "copies": "1", "size": "1723", "license": "mit", "hash": 6415555255491808000, "line_mean": 37.2888888889, "line_max": 87, "alpha_frac": 0.5803830528, "autogenerated": false, "ratio": 4.264851485148514, "config_test": false,...
from django import forms from ietf.secr.areas.models import * import re class LiaisonForm(forms.Form): liaison_name = forms.CharField(max_length=100,label='Name',help_text="To see a list of people type the first name, or last name, or both.") affiliation = forms.CharField(max_length=50) # set css class=na...
{ "repo_name": "mcr/ietfdb", "path": "ietf/secr/roles/forms.py", "copies": "1", "size": "2057", "license": "bsd-3-clause", "hash": 8026450627776031000, "line_mean": 45.75, "line_max": 143, "alpha_frac": 0.6524064171, "autogenerated": false, "ratio": 3.816326530612245, "config_test": false, "ha...
from django import forms from imager_images.models import Photo, Album class AddPhotoForm(forms.ModelForm): """Create a photo form.""" class Meta: model = Photo exclude = ['photographer', 'date_modified', 'date_published', 'date_uploaded'] class AddAlbumForm(forms.ModelForm): """Create ...
{ "repo_name": "JSchatzman/django-imager", "path": "imagersite/imager_images/forms.py", "copies": "1", "size": "1471", "license": "mit", "hash": -3033629142505100000, "line_mean": 26.2407407407, "line_max": 86, "alpha_frac": 0.5812372536, "autogenerated": false, "ratio": 4.239193083573487, "conf...
from django import forms from imager_profile.models import ImagerProfile class EditProfileForm(forms.ModelForm): """Form to edit a profile.""" def __init__(self, *args, **kwargs): """Form.""" super(EditProfileForm, self).__init__(*args, **kwargs) self.fields["name"] = forms.CharField(...
{ "repo_name": "JSchatzman/django-imager", "path": "imagersite/imager_profile/forms.py", "copies": "1", "size": "1048", "license": "mit", "hash": -6795689918740189000, "line_mean": 46.6363636364, "line_max": 109, "alpha_frac": 0.6870229008, "autogenerated": false, "ratio": 3.7562724014336917, "c...
from django import forms from images.models import Image class ContactForm(forms.Form): """ Allows a user to send a general email to the site admins. """ email = forms.EmailField( label='Your email address', help_text="Enter your email address so we can reply to you.", ) subjec...
{ "repo_name": "DevangS/CoralNet", "path": "lib/forms.py", "copies": "1", "size": "2225", "license": "bsd-2-clause", "hash": -2010743810450686700, "line_mean": 30.3521126761, "line_max": 73, "alpha_frac": 0.5995505618, "autogenerated": false, "ratio": 4.128014842300557, "config_test": false, "...
from django import forms from . import models from apps.user.models import User class ProfileForm(forms.ModelForm): class Meta: model = models.Profile fields = ['company', 'info', 'expert', 'visibility_mail', 'visibility_company', 'visibility_info', 'visibility_f...
{ "repo_name": "IT-PM-OpenAdaptronik/Webapp", "path": "apps/profile/forms.py", "copies": "1", "size": "1141", "license": "mit", "hash": -4258086645109864400, "line_mean": 26.1666666667, "line_max": 66, "alpha_frac": 0.6292725679, "autogenerated": false, "ratio": 3.9209621993127146, "config_test"...
from django import forms from . import models from apps.utils import forms as utils, constants from django.forms import models as models_form from apps.personas import models as persona_models class VacanteForm(utils.BaseFormAllFields): title = 'Vacante' fecha = forms.DateField(input_formats=constants.INPUT_F...
{ "repo_name": "0sw4l/villas-de-san-pablo", "path": "apps/empleabilidad/forms.py", "copies": "1", "size": "1944", "license": "mit", "hash": 4869105934780095000, "line_mean": 28.9076923077, "line_max": 80, "alpha_frac": 0.6723251029, "autogenerated": false, "ratio": 3.834319526627219, "config_tes...
from django import forms from index.models import * class UserForm(forms.Form): username = forms.CharField(label='用户名', widget=forms.TextInput(attrs={'class':'form-control login-field', 'placeholder':'用户名'}), max_length=30) password = forms.CharField(label='密码', widget=forms.PasswordInput(attrs={'class':'form...
{ "repo_name": "light-white/meeting", "path": "index/forms.py", "copies": "1", "size": "2515", "license": "apache-2.0", "hash": 2234824357449155600, "line_mean": 91.92, "line_max": 165, "alpha_frac": 0.7262160999, "autogenerated": false, "ratio": 3.186556927297668, "config_test": false, "has_n...
from django import forms from infrastructure.models import * from django.db.models import Q from django.utils.translation import ugettext_lazy as _ import re class MachineAddForm(forms.Form): name = forms.CharField(error_messages={'required': _('No Name has been entered')}, max_length=40...
{ "repo_name": "alexei38/webvirt", "path": "infrastructure/forms.py", "copies": "1", "size": "10337", "license": "mit", "hash": -6145496220744138000, "line_mean": 44.7389380531, "line_max": 123, "alpha_frac": 0.5977556351, "autogenerated": false, "ratio": 4.345102984447247, "config_test": false,...
from django import forms from instance.models import Flavor from django.utils.translation import ugettext_lazy as _ import re class FlavorAddForm(forms.Form): name = forms.CharField(label="Name", error_messages={'required': _('No flavor name has been entered')}, ...
{ "repo_name": "selboo/starl-mangle", "path": "webvirtmgr/newvm/forms.py", "copies": "1", "size": "2484", "license": "apache-2.0", "hash": 3106747413680250400, "line_mean": 46.7692307692, "line_max": 117, "alpha_frac": 0.6256038647, "autogenerated": false, "ratio": 4.396460176991151, "config_tes...
from django import forms from instance.models import Host from django.utils.translation import ugettext_lazy as _ import re class HostAddTcpForm(forms.Form): name = forms.CharField(error_messages={'required': _('No hostname has been entered')}, max_length=20) hostname = forms.CharFi...
{ "repo_name": "selboo/starl-mangle", "path": "webvirtmgr/dashboard/forms.py", "copies": "1", "size": "4381", "license": "apache-2.0", "hash": -7606556960644086000, "line_mean": 43.7040816327, "line_max": 117, "alpha_frac": 0.598721753, "autogenerated": false, "ratio": 4.601890756302521, "config...
from django import forms from invoices.models import Invoice from common.models import User, Comment, Attachments, Address from django.db.models import Q from teams.models import Teams from accounts.models import Account class InvoiceForm(forms.ModelForm): teams_queryset = [] teams = forms.MultipleChoiceField...
{ "repo_name": "MicroPyramid/Django-CRM", "path": "invoices/forms.py", "copies": "1", "size": "4469", "license": "mit", "hash": 4169995146720718300, "line_mean": 35.9338842975, "line_max": 94, "alpha_frac": 0.5768628328, "autogenerated": false, "ratio": 4.260247855100095, "config_test": false, ...
from django import forms from itertools import chain from django.contrib.auth import get_user_model from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse, reverse_lazy from django.core.urlresolvers import reverse from django.http import HttpResponseForbidden, HttpRespon...
{ "repo_name": "sheshkovsky/jaryan", "path": "links/views.py", "copies": "1", "size": "16963", "license": "apache-2.0", "hash": -4080094175006052400, "line_mean": 37.6423690205, "line_max": 141, "alpha_frac": 0.632199493, "autogenerated": false, "ratio": 3.4753124359762344, "config_test": false,...
from django import forms from judge import models as judge_models class SubmitForm(forms.ModelForm): """ This form is for submission of programming files on the system. It's a ModelForm i.e. it instantiates the Submission object """ class Meta: model = judge_models.Submission fields = [...
{ "repo_name": "cs251-eclipse/EclipseOJ", "path": "EclipseOJ/problems/forms.py", "copies": "1", "size": "1073", "license": "mit", "hash": 9016595414887028000, "line_mean": 41.92, "line_max": 149, "alpha_frac": 0.734389562, "autogenerated": false, "ratio": 4.142857142857143, "config_test": false,...
from django import forms from judge.models import Coder, Problem, TestCase, Submission from django.contrib.auth.models import User class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput()) class Meta: model = User fields = {'username', 'password'} class ProblemF...
{ "repo_name": "paramsingh/poj", "path": "judge/forms.py", "copies": "1", "size": "1042", "license": "mit", "hash": -7006001435076698000, "line_mean": 31.5625, "line_max": 102, "alpha_frac": 0.6429942418, "autogenerated": false, "ratio": 3.8308823529411766, "config_test": false, "has_no_keywor...
from django import forms from lab_app.models import Review, Product from django.contrib.auth.models import User # TODO: Перенести создания форм в джанговские классы # Форма регистрации class SignUpForm(forms.ModelForm): class Meta: model = User widgets = { 'text': forms.TextInput( ...
{ "repo_name": "bestK1ngArthur/IU5", "path": "Term 5/Development of Internet applications/Homework/lab_app/forms.py", "copies": "1", "size": "1414", "license": "mit", "hash": -2047164390868062500, "line_mean": 24.5098039216, "line_max": 94, "alpha_frac": 0.5534204458, "autogenerated": false, "rati...
from django import forms from ladder.models import Result, Player class AddResultForm(forms.ModelForm): result = forms.IntegerField(min_value=0, max_value=8, label='Losing Result') # filter the player fields by ladder on init def __init__(self, ladder, *args, **kwargs): super(AddResultForm, self)...
{ "repo_name": "jzahedieh/django-tennis-ladder", "path": "ladder/forms.py", "copies": "1", "size": "2791", "license": "mit", "hash": -3696306282103911000, "line_mean": 38.323943662, "line_max": 131, "alpha_frac": 0.632748119, "autogenerated": false, "ratio": 4.203313253012048, "config_test": fal...
from django import forms from library.models import Track, TrackDynamism, Weather, Car from session.models import Preset, ServerSetting class EnvironmentForm(forms.Form): server_setting = forms.ModelChoiceField(queryset=ServerSetting.objects.all()) track = forms.ModelChoiceField(queryset=Track.objects.all()) ...
{ "repo_name": "PeteTheAutomator/ACServerManager", "path": "session/forms.py", "copies": "1", "size": "1099", "license": "mit", "hash": 6227620014444947000, "line_mean": 39.7037037037, "line_max": 211, "alpha_frac": 0.7688808007, "autogenerated": false, "ratio": 3.8426573426573425, "config_test"...
from django import forms from lighthouse.models.slepc_eprob import * ### # For Guided Search ### class problemClassForm(forms.Form): problemClass = forms.ChoiceField(label='Which of the following do you wish to compute?', widget=forms.RadioSelect(), choices=PROBLEMCLASS_CHOICE ) ### # For PEP # class polynom...
{ "repo_name": "LighthouseHPC/lighthouse", "path": "src/Dlighthouse/lighthouse/forms/slepc_eprob.py", "copies": "1", "size": "5406", "license": "mit", "hash": 8674738335962668000, "line_mean": 57.7717391304, "line_max": 185, "alpha_frac": 0.7623011469, "autogenerated": false, "ratio": 3.6576454668...
from django import forms from links.models import Link from channels.models import Channel class SubmitLinkForm(forms.ModelForm): url = forms.URLField(verify_exists=False, required=False) title = forms.CharField( required=False, max_length=255) thumbnail_url = forms.URLField( req...
{ "repo_name": "linkfloyd/linkfloyd", "path": "linkfloyd/links/forms.py", "copies": "1", "size": "1780", "license": "bsd-3-clause", "hash": 3892447292748740000, "line_mean": 23.0540540541, "line_max": 62, "alpha_frac": 0.5162921348, "autogenerated": false, "ratio": 4.352078239608802, "config_tes...
from django import forms from lists.models import Item from django.core.exceptions import ValidationError EMPTY_LIST_ERROR = "You can't have an empty list item" DUPLICATE_ITEM_ERROR = "You've already got this in your list" class ItemForm(forms.models.ModelForm): def save(self, for_list): self.instance.l...
{ "repo_name": "fantasycheung/django_learning", "path": "lists/forms.py", "copies": "1", "size": "1181", "license": "mit", "hash": 9160834973200056000, "line_mean": 26.4651162791, "line_max": 61, "alpha_frac": 0.583403895, "autogenerated": false, "ratio": 4.003389830508475, "config_test": false,...
from django import forms from livecenter.tools import GeoForm from livecenter.forms import districts from .models import Finance class FinanceForm(GeoForm): class Meta: model = Finance def __init__(self, *args, **kwargs): super(FinanceForm, self).__init__(*args, **kwargs) self.fields[...
{ "repo_name": "rimbalinux/LMD3", "path": "microfinance/forms.py", "copies": "1", "size": "1214", "license": "bsd-3-clause", "hash": 8848939371402459000, "line_mean": 42.3571428571, "line_max": 69, "alpha_frac": 0.6120263591, "autogenerated": false, "ratio": 3.3628808864265927, "config_test": fa...
from django import forms from livesettings 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(SettingsEditor, se...
{ "repo_name": "Apkawa/django-livesettings", "path": "livesettings/forms.py", "copies": "6", "size": "1314", "license": "bsd-3-clause", "hash": -2457523989212041000, "line_mean": 33.6052631579, "line_max": 74, "alpha_frac": 0.5395738204, "autogenerated": false, "ratio": 4.726618705035971, "confi...
from django import forms from localflavor.us.forms import USPhoneNumberField import logging logger = logging.getLogger(__name__) class ResetRequestForm(forms.Form): email = forms.EmailField(label="Email Address", required=False) cell = USPhoneNumberField(label="-OR- Cell #", required=False) # Ver...
{ "repo_name": "hhauer/myinfo", "path": "PasswordReset/forms.py", "copies": "1", "size": "1127", "license": "mit", "hash": 1956941431140298000, "line_mean": 34.25, "line_max": 122, "alpha_frac": 0.6415261757, "autogenerated": false, "ratio": 4.385214007782102, "config_test": false, "has_no_key...
from django import forms from localflavor.us.forms import USZipCodeField class FaxFormsForm(forms.Form): pass class StayUpdatedForm(forms.Form): name = forms.CharField(label='Your name') email_address = forms.EmailField() class ResourcesSearchForm(forms.Form): zip_code = USZipCodeField( widg...
{ "repo_name": "itsmemattchung/hackla2015prop47", "path": "prop47/forms.py", "copies": "1", "size": "1237", "license": "mit", "hash": 4666055926422121000, "line_mean": 29.925, "line_max": 70, "alpha_frac": 0.6871463217, "autogenerated": false, "ratio": 3.853582554517134, "config_test": false, ...
from django import forms from login.models import Page, Category, UserProfile, Groupings, SiteManager, ActivateUser, DeactivateUser, DeleteUser from django.contrib.auth.models import User, Group class CategoryForm(forms.ModelForm): name = forms.CharField(max_length=128, help_text="Please enter the category name.")...
{ "repo_name": "jnayak1/cs3240-s16-team16", "path": "login/forms.py", "copies": "1", "size": "3504", "license": "mit", "hash": 8804189450837892000, "line_mean": 39.7558139535, "line_max": 131, "alpha_frac": 0.7017694064, "autogenerated": false, "ratio": 4.28361858190709, "config_test": false, ...
from django import forms from logistics.models import Fleet, Trip ROLE_CHOICES = ( ("1", "OWNER"), ("2", "DRIVER") ) class SignUpForm(forms.Form): login = forms.CharField(label='Your login', max_length=50) email = forms.EmailField(label='Your email', max_length=50) password = forms.CharField(labe...
{ "repo_name": "geo2tag-logistics/Geo2Logistics", "path": "logistics/forms.py", "copies": "1", "size": "1894", "license": "apache-2.0", "hash": -1782470046853603600, "line_mean": 26.0714285714, "line_max": 80, "alpha_frac": 0.641499472, "autogenerated": false, "ratio": 3.6920077972709553, "confi...
from django import forms from m2m.requests.models import Comment class RequestForm(forms.Form): error_css_class='error' required_css_class = 'required' request = forms.CharField(widget=forms.Textarea(attrs={'rows':'9','cols':'50'}),required=True) name = forms.CharField(max_length=20,widget=forms.T...
{ "repo_name": "blampe/M2M", "path": "m2m/requests/formClasses.py", "copies": "1", "size": "2333", "license": "mit", "hash": 2492846305753327000, "line_mean": 48.6382978723, "line_max": 172, "alpha_frac": 0.6733819117, "autogenerated": false, "ratio": 3.6973058637083995, "config_test": false, ...
from django import forms from mainapp.models import Query,Paper,Review from django.contrib.auth.models import User from mainapp.models import Researcher, Review # Form for new users to register class UserRegisterForm(forms.ModelForm): # Overrides the meta to hide the password properly password = forms.CharFie...
{ "repo_name": "Alistair401/10C", "path": "SysReview/mainapp/forms.py", "copies": "1", "size": "2411", "license": "mit", "hash": 49997956094432560, "line_mean": 35.5303030303, "line_max": 132, "alpha_frac": 0.7092492742, "autogenerated": false, "ratio": 4.32078853046595, "config_test": false, ...
from django import forms from main.models import Request def uid_field(): return forms.CharField(max_length=200, label='identifiant ', widget=forms.TextInput(attrs={'placeholder': 'prenom.nom'})) def passwd_field(required=True): return forms.CharField( ...
{ "repo_name": "FedeRez/webldap", "path": "app/main/forms.py", "copies": "1", "size": "2258", "license": "mit", "hash": -6919634121078139000, "line_mean": 26.1445783133, "line_max": 87, "alpha_frac": 0.6471371505, "autogenerated": false, "ratio": 3.99468085106383, "config_test": false, "has_no...
from django import forms from map.map_info.models import Layer, Comment class AddPointForm(forms.Form): """New points form. The user has to enter the following details for new points: * **later**: chosen from a drop down list. * **report_date**: entered manually. but must adhere to the django d...
{ "repo_name": "haithamk/oMap", "path": "src/map/map_info/forms.py", "copies": "1", "size": "1114", "license": "bsd-3-clause", "hash": -1262373882513205800, "line_mean": 29.9722222222, "line_max": 83, "alpha_frac": 0.6642728905, "autogenerated": false, "ratio": 4.456, "config_test": false, "ha...
from django import forms from maps.models import ShapeFile from django.core.exceptions import ValidationError from django.db.models.fields.files import FieldFile from maps.utils import * from django.contrib.gis.gdal import DataSource from django.contrib.gis.geos import GEOSGeometry, MultiPolygon class ShapeFileForm(fo...
{ "repo_name": "ProvidencePlan/Profiles", "path": "communityprofiles/maps/forms.py", "copies": "2", "size": "3018", "license": "mit", "hash": 3605108177108543000, "line_mean": 45.4307692308, "line_max": 148, "alpha_frac": 0.6066931743, "autogenerated": false, "ratio": 4.29302987197724, "config_t...
from django import forms from mc2.controllers.docker.models import DockerController from mc2.controllers.base.forms import ControllerForm, ControllerFormHelper class DockerControllerForm(ControllerForm): marathon_cmd = forms.CharField( required=False, widget=forms.Textarea(attrs={'class': 'form-co...
{ "repo_name": "praekelt/mc2", "path": "mc2/controllers/docker/forms.py", "copies": "1", "size": "3122", "license": "bsd-2-clause", "hash": -8434526637159499000, "line_mean": 40.0789473684, "line_max": 79, "alpha_frac": 0.6210762332, "autogenerated": false, "ratio": 4.230352303523035, "config_te...
from django import forms from meadery.models import Product from inventory.models import Warehouse, Row, Shelf, Bin, Crate, Jar class WarehouseAdminForm(forms.ModelForm): class Meta: model = Warehouse exclude = ["slug"] class RowAdminForm(forms.ModelForm): warehouse = forms.ModelChoiceField(...
{ "repo_name": "mathuin/pyment", "path": "django/inventory/forms.py", "copies": "1", "size": "1063", "license": "mit", "hash": 8392829247453145000, "line_mean": 20.693877551, "line_max": 67, "alpha_frac": 0.6688617121, "autogenerated": false, "ratio": 3.9516728624535316, "config_test": false, ...
from django import forms from medgointranet import models from django.contrib import auth from django.contrib.auth.models import User from bootstrap3_datetime.widgets import DateTimePicker from datetime import date, datetime class CrearDoctorForm(forms.ModelForm): class Meta: model = models.Doctor fields = [ "ru...
{ "repo_name": "ElitosGon/medgoproject", "path": "medgointranet/forms/admin_forms.py", "copies": "1", "size": "20398", "license": "apache-2.0", "hash": 15255144864264554, "line_mean": 49.2740740741, "line_max": 214, "alpha_frac": 0.6843966406, "autogenerated": false, "ratio": 2.9187213302752295, ...
from django import forms from medgointranet import models from django.contrib import auth from django.contrib.auth.models import User class CrearPacienteFrom(forms.ModelForm): class Meta: model = models.Paciente fields = [ "nombre_paciente", "apellido_paciente", "edad_paciente", "tipo_aten...
{ "repo_name": "ElitosGon/medgoproject", "path": "medgointranet/forms/doctor_forms.py", "copies": "1", "size": "18027", "license": "apache-2.0", "hash": 2780700319431977500, "line_mean": 48.8531855956, "line_max": 223, "alpha_frac": 0.670500639, "autogenerated": false, "ratio": 2.944535340314136, ...
from django import forms from medgointranet import models from django.contrib import auth from django.contrib.auth.models import User class PacienteForm(forms.ModelForm): class Meta: model = models.Paciente fields = '__all__' class EvaluacionForm(forms.ModelForm): class Meta: model = models.Evaluacion field...
{ "repo_name": "ElitosGon/medgoproject", "path": "medgointranet/forms/general_forms.py", "copies": "1", "size": "5337", "license": "apache-2.0", "hash": -1136481177043274200, "line_mean": 31.1325301205, "line_max": 168, "alpha_frac": 0.6634795651, "autogenerated": false, "ratio": 3.008460236886633...
from django import forms from medgointranet import models from django.contrib import auth class CrearAtencionUserForm(forms.ModelForm): class Meta: model = models.Atencion fields = ["nombre_cliente", "apellido_cliente", "email_cliente", "telefono_cliente", "motivo_consulta", "e...
{ "repo_name": "ElitosGon/medgoproject", "path": "medgointranet/forms/user_forms.py", "copies": "1", "size": "4155", "license": "apache-2.0", "hash": -4758529314917122000, "line_mean": 45.6853932584, "line_max": 210, "alpha_frac": 0.6639383727, "autogenerated": false, "ratio": 2.9927953890489913, ...
from django import forms from mellow.models import Account from mellow.roles import Role class CreateUnactivatedAccountForm(forms.ModelForm): class Meta: model = Account fields = ('email', 'first_name', 'last_name', 'role') def __init__(self, *args, **kwargs): super(CreateUnactivated...
{ "repo_name": "flagshipenterprise/django-mellow-auth", "path": "mellow/forms.py", "copies": "1", "size": "3638", "license": "mit", "hash": -3658823112833461000, "line_mean": 33.6476190476, "line_max": 79, "alpha_frac": 0.6360637713, "autogenerated": false, "ratio": 4.3831325301204815, "config_t...
from django import forms from metashare.accounts.models import UserProfile, EditorGroupApplication, \ OrganizationApplication, Organization, OrganizationManagers, EditorGroup, \ EditorGroupManagers from django.conf import settings from django.contrib.admin import widgets from django.contrib.auth.models import U...
{ "repo_name": "JuliBakagianni/CEF-ELRC", "path": "metashare/accounts/forms.py", "copies": "1", "size": "10331", "license": "bsd-3-clause", "hash": 4879277122939481000, "line_mean": 34.624137931, "line_max": 116, "alpha_frac": 0.6092343432, "autogenerated": false, "ratio": 4.4781100996965755, "c...
from django import forms from micro_admin.models import ( Branch, User, Group, Client, SavingsAccount, LoanAccount, FixedDeposits, Receipts, Payments, RecurringDeposits, GroupMeetings, ClientBranchTransfer) # from django.core.exceptions import ObjectDoesNotExist # import datetime import decimal d = decimal.Dec...
{ "repo_name": "MicroPyramid/micro-finance", "path": "micro_admin/forms.py", "copies": "2", "size": "14981", "license": "mit", "hash": 4869351159138758000, "line_mean": 40.1565934066, "line_max": 154, "alpha_frac": 0.5763967692, "autogenerated": false, "ratio": 4.279063124821479, "config_test": ...
from django import forms from middaymeal.models import * class LoginForm(forms.Form): name = forms.CharField(max_length=100) password = forms.CharField(widget=forms.PasswordInput()) class SignUpForm(forms.ModelForm): name = forms.CharField(max_length=100) password = forms.CharField(widget=forms.Pass...
{ "repo_name": "tiwariayush/SarvaAahar", "path": "sarvahar/middaymeal/forms.py", "copies": "1", "size": "1565", "license": "mit", "hash": 2241040326873289500, "line_mean": 38.125, "line_max": 110, "alpha_frac": 0.6920127796, "autogenerated": false, "ratio": 3.7893462469733654, "config_test": fal...
from django import forms from modelnotice.models import Notice from django.utils.translation import ugettext_lazy as _ from django.contrib.contenttypes.models import ContentType class MyModelForm(forms.ModelForm): def as_div(self): return self._html_output( normal_row=u'<div class="js-active fo...
{ "repo_name": "anscii/django-modelnotice", "path": "modelnotice/forms.py", "copies": "1", "size": "1513", "license": "bsd-2-clause", "hash": 2976428555336754700, "line_mean": 36.825, "line_max": 107, "alpha_frac": 0.5492399207, "autogenerated": false, "ratio": 4.156593406593407, "config_test": ...
from django import forms from models import Account, Transaction, RecurringTransaction class AccountForm(forms.ModelForm): class Meta: model = Account exclude = ('owner', 'slug', ) class TransactionForm(forms.ModelForm): class Meta: model = Transaction exclude = ('account', '...
{ "repo_name": "bradmontgomery/django-moneybags", "path": "moneybags/forms.py", "copies": "1", "size": "4027", "license": "mit", "hash": -1785918585048459300, "line_mean": 30.9603174603, "line_max": 76, "alpha_frac": 0.6036751925, "autogenerated": false, "ratio": 4.325456498388829, "config_test"...
from django import forms from .models import Advert, User, UserActivationKey class AdvertForm(forms.ModelForm): class Meta: model = Advert fields = ('title', 'description', 'requirements', 'salary', 'city') class UserRegistrationForm(forms.ModelForm): password2 = forms.CharField(help_text='...
{ "repo_name": "pyshop/pyjobs", "path": "src/adverts/forms.py", "copies": "1", "size": "1676", "license": "mit", "hash": -4044806431238584300, "line_mean": 36.9545454545, "line_max": 101, "alpha_frac": 0.6778443114, "autogenerated": false, "ratio": 3.92018779342723, "config_test": false, "has_...
from django import forms from models import App, Behavior, OS, Protocol class QueryForm(forms.Form): beginTime = forms.DateTimeField(required = False, widget = forms.TextInput(attrs = {'class': 'dateTimeInput'}), label = u"BeginTime between") endTime = forms.DateTimeField(required = False, widget = forms...
{ "repo_name": "multiple1902/repartee", "path": "repartee/forms.py", "copies": "1", "size": "1352", "license": "mit", "hash": -4803441607215080000, "line_mean": 95.5714285714, "line_max": 198, "alpha_frac": 0.6915680473, "autogenerated": false, "ratio": 4.0845921450151055, "config_test": false, ...
from django import forms from .models import Article, BlogComment, Suggest class BlogCommentForm(forms.ModelForm): class Meta: model = BlogComment fields = ['user_name', 'body'] widgets = { 'user_name': forms.TextInput(attrs={ 'class': 'form-control', ...
{ "repo_name": "tomming233/blog", "path": "app/forms.py", "copies": "1", "size": "1042", "license": "mit", "hash": 5624043219669366000, "line_mean": 26.9444444444, "line_max": 66, "alpha_frac": 0.430417495, "autogenerated": false, "ratio": 4.280851063829787, "config_test": false, "has_no_keywo...
from django import forms from .models import Article, Book, AcademicWork from django.forms import TextInput, CheckboxSelectMultiple from django.utils.translation import ugettext_lazy as _ # Papers status DRAFT = 'd' SUBMITTED = 's' ACCEPTED = 'a' PUBLISHED = 'p' PAPER_STATUS = ( (DRAFT, _('Draft')), (SUBMITTED...
{ "repo_name": "neuromat/nira", "path": "research/forms.py", "copies": "1", "size": "1823", "license": "mpl-2.0", "hash": -15558874759960832, "line_mean": 26.2089552239, "line_max": 86, "alpha_frac": 0.5929786067, "autogenerated": false, "ratio": 3.7433264887063653, "config_test": false, "has_...