#*-encoding:utf-8-*
from django.db import models
from django.contrib.auth.models import User
from django.conf import settings
# Create your models here.


# 有些功能尚未开发,注释保留
class Diaryuser(models.Model):
    # user = models.OneToOneField(settings.AUTH_USER_MODEL,
    #                             verbose_name=u'用户')
    user = models.OneToOneField(User)
    # public_intrest = models.ManyToManyField(Public_intrest,
    #                                         verbose_name=u'公共爱好')
    # person_intrest = models.ManyToManyField(Person_intrest,
    #                                         verbose_name=u'私人爱好')
    age = models.IntegerField(null=True, default=16,
                              verbose_name=u'年龄')
    telephone = models.CharField(max_length=11, null=True, blank=True,
                                 verbose_name=u'电话号码')
    # head = models.ImageField(upload_to='photo/')
    # background = models.ImageField(upload_to='background/')

    class Meta:
        verbose_name_plural = verbose_name = '用户'

    def __unicode__(self):
        return'{}'.format(self.user.username)

# 尚未开发


class Follow(models.Model):
    followed = models.OneToOneField(
        settings.AUTH_USER_MODEL,
        related_name='followed',
        verbose_name=u'被关注者')
    followers = models.OneToOneField(
        settings.AUTH_USER_MODEL,
        related_name='followers',
        verbose_name=u'关注者')
    connect = models.DateTimeField(auto_now_add=True, db_index=True,
                                   verbose_name=u'关注纽带')

    class Meta:
        ordering = ['-connect']
        verbose_name_plural = verbose_name = u'关注关系'

    def __unicode__(self):
        return "{} is following by {}".format(self.followed, self.followers)

b0faa5e722bef155746b305c61d9f859e7889776
<mask token>


class Follow(models.Model):
    followed = models.OneToOneField(settings.AUTH_USER_MODEL, related_name=
        'followed', verbose_name=u'被关注者')
    followers = models.OneToOneField(settings.AUTH_USER_MODEL, related_name
        ='followers', verbose_name=u'关注者')
    connect = models.DateTimeField(auto_now_add=True, db_index=True,
        verbose_name=u'关注纽带')


    class Meta:
        ordering = ['-connect']
        verbose_name_plural = verbose_name = u'关注关系'

    def __unicode__(self):
        return '{} is following by {}'.format(self.followed, self.followers)

<mask token>


class Diaryuser(models.Model):
    <mask token>
    <mask token>
    <mask token>


    class Meta:
        verbose_name_plural = verbose_name = '用户'

    def __unicode__(self):
        return '{}'.format(self.user.username)


class Follow(models.Model):
    followed = models.OneToOneField(settings.AUTH_USER_MODEL, related_name=
        'followed', verbose_name=u'被关注者')
    followers = models.OneToOneField(settings.AUTH_USER_MODEL, related_name
        ='followers', verbose_name=u'关注者')
    connect = models.DateTimeField(auto_now_add=True, db_index=True,
        verbose_name=u'关注纽带')


    class Meta:
        ordering = ['-connect']
        verbose_name_plural = verbose_name = u'关注关系'

    def __unicode__(self):
        return '{} is following by {}'.format(self.followed, self.followers)

<mask token>


class Diaryuser(models.Model):
    user = models.OneToOneField(User)
    age = models.IntegerField(null=True, default=16, verbose_name=u'年龄')
    telephone = models.CharField(max_length=11, null=True, blank=True,
        verbose_name=u'电话号码')


    class Meta:
        verbose_name_plural = verbose_name = '用户'

    def __unicode__(self):
        return '{}'.format(self.user.username)


class Follow(models.Model):
    followed = models.OneToOneField(settings.AUTH_USER_MODEL, related_name=
        'followed', verbose_name=u'被关注者')
    followers = models.OneToOneField(settings.AUTH_USER_MODEL, related_name
        ='followers', verbose_name=u'关注者')
    connect = models.DateTimeField(auto_now_add=True, db_index=True,
        verbose_name=u'关注纽带')


    class Meta:
        ordering = ['-connect']
        verbose_name_plural = verbose_name = u'关注关系'

    def __unicode__(self):
        return '{} is following by {}'.format(self.followed, self.followers)

from django.db import models
from django.contrib.auth.models import User
from django.conf import settings


class Diaryuser(models.Model):
    user = models.OneToOneField(User)
    age = models.IntegerField(null=True, default=16, verbose_name=u'年龄')
    telephone = models.CharField(max_length=11, null=True, blank=True,
        verbose_name=u'电话号码')


    class Meta:
        verbose_name_plural = verbose_name = '用户'

    def __unicode__(self):
        return '{}'.format(self.user.username)


class Follow(models.Model):
    followed = models.OneToOneField(settings.AUTH_USER_MODEL, related_name=
        'followed', verbose_name=u'被关注者')
    followers = models.OneToOneField(settings.AUTH_USER_MODEL, related_name
        ='followers', verbose_name=u'关注者')
    connect = models.DateTimeField(auto_now_add=True, db_index=True,
        verbose_name=u'关注纽带')


    class Meta:
        ordering = ['-connect']
        verbose_name_plural = verbose_name = u'关注关系'

    def __unicode__(self):
        return '{} is following by {}'.format(self.followed, self.followers)

#*-encoding:utf-8-*
from django.db import models
from django.contrib.auth.models import User
from django.conf import settings
# Create your models here.


# 有些功能尚未开发,注释保留
class Diaryuser(models.Model):
    # user = models.OneToOneField(settings.AUTH_USER_MODEL,
    #                             verbose_name=u'用户')
    user = models.OneToOneField(User)
    # public_intrest = models.ManyToManyField(Public_intrest,
    #                                         verbose_name=u'公共爱好')
    # person_intrest = models.ManyToManyField(Person_intrest,
    #                                         verbose_name=u'私人爱好')
    age = models.IntegerField(null=True, default=16,
                              verbose_name=u'年龄')
    telephone = models.CharField(max_length=11, null=True, blank=True,
                                 verbose_name=u'电话号码')
    # head = models.ImageField(upload_to='photo/')
    # background = models.ImageField(upload_to='background/')

    class Meta:
        verbose_name_plural = verbose_name = '用户'

    def __unicode__(self):
        return'{}'.format(self.user.username)

# 尚未开发


class Follow(models.Model):
    followed = models.OneToOneField(
        settings.AUTH_USER_MODEL,
        related_name='followed',
        verbose_name=u'被关注者')
    followers = models.OneToOneField(
        settings.AUTH_USER_MODEL,
        related_name='followers',
        verbose_name=u'关注者')
    connect = models.DateTimeField(auto_now_add=True, db_index=True,
                                   verbose_name=u'关注纽带')

    class Meta:
        ordering = ['-connect']
        verbose_name_plural = verbose_name = u'关注关系'

    def __unicode__(self):
        return "{} is following by {}".format(self.followed, self.followers)
