Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lig/django-loginza-me
Django app and auth backend for authenticating using http://loginza.ru/ service.
https://github.com/lig/django-loginza-me
Last synced: 2 days ago
JSON representation
Django app and auth backend for authenticating using http://loginza.ru/ service.
- Host: GitHub
- URL: https://github.com/lig/django-loginza-me
- Owner: lig
- Created: 2012-02-19T18:35:25.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-02-19T20:34:24.000Z (over 12 years ago)
- Last Synced: 2024-04-16T04:00:39.183Z (6 months ago)
- Language: Python
- Homepage:
- Size: 93.8 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About
django-loginza-me is the Django app and auth backend for authenticating using http://loginza.ru/ service.
# Usage
## settings.py
INSTALLED_APPS = (
# …
'django.contrib.auth',
# …
'loginza',
# …
)from django.conf.global_settings import (TEMPLATE_CONTEXT_PROCESSORS,
AUTHENTICATION_BACKENDS)
TEMPLATE_CONTEXT_PROCESSORS += (
'loginza.context_processors.loginza_url',
)
AUTHENTICATION_BACKENDS += (
'loginza.auth.backends.LoginzaBackend',
)
LOGIN_URL = '/' # or any page you will display login form on
LOGIN_REDIRECT_URL = '/' # or any page you want to redirect user after login to
LOGOUT_URL = '/' # or any page you want to redirect user after logout to## urls.py
urlpatterns = patterns('',
# …
url(r'^auth/', include('loginza.urls')),
# …
)## Templates
* Get widget code at [Loginza](http://loginza.ru/).
* Use `{{ LOGINZA_URL }}` as `token_url` widget parameter.
* Use `{% url loginza-logout %}` for logout form action url (note that logout form must use post method and contain csrf_token).