From d2665048e21db6719d9a821cc837aa8e35e801d7 Mon Sep 17 00:00:00 2001 From: LeandroRoberto Date: Tue, 1 Sep 2015 10:57:42 -0300 Subject: [PATCH] Class TipoNota inclusion --- compilacao/forms.py | 4 ---- compilacao/models.py | 14 +++++++++++++- compilacao/urls.py | 6 ------ 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/compilacao/forms.py b/compilacao/forms.py index c4f2ecbbc..e69de29bb 100644 --- a/compilacao/forms.py +++ b/compilacao/forms.py @@ -1,4 +0,0 @@ -from django import forms - - -# place form definition here \ No newline at end of file diff --git a/compilacao/models.py b/compilacao/models.py index c389f5d7a..8bbf1ced1 100644 --- a/compilacao/models.py +++ b/compilacao/models.py @@ -1,4 +1,16 @@ from django.db import models +from django.utils.translation import ugettext_lazy as _ -# Create your models here. +class TipoNota(models.Model): + sigla = models.CharField(max_length=10, verbose_name=_('Sigla')) + nome = models.CharField(max_length=50, verbose_name=_('Nome')) + modelo = models.TextField( + blank=True, null=True, verbose_name=_('Modelo')) + + class Meta: + verbose_name = _('Tipo de Nota') + verbose_name_plural = _('Tipos de Nota') + + def __str__(self): + return self.sigla diff --git a/compilacao/urls.py b/compilacao/urls.py index 96ef53f2c..e69de29bb 100644 --- a/compilacao/urls.py +++ b/compilacao/urls.py @@ -1,6 +0,0 @@ -try: - from django.conf.urls import * -except ImportError: # django < 1.4 - from django.conf.urls.defaults import * - -# place app url patterns here