repo_name
stringlengths
7
65
path
stringlengths
5
187
copies
stringclasses
483 values
size
stringlengths
4
7
content
stringlengths
805
1.02M
license
stringclasses
14 values
dimagi/commcare-hq
corehq/apps/reports/filters/devicelog.py
1
3212
from django.urls import reverse from django.utils.translation import gettext_lazy from phonelog.models import DeviceReportEntry from corehq.apps.reports.filters.base import ( BaseMultipleOptionFilter, BaseReportFilter, BaseSingleOptionFilter, BaseTagsFilter, ) from corehq.util.queries import fast_dist...
bsd-3-clause
onepercentclub/bluebottle
bluebottle/slides/migrations/0001_initial.py
1
5178
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-05-23 13:25 from __future__ import unicode_literals import bluebottle.utils.fields from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields class Migration(migrations.Migra...
bsd-3-clause
onepercentclub/bluebottle
bluebottle/projects/migrations/0046_auto_20171023_2047.py
1
1344
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-10-23 18:47 from __future__ import unicode_literals import bluebottle.utils.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0045_auto_201710...
bsd-3-clause
onepercentclub/bluebottle
bluebottle/funding/base_serializers.py
1
1473
from builtins import object from rest_framework.serializers import ModelSerializer from rest_framework_json_api.relations import ResourceRelatedField from bluebottle.funding.models import Donor, Payment, BankAccount, PayoutAccount from bluebottle.transitions.serializers import AvailableTransitionsField from bluebottle...
bsd-3-clause
onepercentclub/bluebottle
bluebottle/slides/migrations/0002_auto_20161115_1601.py
1
2360
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-15 15:01 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('slides', '0001_initial'), ] operations = [ migrations.AlterField( ...
bsd-3-clause
dimagi/commcare-hq
corehq/form_processor/interfaces/dbaccessors.py
1
3360
from abc import ABCMeta, abstractmethod from memoized import memoized class AbstractLedgerAccessor(metaclass=ABCMeta): @staticmethod @abstractmethod def get_transactions_for_consumption(domain, case_id, product_id, section_id, window_start, window_end): raise NotImplementedError @staticmeth...
bsd-3-clause
dimagi/commcare-hq
corehq/apps/enterprise/views.py
1
17321
import json from django.conf import settings from django.contrib import messages from django.core.files.base import ContentFile from django.core.paginator import Paginator from django.db.models import Sum from django.http import ( HttpResponse, HttpResponseNotFound, HttpResponseRedirect, JsonResponse, ...
bsd-3-clause
dimagi/commcare-hq
corehq/motech/openmrs/const.py
1
3921
import logging from itertools import chain LOG_LEVEL_CHOICES = ( (99, 'Disable logging'), (logging.ERROR, 'Error'), (logging.INFO, 'Info'), ) # device_id for cases added/updated by an OpenmrsImporter. # OpenmrsImporter ID is appended to this. OPENMRS_IMPORTER_DEVICE_ID_PREFIX = 'openmrs-importer-' # XMLN...
bsd-3-clause
dimagi/commcare-hq
corehq/apps/change_feed/topics.py
1
4684
from kafka.common import OffsetRequestPayload from corehq.apps.app_manager.util import app_doc_types from corehq.apps.change_feed.connection import get_simple_kafka_client from corehq.apps.change_feed.exceptions import UnavailableKafkaOffset from corehq.form_processor.models import XFormInstance DOMAIN = 'domain' MET...
bsd-3-clause
dimagi/commcare-hq
corehq/sql_proxy_standby_accessors/migrations/0001_initial.py
1
1391
from django.conf import settings from django.db import migrations from corehq.sql_db.config import plproxy_standby_config from corehq.sql_db.management.commands.configure_pl_proxy_cluster import ( get_drop_server_sql, get_sql_to_create_pl_proxy_cluster, ) from corehq.sql_db.operations import RawSQLMigration fr...
bsd-3-clause
dimagi/commcare-hq
corehq/apps/reports/management/commands/rollout_ecd_preview.py
1
4170
from django.core.management import BaseCommand from django.db.models import Q from corehq.apps.accounting.models import SoftwarePlanEdition, Subscription from corehq.feature_previews import EXPLORE_CASE_DATA_PREVIEW from corehq.toggles import ( ECD_MIGRATED_DOMAINS, ECD_PREVIEW_ENTERPRISE_DOMAINS, NAMESPAC...
bsd-3-clause
onepercentclub/bluebottle
bluebottle/terms/tests/test_api.py
1
1275
from django.urls import reverse from rest_framework import status from bluebottle.test.utils import BluebottleTestCase from bluebottle.test.factory_models.accounts import BlueBottleUserFactory from bluebottle.test.factory_models.terms import TermsFactory class TermsAPITest(BluebottleTestCase): """ Integration t...
bsd-3-clause
onepercentclub/bluebottle
bluebottle/members/migrations/0058_auto_20220607_0934.py
1
1163
# Generated by Django 2.2.24 on 2022-06-07 07:34 import bluebottle.bb_accounts.models from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('members', '0057_auto_20220516_1412'), ] operations = [ migrations.Add...
bsd-3-clause
dimagi/commcare-hq
corehq/form_processor/utils/xform.py
1
9152
from datetime import datetime from lxml import etree import re import iso8601 import pytz import xml2json from corehq.form_processor.interfaces.processor import XFormQuestionValueIterator from corehq.form_processor.models import Attachment, XFormInstance from corehq.form_processor.exceptions import XFormQuestionValue...
bsd-3-clause
onepercentclub/bluebottle
bluebottle/payments_docdata/migrations/0001_initial.py
2
8230
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-05-23 13:25 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('payments', '0001_initial'), ] o...
bsd-3-clause
dimagi/commcare-hq
corehq/apps/domain/project_access/middleware.py
1
1526
from datetime import datetime, timedelta from django.utils.deprecation import MiddlewareMixin from corehq.apps.domain.project_access.models import ( ENTRY_RECORD_FREQUENCY, SuperuserProjectEntryRecord, ) from corehq.apps.users.tasks import update_domain_date from corehq.util.quickcache import quickcache cla...
bsd-3-clause
dimagi/commcare-hq
corehq/pillows/ledger.py
1
4277
from collections import namedtuple from functools import lru_cache from pillowtop.checkpoints.manager import ( get_checkpoint_for_elasticsearch_pillow, ) from pillowtop.pillow.interface import ConstructedPillow from pillowtop.processors import PillowProcessor from corehq.apps.change_feed import topics from corehq...
bsd-3-clause
dimagi/commcare-hq
corehq/apps/case_search/views.py
1
3244
import json import re from django.http import Http404 from django.urls import reverse from django.utils.translation import gettext_lazy from dimagi.utils.web import json_response from corehq.apps.case_search.models import case_search_enabled_for_domain from corehq.apps.domain.decorators import cls_require_superuser_...
bsd-3-clause
dimagi/commcare-hq
corehq/motech/generic_inbound/utils.py
1
1296
import json import uuid from base64 import urlsafe_b64encode from django.utils.translation import gettext as _ from casexml.apps.phone.xml import get_registration_element_data from corehq.apps.userreports.specs import EvaluationContext from corehq.motech.generic_inbound.exceptions import GenericInboundUserError def...
bsd-3-clause
dimagi/commcare-hq
corehq/apps/products/migrations/0001_initial.py
1
1498
from django.db import migrations, models import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='SQLProduct', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_...
bsd-3-clause
dimagi/commcare-hq
corehq/apps/userreports/migrations/0018_ucrexpression.py
1
1026
# Generated by Django 3.2.12 on 2022-04-12 15:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('userreports', '0017_index_cleanup'), ] operations = [ migrations.CreateModel( name='UCRExpression', fields=[ ...
bsd-3-clause
onepercentclub/bluebottle
bluebottle/cms/migrations/0035_auto_20171017_1611.py
1
1079
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-10-17 14:11 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.manager class Migration(migrations.Migration): dependencies = [ ('cms', '0034_auto_20171017_1549'), ] operations = [ ...
bsd-3-clause