-5769f664c47605350a326159291eb3e7c2c1858cR3991">3991
+ TamronCitiesInfo.objects.all().delete()
|
|
|
3992
|
+
|
|
|
3993
|
+ for province_code, province_name in AREA['86'].iteritems():
|
|
|
3994
|
+ TamronCitiesInfo.objects.create(pk=province_code, pid=1, name=province_name)
|
|
|
3995
|
+ try:
|
|
|
3996
|
+ for city_code, city_name in AREA[province_code].iteritems():
|
|
|
3997
|
+ TamronCitiesInfo.objects.create(pk=city_code, pid=province_code, name=city_name)
|
|
|
3998
|
+ except KeyError:
|
|
|
3999
|
+ continue
|
|
|
|
@@ -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.
|
|
|
|
@@ -20,8 +20,8 @@ class TamronSliderInfo(models.Model):
|
|
20
|
20
|
px = models.IntegerField(_(u'px'), default=1, help_text=u'???')
|
|
21
|
21
|
|
|
22
|
22
|
class Meta:
|
|
23
|
|
- verbose_name = _(u'轮播图')
|
|
24
|
|
- verbose_name_plural = _(u'轮播图')
|
|
|
23
|
+ verbose_name = _(u'轮播图信息')
|
|
|
24
|
+ verbose_name_plural = _(u'轮播图信息')
|
|
25
|
25
|
db_table = 'shidu_banner'
|
|
26
|
26
|
|
|
27
|
27
|
def __unicode__(self):
|
|
|
|
@@ -41,6 +41,7 @@ INSTALLED_APPS = [
|
|
41
|
41
|
'django.contrib.sessions',
|
|
42
|
42
|
'django.contrib.messages',
|
|
43
|
43
|
'django.contrib.staticfiles',
|
|
|
44
|
+ 'area',
|
|
44
|
45
|
'tamron',
|
|
45
|
46
|
]
|
|
46
|
47
|
|