-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2da474e
commit a38cf0f
Showing
4 changed files
with
125 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Links in Change Lists | ||
===================== | ||
|
||
|
||
Linking related fields | ||
---------------------- | ||
|
||
To automatically link foreign key and one-to-one fields to the relevant admin change page, inherit from ``RelativesAdmin``. | ||
|
||
TODO show code example and screenshot | ||
|
||
|
||
Linking ModelAdmin methods | ||
-------------------------- | ||
|
||
To turn a ``ModelAdmin`` method to a specific foreign key or one-to-one field, use the ``link_related`` decorator. | ||
|
||
TODO show code example and screenshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,9 @@ Contents | |
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
usage | ||
installation | ||
changelist | ||
change | ||
api | ||
|
||
Contributing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Usage | ||
===== | ||
|
||
Installation | ||
------------ | ||
|
||
Install from `PyPI`_: | ||
|
||
.. code-block:: bash | ||
$ pip install django-relatives | ||
.. _PyPI: https://pypi.python.org/pypi/django-relatives/ | ||
|
||
|
||
Since relatives uses cache, you can set settings to change the defaults: | ||
|
||
.. code-block:: python | ||
RELATIVES_CACHE_KEY = 'relatives_cache' | ||
RELATIVES_CACHE_TIME = 60*60*24 |