##// END OF EJS Templates
- Primer prototipo de la aplicacion web para ABS.
- Primer prototipo de la aplicacion web para ABS.

File last commit:

r119:120
r119:120
Show More
models.py
29 lines | 902 B | text/x-python | PythonLexer
from django.db import models
from django.utils.datetime_safe import datetime
from components.pattern_antenna.models import patternAntenna
class profileAntenna(models.Model):
name = models.CharField(max_length=250)
pattern = models.ForeignKey(patternAntenna)
date_create = models.DateTimeField()
date_modified = models.DateTimeField(null=True)
hits = models.PositiveIntegerField()
state = models.PositiveSmallIntegerField()
class Meta:
db_table = "abs_profile_antenna"
verbose_name = "Profile of Configuration"
verbose_name_plural = "Profiles of Configuration"
def save(self):
if self.pk is None:
self.date_create = datetime.now()
else:
self.date_modified = datetime.now()
super(profileAntenna, self).save()
'''
def __unicode__(self):
return u'%s' % self.value
'''