App de Django para manejar cuentas utilizando tokens.
Project description
========
Accounts
========
Accounts es un app de Django que permite el control y manejo de cuentas de usuario por medio del uso de tokens. Utiliza el Django Rest Framework.
Accounts contiene las siguientes funcionalidades:
- Registro de usuario.
- Login y logout.
- Expiracion de tokens.
Inicio rapido
-------------
1. Agrega "accounts" a tus apps instaladas::
INSTALLED_APPS = (
...
'accounts.apps.AccountsConfig',
)
2. Instala Django Rest Framework y agregalo a tus apps instaladas asi::
INSTALLED_APPS = (
...
'rest_framework',
'rest_framework.authtoken'
)
3. Registra el modelo de usuario y el backend de autenticacion en tu archivo settings::
AUTH_USER_MODEL = 'accounts.User'
AUTHENTICATION_BACKENDS = (
'accounts.authentication.CustomAuthenticationBackend'
)
4. Agrega el tiempo de expiracion para los tokens en tu archivo settings::
EXPIRATION_TIME = 24
5. Registra tus clases de permisos y autenticacion para el rest framework, puedes usar algo como esto::
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
'accounts.authentication.ExpiringTokenAuthentication',
),
'DEFAULT_FILTER_BACKENDS': (
'rest_framework.filters.DjangoFilterBackend',
'rest_framework.filters.SearchFilter'
),
'PAGINATE_BY': 10
}
6. Incluye las urls de accounts en tu proyecto, algo asi::
from accounts import urls as accounts_urls
url(r'^accounts/', include(accounts_urls))
7. Corre las pruebas para aseguranos que el paquete se instalo correctamente::
python3 manage.py test
Accounts
========
Accounts es un app de Django que permite el control y manejo de cuentas de usuario por medio del uso de tokens. Utiliza el Django Rest Framework.
Accounts contiene las siguientes funcionalidades:
- Registro de usuario.
- Login y logout.
- Expiracion de tokens.
Inicio rapido
-------------
1. Agrega "accounts" a tus apps instaladas::
INSTALLED_APPS = (
...
'accounts.apps.AccountsConfig',
)
2. Instala Django Rest Framework y agregalo a tus apps instaladas asi::
INSTALLED_APPS = (
...
'rest_framework',
'rest_framework.authtoken'
)
3. Registra el modelo de usuario y el backend de autenticacion en tu archivo settings::
AUTH_USER_MODEL = 'accounts.User'
AUTHENTICATION_BACKENDS = (
'accounts.authentication.CustomAuthenticationBackend'
)
4. Agrega el tiempo de expiracion para los tokens en tu archivo settings::
EXPIRATION_TIME = 24
5. Registra tus clases de permisos y autenticacion para el rest framework, puedes usar algo como esto::
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
'DEFAULT_AUTHENTICATION_CLASSES': (
'accounts.authentication.ExpiringTokenAuthentication',
),
'DEFAULT_FILTER_BACKENDS': (
'rest_framework.filters.DjangoFilterBackend',
'rest_framework.filters.SearchFilter'
),
'PAGINATE_BY': 10
}
6. Incluye las urls de accounts en tu proyecto, algo asi::
from accounts import urls as accounts_urls
url(r'^accounts/', include(accounts_urls))
7. Corre las pruebas para aseguranos que el paquete se instalo correctamente::
python3 manage.py test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
djangorf-accounts-0.2.tar.gz
(12.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file djangorf-accounts-0.2.tar.gz.
File metadata
- Download URL: djangorf-accounts-0.2.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
230f2fa6ecb44509e7de8fc5e3462c7ad3083b21d7c452832ed611316a816298
|
|
| MD5 |
0171f1bdd668fa6a37626d9baa287e99
|
|
| BLAKE2b-256 |
e66c95b93ad8c40d50e1aaa0a140b6ecde10e28d92e2f42515f00fc44cf87576
|
File details
Details for the file djangorf_accounts-0.2-py2-none-any.whl.
File metadata
- Download URL: djangorf_accounts-0.2-py2-none-any.whl
- Upload date:
- Size: 23.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9509ba8b6a9027b7be462ff99d5e2f44372643bc85d3820e3f0ef1ed55b03127
|
|
| MD5 |
23f7bbcb45da6ced84b5336dfee39988
|
|
| BLAKE2b-256 |
66f5ec52f11c74b836a0ae0400fd34d243719de52e5edd8aa01ac1e000bf7890
|