turn { 'coupon_expire_at': '', 'coupon_value': 0, 'coupon_has_expired': True, } @property def coupon_info2(self): return self.coupon_info, @property def data(self): if self.submit_during_activity: try: act = ActivityInfo.objects.get(pk=self.activity_id) except ActivityInfo.DoesNotExist: act = None else: act = None return { 'lat': self.lat, 'lon': self.lon, 'brand_id': self.brand_id, 'brand_name': self.brand_name, 'model_id': self.model_id, 'model_name': self.model_name, 'model_info': self.model_info, 'serialNo': self.serialNo, 'verifyResult': self.verifyResult, 'submit_during_activity': self.submit_during_activity, 'coupon_info': act.coupon_info2(created_at=self.created_at) if act else self.coupon_info2, 'final_coupon_info': act.coupon_info(created_at=self.created_at) if act else self.coupon_info, 'has_used': self.has_used, 'used_at': self.used_at, } class ActivityInfo(BaseModelMixin): FIXED_EXPIRED_TIME = 0 CHANGED_EXPIRED_TIME = 1 COUPON_EXPIRED_TIME_TUPLE = ( (FIXED_EXPIRED_TIME, u'固定结束时间'), (CHANGED_EXPIRED_TIME, u'可变结束时间'), ) brand_id = models.CharField(_(u'brand_id'), max_length=32, blank=True, null=True, help_text=u'品牌唯一标识', db_index=True) activity_name = models.CharField(_(u'activity_name'), max_length=255, blank=True, null=True, help_text=u'活动名称') model_uni_names = JSONField(_(u'model_uni_names'), default=[], blank=True, null=True, help_text=u'型号统一名称列表') start_at = models.DateTimeField(_(u'start_at'), help_text=_(u'start_at')) end_at = models.DateTimeField(_(u'end_at'), help_text=_(u'end_at')) coupon_expire_type = models.IntegerField(_(u'coupon_expire_type'), choices=COUPON_EXPIRED_TIME_TUPLE, default=FIXED_EXPIRED_TIME, help_text=_(u'维修券类型')) coupon_valid_period = models.IntegerField(_(u'coupon_valid_period'), default=0, help_text=_(u'维修券有效时间(单位:天)')) coupon_expire_at = models.DateTimeField(_(u'coupon_expire_at'), blank=True, null=True, help_text=_(u'维修券过期时间')) coupon_value = models.IntegerField(_(u'coupon_value'), default=0, help_text=_(u'维修券金额(单位:分)')) class Meta: verbose_name = _(u'活动信息') verbose_name_plural = _(u'活动信息') def __unicode__(self): return unicode(self.pk) def final_expire_at(self, created_at=None): if self.coupon_expire_type == ActivityInfo.FIXED_EXPIRED_TIME: return self.coupon_expire_at return tc.utc_datetime(dt=created_at, days=self.coupon_valid_period) def final_coupon_expire_at(self, created_at=None): final_expire_at = self.final_expire_at(created_at=created_at) if not final_expire_at: return '' y = tc.local_string(final_expire_at, format='%Y') m = tc.local_string(final_expire_at, format='%m') d = tc.local_string(final_expire_at, format='%d') return u'{}年{}月{}日'.format(y, m, d) def has_unexpired_activity(self, model_name): return (self.model_uni_names and model_name in self.model_uni_names) and (self.start_at <= tc.utc_datetime() < self.end_at) def coupon_info(self, created_at=None): return { 'coupon_expire_at': self.final_coupon_expire_at(created_at=created_at), 'coupon_value': self.coupon_value, 'coupon_has_expired': tc.utc_datetime() >= self.final_expire_at(created_at=created_at), } def coupon_info2(self, created_at=None): return self.coupon_info(created_at=created_at), class SlideInfo(BaseModelMixin): brand_id = models.CharField(_(u'brand_id'), max_length=32, blank=True, null=True, help_text=u'品牌唯一标识', db_index=True) image = models.ImageField(_(u'image'), upload_to=upload_path, blank=True, null=True, help_text=u'图片') url = models.CharField(_(u'url'), max_length=255, blank=True, null=True, help_text=u'链接') position = models.IntegerField(_(u'position'), default=1, help_text=u'排序') class Meta: verbose_name = _(u'轮播图信息') verbose_name_plural = _(u'轮播图信息') def __unicode__(self): return unicode(self.pk) @property def image_path(self): return upload_file_path(self.image) @property def image_url(self): return upload_file_url(self.image) @property def data(self): return { 'image_url': self.image_url, 'url': self.url, } kodo - Gogs: Go Git Service

Keine Beschreibung

joinus.html 2.6KB

    <!doctype html> <html> <head> <meta charset="UTF-8"> <title>拍爱 PAI.AI 加入拍爱</title> <meta name="keywords" content="摄影 图片 影像 分享 交流 社交 交友 摄影师 女性 孩子 亲子 旅行 旅游 约拍 iphone android app" /> <link href="css/layout.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.min.js"></script> </head> <body> <div id="header"> <div class="content"> <a href="index.html" target="_self" class="logo"></a> <div class="navigation"> <a href="contactus.html" target="_self" >联系我们</a> <a href="joinus.html" target="_self" class="current" >加入拍爱</a> <a href="aboutus.html" target="_self" >关于我们</a> <a href="index.html" target="_self" >首页</a> </div> </div> </div> <div id="container" ><div class="content joinus"> <p> 在我们这里,你可以参与到一个火热的创业项目,未来很有可能看到自己作品满大街的人都在使用...如果您喜欢摄影...除了会有各种相机把玩,还会有同好可以畅聊...最重要的,你还会发现...... 你将成为——软件工程师中最懂摄影的人 来和我们一起做一份激动人心的事业吧 </p> <p> <strong>职位名称:iOS软件工程师</strong><br> <strong>岗位职责:</strong><br> 负责iOS平台下应用的开发<br> <strong>任职要求:</strong><br> 1、至少1年的iOS平台开发经验;<br> 2、具备扎实的数据结构、算法等技术功底;<br> 3、具备良好的编程风格与团队合作意识,可承担较大的工作压力;<br> 4、正直、优秀、有上进心,经验丰富的同时没有丧失开发NB产品的热情;<br> 5、年轻;<br> 6、期待您喜欢摄影,喜欢相机;<br> </p> <p> <strong>职位名称:专利工程师</strong><br> <strong>岗位职责:</strong><br> 1、撰写高质量的专利申请文件、答复审查意见;<br> 2、专利检索咨询、专利挖掘、以及撰写专利分析报告。<br> <strong>任职要求:</strong><br> 1、具有一年以上独立撰写专利文件经验,熟悉专利申请相关知识;<br> 2、理工科,大学本科以上毕业,物理、数学、电子、通讯、互联网等技术专业背景之一;<br> 3、有专利代理人资格证优先考虑;<br> 4、期待您喜欢摄影,喜欢相机; </p> </div></div> <div id="footer"> <div class="content foot"> <a href="aboutus.html" target="_self" >关于我们</a> <span>|</span> <a href="contactus.html" target="_self" >联系我们</a> ©2016 拍爱 PAI.AI 琼ICP备16000076号 </div> </div> </body> </html>