DomainBase is abstract

This commit is contained in:
Sanj 2012-03-28 23:54:09 +05:30
parent 76e2111ebc
commit a28d6ac963

View File

@ -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)