blob: 64dfcd59c8b66f3bb36eabe852c2f775552e0d41 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
'''
Created on Feb 23, 2011
@author: leifj
'''
from django.db import models
import re
from pprint import pformat
import logging
from django.db.models.fields import CharField
class Service(models.Model):
entityId = CharField(max_length=1024,unique=True,editable=False)
display_name = CharField(max_length=1024,blank=True,null=True)
timecreated = models.DateTimeField(auto_now_add=True)
lastupdated = models.DateTimeField(auto_now=True)
def name(self):
if self.display_name:
return self.display_name
else:
return self.entityId
|