source: seiven/api_client/forms.py

Last change on this file was 69e1dbf, checked in by Ing. Roldan D. Vargas G <rvargas@…>, 6 años ago

modificaciones en configuración de tokens de acceso

  • Propiedad mode establecida a 100644
File size: 1.5 KB
Línea 
1"""
2Sistema Estadístico Integral de Venezuela - (SEIVEN)
3
4Copyleft (@) 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>
14from __future__ import unicode_literals
15
16from django.forms import ModelForm, PasswordInput, CharField, TextInput
17from django.utils.translation import ugettext_lazy as _
18from .models import ConfigAccessToken
19
20__licence__ = "GNU Public License v2"
21__revision__ = ""
22__docstring__ = "DoxyGen"
23
24class 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        }
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.