-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
29 lines (17 loc) · 839 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ABOUT
django-whereabouts is yet another take on the "elsewhere" concept.
The difference from the others is it provides the ability to relate
an "elsewhere" profile to any django model instance (e.g. site, user).
INSTALL
1) add the whereabouts folder somewhere in your python path
2) add 'whereabouts' to your INSTALLED_APPS
3) Run syncdb
4) if desired change the list of relatable content types by adding the
setting WHEREABOUTS_CONTENT_TYPES to settings.py. It must be set to
a list of existing content types. default: ['site', 'user', 'group']
USAGE
1) add {% load whereabouts_tags %} to the desired template
2) to get the whereabouts for a model instance:
{% get_whereabouts [object] as [var_name] %}
for example to get the whereabouts of the logged in user:
{% get_whereabouts request.user as whereabouts %}