Commit 3f5ee079 authored by 段英荣's avatar 段英荣

modify

parent 03c16a91
......@@ -28,7 +28,7 @@ class User(models.Model):
profile_pic = models.CharField(verbose_name=u'头像', max_length=300)
gender = models.SmallIntegerField(verbose_name=u'性别')
city_id = models.CharField(verbose_name=u'城市id', max_length=60)
country_id = models.CharField(verbose_name='国家id', max_length=40)
country_id = models.CharField(verbose_name=u'国家id', max_length=40)
is_online = models.BooleanField(verbose_name="是否上线")
is_deleted = models.BooleanField(verbose_name='是否删除')
create_time = models.DateTimeField(verbose_name=u'创建时间',default=datetime.datetime.fromtimestamp(0))
......
......@@ -56,31 +56,29 @@ class UserTransfer(object):
try:
latest_topic_time_val = instance.get_latest_topic_time_val()
res["latest_topic_time_val"] = latest_topic_time_val
#res["latest_topic_time_val"] = -1
except:
logging.error("duan test,catch exception,err_msg:%s" % traceback.format_exc())
res["latest_topic_time_val"] = -1
try:
tzlc_create_time = tzlc(instance.create_time)
res["create_time"] = tzlc_create_time
res["create_time_val"] = int(time.mktime(tzlc_create_time.timetuple()))
tzlc_create_time = tzlc(instance.create_time)
res["create_time"] = tzlc_create_time
res["create_time_val"] = int(time.mktime(tzlc_create_time.timetuple()))
tzlc_update_time = tzlc(instance.update_time)
res["update_time"] = tzlc_update_time
res["update_time_val"] = int(time.mktime(tzlc_update_time.timetuple()))
tzlc_update_time = tzlc(instance.update_time)
res["update_time"] = tzlc_update_time
res["update_time_val"] = int(time.mktime(tzlc_update_time.timetuple()))
try:
res["tag_list"] = []
res["attention_user_id_list"] = []
res["attention_group_id_list"] = []
res["pick_user_id_list"] = []
res["same_group_user_id_list"] = []
# res["tag_list"] = instance.get_user_tag_id_list()
# res["attention_user_id_list"] = cls.get_follow_user_id_list(userInstance=instance)
# res["attention_group_id_list"] = instance.get_attention_group_id_list()
# res["pick_user_id_list"] = instance.get_pick_user_id_list()
# res["same_group_user_id_list"] = instance.get_same_group_user_id_list()
# res["tag_list"] = []
# res["attention_user_id_list"] = []
# res["attention_group_id_list"] = []
# res["pick_user_id_list"] = []
# res["same_group_user_id_list"] = []
res["tag_list"] = instance.get_user_tag_id_list()
res["attention_user_id_list"] = cls.get_follow_user_id_list(userInstance=instance)
res["attention_group_id_list"] = instance.get_attention_group_id_list()
res["pick_user_id_list"] = instance.get_pick_user_id_list()
res["same_group_user_id_list"] = instance.get_same_group_user_id_list()
except:
logging.error("duan test,catch exception,err_msg:%s" % traceback.format_exc())
res["tag_list"] = []
......@@ -93,4 +91,4 @@ class UserTransfer(object):
return res
except:
logging.error("catch exception,err_msg:%s" % traceback.format_exc())
return None
\ No newline at end of file
return {}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment