# Path: apps/account/models.py
# class Account(Model):
# 
#     # main data
#     user = ForeignKey('auth.User', unique=True, related_name="accounts")
#     description = TextField(blank=True)
#     source = CharField(max_length=64, choices=SOURCE_CHOICES, default='OTHER')
#     mobile = CharField(max_length=1024, blank=True)
#     links = ManyToManyField('link.Link', null=True, blank=True) 
#     passport = ProcessedImageField(upload_to=_upload_to, null=True, blank=True, 
#                                    processors=[ResizeToFit(1024, 768)],
#                                    format='JPEG', options={'quality': 90})
# 
#     # meta
#     # created_by = self
#     # updated_by = self
#     created_on = DateTimeField(auto_now_add=True)
#     updated_on = DateTimeField(auto_now=True)
# 
#     def get_name():
#         return self.user.username
# 
#     def __unicode__(self):
#         return self.user.username
# 
#     class Meta:
# 
#         ordering = ['user__username']


from django.db.models import Model
from django.db.models import ForeignKey
from django.db.models import CharField
from django.db.models import DateTimeField
from django.utils.translation import ugettext as _
from apps.account.models import Account
        "^http://www\.bewelcome\.org/",
        "^https://bewelcome\.org/",
        "^https://www\.bewelcome\.org/",
    ],
    "COUCHSURFING" : [
        "^couchsurfing\.org/",
        "^www\.couchsurfing\.org/",
        "^http://couchsurfing\.org/",
        "^http://www\.couchsurfing\.org/",
        "^https://couchsurfing\.org/",
        "^https://www\.couchsurfing\.org/",
        "^couchsurfing\.com/",
        "^www\.couchsurfing\.com/",
        "^http://couchsurfing\.com/",
        "^http://www\.couchsurfing\.com/",
        "^https://couchsurfing\.com/",
        "^https://www\.couchsurfing\.com/"
    ],
}

class Link(Model):

    site       = CharField(max_length=64, choices=SITE_CHOICES)
    profile    = CharField(max_length=1024) # THE ACTUAL URL, BE CAREFUL !!!

    # TODO implement and use mn relationship (the more confirms the better ...)
    confirmed  = ForeignKey(Account,     # None or the account that
                            blank=True, null=True)

    # metadata

# Path: apps/account/models.py
# class Account(Model):
# 
#     # main data
#     user = ForeignKey('auth.User', unique=True, related_name="accounts")
#     description = TextField(blank=True)
#     source = CharField(max_length=64, choices=SOURCE_CHOICES, default='OTHER')
#     mobile = CharField(max_length=1024, blank=True)
#     links = ManyToManyField('link.Link', null=True, blank=True) 
#     passport = ProcessedImageField(upload_to=_upload_to, null=True, blank=True, 
#                                    processors=[ResizeToFit(1024, 768)],
#                                    format='JPEG', options={'quality': 90})
# 
#     # meta
#     # created_by = self
#     # updated_by = self
#     created_on = DateTimeField(auto_now_add=True)
#     updated_on = DateTimeField(auto_now=True)
# 
#     def get_name():
#         return self.user.username
# 
#     def __unicode__(self):
#         return self.user.username
# 
#     class Meta:
# 
#         ordering = ['user__username']


# Path: apps/link/models.py
from django.db.models import Model
from django.db.models import ForeignKey
from django.db.models import CharField
from django.db.models import DateTimeField
from django.utils.translation import ugettext as _
from apps.account.models import Account

        "^http://www\.bewelcome\.org/",
        "^https://bewelcome\.org/",
        "^https://www\.bewelcome\.org/",
    ],
    "COUCHSURFING" : [
        "^couchsurfing\.org/",
        "^www\.couchsurfing\.org/",
        "^http://couchsurfing\.org/",
        "^http://www\.couchsurfing\.org/",
        "^https://couchsurfing\.org/",
        "^https://www\.couchsurfing\.org/",
        "^couchsurfing\.com/",
        "^www\.couchsurfing\.com/",
        "^http://couchsurfing\.com/",
        "^http://www\.couchsurfing\.com/",
        "^https://couchsurfing\.com/",
        "^https://www\.couchsurfing\.com/"
    ],
}

class Link(Model):

    site       = CharField(max_length=64, choices=SITE_CHOICES)
    profile    = CharField(max_length=1024) # THE ACTUAL URL, BE CAREFUL !!!

    # TODO implement and use mn relationship (the more confirms the better ...)
    confirmed  = ForeignKey(Account,     # None or the account that
                            blank=True, null=True)

    # metadata

    created_by = ForeignKey(Account, related_name="links_created")