1 | """ |
---|
2 | Sistema Estadístico Integral de Venezuela - (SEIVEN) |
---|
3 | |
---|
4 | Copyleft (@) 2015 CENDITEL nodo Mérida - https://mpv.cenditel.gob.ve/seiven |
---|
5 | """ |
---|
6 | ## @namespace api_client.forms |
---|
7 | # |
---|
8 | # Contiene las clases, métodos y funciones con los formularios para la configuración del módulo en el panel |
---|
9 | # administrativo |
---|
10 | # @author Ing. Roldan Vargas (rvargas at cenditel.gob.ve) |
---|
11 | # @author <a href='http://www.cenditel.gob.ve'>Centro Nacional de Desarrollo e Investigación en Tecnologías Libres |
---|
12 | # (CENDITEL) nodo Mérida - Venezuela</a> |
---|
13 | # @copyright <a href='http://www.gnu.org/licenses/gpl-2.0.html'>GNU Public License versión 2 (GPLv2)</a> |
---|
14 | from __future__ import unicode_literals |
---|
15 | |
---|
16 | from django.forms import ModelForm, PasswordInput, CharField, TextInput |
---|
17 | from django.utils.translation import ugettext_lazy as _ |
---|
18 | from .models import ConfigAccessToken |
---|
19 | |
---|
20 | __licence__ = "GNU Public License v2" |
---|
21 | __revision__ = "" |
---|
22 | __docstring__ = "DoxyGen" |
---|
23 | |
---|
24 | class ConfigAccessTokenForm(ModelForm): |
---|
25 | username = CharField(label=_("Usuario"), max_length=40) |
---|
26 | password = CharField(label=_("Contraseña"), max_length=75, widget=PasswordInput()) |
---|
27 | client_id = CharField(label=_("Client ID"), max_length=255) |
---|
28 | client_secret = CharField(label=_("Client Secret"), max_length=255) |
---|
29 | class Meta: |
---|
30 | model = ConfigAccessToken |
---|
31 | fields = '__all__' |
---|
32 | widgets = { |
---|
33 | 'application_name': TextInput(attrs={'style': 'text-transform: uppercase'}) |
---|
34 | } |
---|
35 | labels = { |
---|
36 | 'url_access': 'URL de Aplicación', |
---|
37 | 'application_name': 'Nombre de Aplicación', |
---|
38 | } |
---|