@@ -0,0 +1,13 @@ |
||
| 1 |
+# -*- coding: utf-8 -*- |
|
| 2 |
+ |
|
| 3 |
+from djadmin import ExportExcelModelAdmin, ReadonlyModelAdmin |
|
| 4 |
+from django.contrib import admin |
|
| 5 |
+ |
|
| 6 |
+from msg.models import TamronMsgInfo |
|
| 7 |
+ |
|
| 8 |
+ |
|
| 9 |
+class TamronMsgInfoAdmin(admin.ModelAdmin): |
|
| 10 |
+ list_display = ('msg_id', 'content', 'contenten', 'zt', 'ctime')
|
|
| 11 |
+ |
|
| 12 |
+ |
|
| 13 |
+admin.site.register(TamronMsgInfo, TamronMsgInfoAdmin) |
@@ -0,0 +1,8 @@ |
||
| 1 |
+# -*- coding: utf-8 -*- |
|
| 2 |
+from __future__ import unicode_literals |
|
| 3 |
+ |
|
| 4 |
+from django.apps import AppConfig |
|
| 5 |
+ |
|
| 6 |
+ |
|
| 7 |
+class MsgConfig(AppConfig): |
|
| 8 |
+ name = 'msg' |
@@ -0,0 +1,24 @@ |
||
| 1 |
+# -*- coding: utf-8 -*- |
|
| 2 |
+ |
|
| 3 |
+from django.db import models |
|
| 4 |
+from django.utils.translation import ugettext_lazy as _ |
|
| 5 |
+ |
|
| 6 |
+ |
|
| 7 |
+class TamronMsgInfo(models.Model): |
|
| 8 |
+ msg_id = models.IntegerField(_(u'msg_id'), default=0, help_text=u'会员唯一标识') |
|
| 9 |
+ name = models.CharField(_(u'name'), max_length=255, blank=True, null=True, help_text=u'???') |
|
| 10 |
+ title = models.CharField(_(u'title'), max_length=255, blank=True, null=True, help_text=u'???') |
|
| 11 |
+ content = models.CharField(_(u'content'), max_length=255, blank=True, null=True, help_text=u'留言') |
|
| 12 |
+ contenten = models.CharField(_(u'contenten'), max_length=255, blank=True, null=True, help_text=u'回复') |
|
| 13 |
+ lxr = models.CharField(_(u'lxr'), max_length=20, blank=True, null=True, help_text=u'???') |
|
| 14 |
+ pa = models.IntegerField(_(u'pa'), default=0, blank=True, null=True, help_text=u'???') |
|
| 15 |
+ zt = models.IntegerField(_(u'zt'), default=2, help_text=u'???') |
|
| 16 |
+ ctime = models.CharField(_(u'ctime'), max_length=255, blank=True, null=True, help_text=u'创建时间') |
|
| 17 |
+ |
|
| 18 |
+ class Meta: |
|
| 19 |
+ verbose_name = _(u'留言板信息') |
|
| 20 |
+ verbose_name_plural = _(u'留言板信息') |
|
| 21 |
+ db_table = 'shidu_msg_liuyan' |
|
| 22 |
+ |
|
| 23 |
+ def __unicode__(self): |
|
| 24 |
+ return unicode(self.pk) |
@@ -0,0 +1,7 @@ |
||
| 1 |
+# -*- coding: utf-8 -*- |
|
| 2 |
+from __future__ import unicode_literals |
|
| 3 |
+ |
|
| 4 |
+from django.test import TestCase |
|
| 5 |
+ |
|
| 6 |
+ |
|
| 7 |
+# Create your tests here. |
@@ -0,0 +1,7 @@ |
||
| 1 |
+# -*- coding: utf-8 -*- |
|
| 2 |
+from __future__ import unicode_literals |
|
| 3 |
+ |
|
| 4 |
+from django.shortcuts import render |
|
| 5 |
+ |
|
| 6 |
+ |
|
| 7 |
+# Create your views here. |
@@ -43,6 +43,7 @@ INSTALLED_APPS = [ |
||
| 43 | 43 |
'django.contrib.staticfiles', |
| 44 | 44 |
'area', |
| 45 | 45 |
'config', |
| 46 |
+ 'msg', |
|
| 46 | 47 |
'tamron', |
| 47 | 48 |
] |
| 48 | 49 |
|