From a28d6ac9636b071c2ec32ac3b808134c9a21b1c3 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 28 Mar 2012 23:54:09 +0530 Subject: [PATCH] DomainBase is abstract --- domains/domain/models.py | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/domains/domain/models.py b/domains/domain/models.py index 1d94b1b..fd8477f 100644 --- a/domains/domain/models.py +++ b/domains/domain/models.py @@ -2,26 +2,6 @@ from django.db import models from base import BaseModel from settings import SERVER_CHOICES, EMAIL_CHOICES, DB_CHOICES, PROJECT_TYPES -SERVER_CHOICES = ( - ('camp', 'camp.r-w-x.org'), - ('marlon', 'marlon.in'), -) - -EMAIL_CHOICES = ( - ('gmail', 'Gmail'), - ('mailb', 'MailB'), -) - -DB_CHOICES = ( - ('mysql', 'MySQL'), - ('postgres', 'PostgreSQL'), - ('sqlite', 'SQLite'), -) - -PROJECT_TYPES = ( - ('django', 'Django'), - ('www', 'PHP or Static'), -) class DomainBase(BaseModel): url = models.CharField(max_length=512) @@ -32,6 +12,9 @@ class DomainBase(BaseModel): db_type = models.CharField(choices=DB_CHOICES, blank=True) db_name = models.CharField(max_length=255, blank=True) + class Meta: + abstract = True + def __unicode__(self): return self.url @@ -40,5 +23,5 @@ class Domain(DomainBase): pass -class SubDomain(DomainBase): +class Subdomain(DomainBase): main_domain = models.ForeignKey(Domain) \ No newline at end of file