What is a "django backend"?

Xun Yang picture Xun Yang · Nov 15, 2011 · Viewed 10k times · Source

I've been encountering quite a few django Apps mentioning 'backend', but don't exactly know what it is. Searching around google does not give much results regarding django backends in general. Could someone give an explanation?

To be specific, take these examples:

Actually I think the first two and the third are a bit different, what I was more unsure about was the first two: backends included in Apps.

Answer

David Wheaton picture David Wheaton · Nov 15, 2011

django comes with one or more implementations of authentication, caching, etc but the framework anticipates the need for adding your own custom "backend" implementation. They generally provide a simple well-documented interface as well as a setting variable so it is easy to plug in your own custom module.

This term/pattern is also used by common django apps such as django-registration.

If you are into design patterns this blog provides some analysis: http://charlesleifer.com/blog/django-patterns-pluggable-backends/