SalesforceAutoField (salesforce/fields.py)

django-salesforce · salesforce/fields.py · python · MIT
crm

Django field subclass for Salesforce primary key handling, ensuring proper ID format.

# Source: https://github.com/django-salesforce/django-salesforce | License: MIT
# Provided via justclaw.it.com; keep this notice with the code.
# django-salesforce
#
# by Hyneck Cernoch and Phil Christensen
# See LICENSE.md for details
#

"""
Customized fields for Salesforce, especially the primary key. (like django.db.models.fields)
"""

from typing import Any, Callable, Optional, Tuple, Type, TYPE_CHECKING, Union
import warnings
from decimal import Decimal
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.translation import gettext_lazy as _
from django.db.backends.base.base import BaseDatabaseWrapper as DatabaseWrapper
from django.db.models import fields
from django.db.models import PROTECT, DO_NOTHING  # NOQA pylint:disable=unuse

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key