Skip to content

Commit d84acc5

Browse files
committed
Added a reference resource with common issues
1 parent b31efdb commit d84acc5

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

docs/advanced.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ model history.
4444
<Poll: Poll object as of 2010-10-25 18:04:13.814128>
4545
4646
47-
History for Third-Party Model
48-
-----------------------------
47+
.. _register:
48+
49+
History for a Third-Party Model
50+
-------------------------------
4951

5052
To track history for a model you didn't create, use the
5153
``simple_history.register`` utility. You can use this to track models from

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Documentation
1010
:maxdepth: 2
1111

1212
usage
13+
reference
1314
advanced
1415

1516
Code

docs/reference.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Common Issues
2+
=============
3+
4+
- ``fields.E300``::
5+
6+
ERRORS:
7+
custom_user.HistoricalCustomUser.history_user: (fields.E300) Field defines a relation with model 'custom_user.CustomUser', which is either not installed, or is abstract.
8+
9+
Use ``register()`` to track changes to the custom user model
10+
instead of setting ``HistoricalRecords`` on the model directly.
11+
See :ref:`register`.
12+
13+
The reason for this, is that unfortunately ``HistoricalRecords``
14+
cannot be set directly on a swapped user model because of the user
15+
foreign key to track the user making changes.
16+
17+
- ``HistoricalRecords`` is not inherited
18+
19+
Allowing ``HistoricalRecords`` to be inherited from abstract
20+
models or other parents is a feature we would love to add. The
21+
current contributors do not have a need for that feature at this
22+
point, and need some help understanding how this feature should be
23+
completed. Current work is in `#112`__.
24+
25+
__ https://github.com/treyhunner/django-simple-history/pull/112

0 commit comments

Comments
 (0)