Salesforce integration for Django's ORM using the SF REST API.
db_default
field option in Django 5.0. It allows a seamless
support of the defaultedOnCreate
counterpart in Salesforce.FloatField
are now really float, not Decimal as previously.inspectdb
of custom editable name fields #308inspectdb
for some metadata with negative decimal places
that are new in API 60.0.When you're ready to use django-salesforce with Django v5.0, please start a GitHub Sponsorship. You'll receive a license key.
This release contains mostly a series of small changes to enable Django v5.0 support.
As part of this release, we're beginning a two-tiered licensing process to encourage sponsorship from users who run this library in a commercial context. All sponsorship dollars go directly to the developer and support continued features and maintenance.
When you're ready to use django-salesforce with Django v4.2, you have a choice between:
python manage.py check --database=salesforce
Full Changelog: https://github.com/django-salesforce/django-salesforce/compare/v4.1...v4.2
inspectdb
can introspect actual default values
of fields from a defaultValueFormula
if it is a simple constant
like a number or a string.DefaultedOnCreate(value)
is no longer created
by inspectdb
in favour of a simple value
. If a simple default value
can not be known then a generic DEFAULTED_ON_CREATE
is still used rarely
for default values created by a complicated or unknown function only
on Salesforce side. #280.sf(minimal_aliases=True)
; important for some
special system objects #302In anticipation of the upcoming release of Django 4.0, we're proud to release django-salesforce v4.0!
salesforce/*.py
code.
All dependent user code can use also strict typing now.Support for Django 3.2
Better 'inspectdb':
inspectdb
then the output of models.py
will be valid without need to fix relationships to these tables by editing. See details below.choices=[...]
attributes are ignored if they are longer than 4000 characters of code. In practice, this only applies to a list of all countries in the world in every address field and also to every time zones field. These are never expected to be repeated inline.OneToOneField
are detected by inspectdb
in Django >= 3.0Other
Example of inspectdb:
$ python manage.py inspectdb --database=salesforce Account Contact ... >models.py
If the table User
is not in the list of used tables then this foreign key to a User is not created automatically in the model:
created_by = models.ForeignKey('User',... , db_column='CreatedById',...)
and a CharField is created instead that can be used to access its raw data:
created_by_id = models.CharField(db_column='CreatedById', max_length=18,...) # References to missing tables: ['-User']
You can delete all fields with the text # References to missing tables
alternatively.
This release officially adds support for the GA release of Django 3.1, and also introduces a new scheme for versioning.
It's quite important for us to track compatibility with the Django core release process, so moving forward we'll be matching the major and minor versions of our releases with the same numbers of the main supported Django release.
We've actually been following the Django Deprecation Timeline for some time, so other than a big bump in versions, this should have little effect on your projects moving forward.
A few housekeeping changes in this release, with a focus on authentication, specifically dynamic or custom authorization procedures.
settings.DATABASES['salesforce']['AUTH']
settings.DATABASES['salesforce']['API_VERSION']
.sf()
on querysets and managers to can pass additional parameter
e.g. all_or_none=True
or edge_updates=True
to bulk_create()
and update()
methods.After many years we're pleased to finally be releasing a 1.0 version of django-salesforce. As part of this release we'll be dropping support for legacy versions of Django and Python, and adding substantial type hinting support.
Static typing: To support checking of code attributes and types on custom user models, @hynekcer has created django-salesforce-stubs, a fork of the django-stubs
package. Internal annotation standards are largely dependent on the levels of annotation in the Django internals, while our salesforce.dbapi
module is annotated and checked in --strict
mode.
.filter(...__not_in=subquery)
' and 'not_eq', because of unsupported .exclude(...__in=subquery)
.ping_connection
that automatic called after every longer inactivity to minimize timeouts. Fixed #174salesforce.models_extend
module with SalesforceModel with varchar primary key that works also with default
databases. Fixed methods for it: save() and bulk_create()
to can create a new pk or to copy an object exactly. Fixed #231