summaryrefslogtreecommitdiff
path: root/pgweb/profserv/models.py
diff options
context:
space:
mode:
authorMagnus Hagander2010-02-25 16:03:12 +0000
committerMagnus Hagander2010-02-25 16:03:12 +0000
commit37c79c78821a8646580948d94544f02faa215458 (patch)
tree9620c43da7b433f099b9f8999046add1d0ebe408 /pgweb/profserv/models.py
parent0d55002019c0807906b382d954d480e35f06e37b (diff)
Make professional services also use organisations
Diffstat (limited to 'pgweb/profserv/models.py')
-rw-r--r--pgweb/profserv/models.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/pgweb/profserv/models.py b/pgweb/profserv/models.py
index 543c0054..19b125fb 100644
--- a/pgweb/profserv/models.py
+++ b/pgweb/profserv/models.py
@@ -1,13 +1,14 @@
from django.db import models
from django.contrib.auth.models import User
+from pgweb.core.models import Organisation
from pgweb.util.bases import PgModel
class ProfessionalService(models.Model):
submitter = models.ForeignKey(User, null=False, blank=False)
approved = models.BooleanField(null=False, blank=False, default=False)
- name = models.CharField(max_length=100, null=False, blank=False)
+ organisation = models.ForeignKey(Organisation, null=False, blank=False)
description = models.TextField(null=False,blank=False)
employees = models.CharField(max_length=32, null=True, blank=True)
locations = models.CharField(max_length=128, null=True, blank=True)
@@ -21,18 +22,18 @@ class ProfessionalService(models.Model):
languages = models.CharField(max_length=128, null=True, blank=True)
customerexample = models.TextField(blank=True, null=True)
experience = models.TextField(blank=True, null=True)
- contact = models.CharField(max_length=128, null=True, blank=True)
+ contact = models.TextField(null=True, blank=True)
url = models.URLField(max_length=128, null=True, blank=True)
provides_support = models.BooleanField(null=False, default=False)
provides_hosting = models.BooleanField(null=False, default=False)
- interfaces = models.CharField(max_length=128, null=True, blank=True)
+ interfaces = models.CharField(max_length=512, null=True, blank=True)
send_notification = True
def __unicode__(self):
- return self.name
+ return self.organisation.name
class Meta:
- ordering = ('name',)
+ ordering = ('organisation__name',)