Django Synonyms provides the ability to reference a field in a model by any number of synonyms while retaining the ability to search the original field.
For example, a model of an academic journal might include a name field. 'Physical Review B' is the official name, but it is often referred to as 'Phys Rev B' or 'prb'.
Update your settings file:
INSTALLED_APPS += ('synonyms',)
Sync the databse:
$ python manage.py syncdb
Your model might looks something like:
class Journal(models.Model): objects = SynonymManager(target_field='name') name = models.CharField(max_length=100) ...
Your view would then contain the following code:
journal = Journal.objects.get(name='prb')
Your admin layout could be extended with:
from synonyms.admin import SynonymInline class JournalAdmin(admin.ModelAdmin): inlines = (SynonymInline, ...) ...
1. In the current version it is only possible to use Synonyms on one field per model.