|
|
58
|
+ return img_url(self.m_photo_path)
|
|
57
|
59
|
|
|
58
|
60
|
@property
|
|
59
|
61
|
def l_photo_url(self):
|
|
60
|
|
- return u'{0}/{1}'.format(settings.IMG_DOMAIN, self.l_photo_path) if self.l_photo_path else ''
|
|
|
62
|
+ return img_url(self.l_photo_path)
|
|
61
|
63
|
|
|
62
|
64
|
@property
|
|
63
|
65
|
def r_photo_url(self):
|
|
64
|
|
- return u'{0}/{1}'.format(settings.IMG_DOMAIN, self.r_photo_path) if self.r_photo_path else ''
|
|
|
66
|
+ return img_url(self.r_photo_path)
|
|
65
|
67
|
|
|
66
|
68
|
@property
|
|
67
|
69
|
def data(self):
|
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+# -*- coding: utf-8 -*-
|
|
|
2
|
+
|
|
|
3
|
+from django.conf import settings
|
|
|
4
|
+
|
|
|
5
|
+
|
|
|
6
|
+def img_url(img_path):
|
|
|
7
|
+ return u'{0}/{1}'.format(settings.IMG_DOMAIN, img_path) if img_path else ''
|