<commit_before># -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division

from django.contrib.gis.db import models
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.core.validators import RegexValidator
from django.conf import settings
from django.utils.translation import ugettext as trans

import hashlib
import json
from urllib import urlencode

from copy import deepcopy

from treemap import SPECIES
from treemap.json_field import JSONField
from treemap.lib.object_caches import udf_defs
from treemap.species import (species_codes_for_regions, all_species_codes,
                             ITREE_REGION_CHOICES)

URL_NAME_PATTERN = r'[a-zA-Z]+[a-zA-Z0-9\-]*'

DEFAULT_MOBILE_SEARCH_FIELDS = {
    'standard': [{'search_type': 'SPECIES',
                  'identifier': 'species.id',
                  'label': 'Species'},
                 {'search_type': 'RANGE',
                  'identifier': 'tree.diameter',
                  'label': 'Diameter'},
                 {'search_type': 'RANGE',
                  'identifier': 'tree.height',
                  'label': 'Height'}],
    'missing': [{'identifier': 'species.id',
                 'label': 'Missing Species'},
                {'identifier': 'tree.diameter',
                 'label': 'Missing Diameter'},
                {'identifier': 'treePhoto.id',
                 'label': 'Missing Photo'}]
}

DEFAULT_MOBILE_API_FIELDS = [
    {'header': trans('Tree Information'),
     'field_keys': ['tree.species', 'tree.diameter',
                    'tree.height', 'tree.date_planted']},
    {'header': trans('Planting Site Information'),<commit_msg>Fix missing photo search on mobile apps<commit_after># -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division

from django.contrib.gis.db import models
from django.core.exceptions import ObjectDoesNotExist, ValidationError
from django.core.validators import RegexValidator
from django.conf import settings
from django.utils.translation import ugettext as trans

import hashlib
import json
from urllib import urlencode

from copy import deepcopy

from treemap import SPECIES
from treemap.json_field import JSONField
from treemap.lib.object_caches import udf_defs
from treemap.species import (species_codes_for_regions, all_species_codes,
                             ITREE_REGION_CHOICES)

URL_NAME_PATTERN = r'[a-zA-Z]+[a-zA-Z0-9\-]*'

DEFAULT_MOBILE_SEARCH_FIELDS = {
    'standard': [{'search_type': 'SPECIES',
                  'identifier': 'species.id',
                  'label': 'Species'},
                 {'search_type': 'RANGE',
                  'identifier': 'tree.diameter',
                  'label': 'Diameter'},
                 {'search_type': 'RANGE',
                  'identifier': 'tree.height',
                  'label': 'Height'}],
    'missing': [{'identifier': 'species.id',
                 'label': 'Missing Species'},
                {'identifier': 'tree.diameter',
                 'label': 'Missing Diameter'},
                {'identifier': 'mapFeaturePhoto.id',
                 'label': 'Missing Photo'}]
}

DEFAULT_MOBILE_API_FIELDS = [
    {'header': trans('Tree Information'),
     'field_keys': ['tree.species', 'tree.diameter',
                    'tree.height', 'tree.date_planted']},
    {'header': trans('Planting Site Information'),
{'fraction_non_alphanumeric': 0.1203223949337939, 'fraction_numerical': 0.0017271157167530224, 'mean_word_length': 2.716577540106952, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4530640', 'n_tokens_mistral': 1022, 'n_tokens_neox': 977, 'n_words': 243}