freelancersunion/django-salesforce — pull request #78 by hynekcer (2014-10-17 22:00:02+00:00)
Title: Multiple inheritance

The most important commits are:

- Fixed tests for incomplete test project directories after switching git branches
Though I have [solved problem with orphan `*.pyc`](http://stackoverflow.com/a/26320535/448474) files in tests by git hook to "post-checkout" generally for all situations, I wrote a simple fix for detection of relevant test directories.

- Fixed the demo homepage to work also with a normal Account.
It should also never raise exception for any user input on the seearch page..

- Removed RoutedModelAdmin as not important, replaced by an empty stub.
RoutedModelAdmin only explicitely discovered the database name by calling
database routers configured in "settings.DATABASE_ROUTERS". That is the same
what is otherwise arranged implicitely a few later by Django.
Do you know anythig why it could be important to preserve it?

- Moved "reauthenticate" from backend.query to auth module.
(I am preparing "dynamic authetication" that allows to access SFDC by access tokens under current users different accounts, not by fixed credentials that must be saved previously in the Django server. (It works, but it needs to think through again before committing.) This commit is the first step that fixes auth code placement.

- Added settings SF_PK for configurable primary key name: 'Id' or 'id'.
The similar undocumented feature for individually configurable names sf_pk
by models has been removed.
This is a very significant change, potentially made backward imcompatible after some future version (I suggest v0.5), when lowercase 'id' will be the default preference, if not configured in settings to capitalized.
- Simplified because it is still possible to write test projects with different configurations, not to combine different primary key names in one project as it was necessary for testing.
- The old code was complicated with respect to possibility to write tests for both beharior in the same example test model.
- The old code had broked the useful convention of Django that all descendants will preserve all previous fields unmodified.

- Implemented inheritance of database Model from more abstract models.
Also mixins has been tested.

- Fixed SalesforceModel for proxy models.
Proxy models now also work as usual in Django without a special cofiguration.

Every feature is solved in one commit without later fixes.
Important changes have a Readme.

I appreciate on this package, that it works with any unmodified Django. I tried something with [Django-NonRel / MongoDB-engine](https://github.com/django-nonrel/mongodb-engine) it needs less customizations in the user application, but requires a special Django.