From 348d2ba4f96c6145996c560923c9aa1d0ecb9f49 Mon Sep 17 00:00:00 2001 From: Sesostris Vieira Date: Tue, 5 Apr 2016 19:35:04 -0300 Subject: [PATCH] =?UTF-8?q?Adicionado=20modo=20de=20servi=C3=A7o=20SEIT=20?= =?UTF-8?q?para=20distinguir=20hospedagem=20de=20manuten=C3=A7=C3=A3o=20de?= =?UTF-8?q?=20registro?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migrations/0002_tiposervico_modo.py | 20 +++++++++++++++++++ sigi/apps/servicos/models.py | 8 +++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 sigi/apps/servicos/migrations/0002_tiposervico_modo.py diff --git a/sigi/apps/servicos/migrations/0002_tiposervico_modo.py b/sigi/apps/servicos/migrations/0002_tiposervico_modo.py new file mode 100644 index 0000000..313d393 --- /dev/null +++ b/sigi/apps/servicos/migrations/0002_tiposervico_modo.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import models, migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('servicos', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='tiposervico', + name='modo', + field=models.CharField(default='H', max_length=1, verbose_name='Modo de presta\xe7\xe3o do servi\xe7o', choices=[(b'H', 'Hospedagem'), (b'R', 'Registro')]), + preserve_default=False, + ), + ] diff --git a/sigi/apps/servicos/models.py b/sigi/apps/servicos/models.py index 30d2bd1..6a9cde7 100644 --- a/sigi/apps/servicos/models.py +++ b/sigi/apps/servicos/models.py @@ -1,17 +1,22 @@ # -*- coding: utf-8 -*- + from datetime import date from django.db import models - from sigi.apps.casas.models import CasaLegislativa, Funcionario from django.utils.translation import ugettext as _ class TipoServico(models.Model): + MODO_CHOICES = ( + ('H', _(u"Hospedagem")), + ('R', _(u"Registro")) + ) email_help = u'''Use:
{url} para incluir a URL do serviço,
{senha} para incluir a senha inicial do serviço''' nome = models.CharField(_(u'Nome'), max_length=60) sigla = models.CharField(_(u'Sigla'), max_length='12') + modo = models.CharField(_(u'Modo de prestação do serviço'), max_length=1, choices=MODO_CHOICES) string_pesquisa = models.CharField(_(u'String de pesquisa'), blank=True, max_length=200, help_text=_(u'Sufixo para pesquisa RSS para averiguar a data da última atualização do serviço')) template_email_ativa = models.TextField(_(u'Template de email de ativação'), help_text=email_help, blank=True) @@ -214,3 +219,4 @@ class RegistroServico(models.Model): class Meta: verbose_name_plural = _(u'Registro de serviços') +