0008_long_description_data.py 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. # -*- coding: utf-8 -*-
  2. import datetime
  3. from south.db import db
  4. from south.v2 import DataMigration
  5. from django.db import models
  6. class Migration(DataMigration):
  7. def forwards(self, orm):
  8. "Write your forwards methods here."
  9. for item in orm["catalog.item"].objects.all():
  10. item.long_description = item.description
  11. item.save()
  12. def backwards(self, orm):
  13. "Write your backwards methods here."
  14. models = {
  15. "auth.group": {
  16. "Meta": {"object_name": "Group"},
  17. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  18. "name": (
  19. "django.db.models.fields.CharField",
  20. [],
  21. {"unique": "True", "max_length": "80"},
  22. ),
  23. "permissions": (
  24. "django.db.models.fields.related.ManyToManyField",
  25. [],
  26. {
  27. "to": "orm['auth.Permission']",
  28. "symmetrical": "False",
  29. "blank": "True",
  30. },
  31. ),
  32. },
  33. "auth.permission": {
  34. "Meta": {
  35. "ordering": "('content_type__app_label', 'content_type__model', 'codename')",
  36. "unique_together": "(('content_type', 'codename'),)",
  37. "object_name": "Permission",
  38. },
  39. "codename": (
  40. "django.db.models.fields.CharField",
  41. [],
  42. {"max_length": "100"},
  43. ),
  44. "content_type": (
  45. "django.db.models.fields.related.ForeignKey",
  46. [],
  47. {"to": "orm['contenttypes.ContentType']"},
  48. ),
  49. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  50. "name": ("django.db.models.fields.CharField", [], {"max_length": "50"}),
  51. },
  52. "auth.user": {
  53. "Meta": {"object_name": "User"},
  54. "date_joined": (
  55. "django.db.models.fields.DateTimeField",
  56. [],
  57. {"default": "datetime.datetime.now"},
  58. ),
  59. "email": (
  60. "django.db.models.fields.EmailField",
  61. [],
  62. {"max_length": "75", "blank": "True"},
  63. ),
  64. "first_name": (
  65. "django.db.models.fields.CharField",
  66. [],
  67. {"max_length": "30", "blank": "True"},
  68. ),
  69. "groups": (
  70. "django.db.models.fields.related.ManyToManyField",
  71. [],
  72. {"to": "orm['auth.Group']", "symmetrical": "False", "blank": "True"},
  73. ),
  74. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  75. "is_active": (
  76. "django.db.models.fields.BooleanField",
  77. [],
  78. {"default": "True"},
  79. ),
  80. "is_staff": (
  81. "django.db.models.fields.BooleanField",
  82. [],
  83. {"default": "False"},
  84. ),
  85. "is_superuser": (
  86. "django.db.models.fields.BooleanField",
  87. [],
  88. {"default": "False"},
  89. ),
  90. "last_login": (
  91. "django.db.models.fields.DateTimeField",
  92. [],
  93. {"default": "datetime.datetime.now"},
  94. ),
  95. "last_name": (
  96. "django.db.models.fields.CharField",
  97. [],
  98. {"max_length": "30", "blank": "True"},
  99. ),
  100. "password": (
  101. "django.db.models.fields.CharField",
  102. [],
  103. {"max_length": "128"},
  104. ),
  105. "user_permissions": (
  106. "django.db.models.fields.related.ManyToManyField",
  107. [],
  108. {
  109. "to": "orm['auth.Permission']",
  110. "symmetrical": "False",
  111. "blank": "True",
  112. },
  113. ),
  114. "username": (
  115. "django.db.models.fields.CharField",
  116. [],
  117. {"unique": "True", "max_length": "30"},
  118. ),
  119. },
  120. "catalog.book": {
  121. "Meta": {"object_name": "Book", "_ormbases": ["catalog.Item"]},
  122. "author_image": (
  123. "sorl.thumbnail.fields.ImageField",
  124. [],
  125. {"max_length": "100", "null": "True", "blank": "True"},
  126. ),
  127. "authors": (
  128. "django.db.models.fields.CharField",
  129. [],
  130. {"max_length": "200", "null": "True", "blank": "True"},
  131. ),
  132. "dimensions": (
  133. "django.db.models.fields.CharField",
  134. [],
  135. {"max_length": "20", "null": "True", "blank": "True"},
  136. ),
  137. "edition": (
  138. "django.db.models.fields.CharField",
  139. [],
  140. {"max_length": "50", "null": "True", "blank": "True"},
  141. ),
  142. "editors": (
  143. "django.db.models.fields.CharField",
  144. [],
  145. {"max_length": "200", "null": "True", "blank": "True"},
  146. ),
  147. "features": (
  148. "django.db.models.fields.CharField",
  149. [],
  150. {"max_length": "100", "null": "True", "blank": "True"},
  151. ),
  152. "genre": (
  153. "django.db.models.fields.CharField",
  154. [],
  155. {"max_length": "100", "null": "True", "blank": "True"},
  156. ),
  157. "illustrator": (
  158. "django.db.models.fields.CharField",
  159. [],
  160. {"max_length": "200", "null": "True", "blank": "True"},
  161. ),
  162. "isbn": (
  163. "django.db.models.fields.CharField",
  164. [],
  165. {"max_length": "20", "null": "True", "blank": "True"},
  166. ),
  167. "item_ptr": (
  168. "django.db.models.fields.related.OneToOneField",
  169. [],
  170. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  171. ),
  172. "library_of_congress_number": (
  173. "django.db.models.fields.CharField",
  174. [],
  175. {"max_length": "20", "null": "True", "blank": "True"},
  176. ),
  177. "pages": (
  178. "django.db.models.fields.IntegerField",
  179. [],
  180. {"null": "True", "blank": "True"},
  181. ),
  182. "printer": (
  183. "django.db.models.fields.CharField",
  184. [],
  185. {"max_length": "200", "null": "True", "blank": "True"},
  186. ),
  187. "publish_date": (
  188. "django.db.models.fields.CharField",
  189. [],
  190. {"max_length": "20", "null": "True", "blank": "True"},
  191. ),
  192. "publisher": (
  193. "django.db.models.fields.CharField",
  194. [],
  195. {"max_length": "200", "null": "True", "blank": "True"},
  196. ),
  197. "subtitle": (
  198. "django.db.models.fields.CharField",
  199. [],
  200. {"max_length": "100", "null": "True", "blank": "True"},
  201. ),
  202. },
  203. "catalog.item": {
  204. "Meta": {"object_name": "Item"},
  205. "created": (
  206. "django.db.models.fields.DateTimeField",
  207. [],
  208. {"auto_now_add": "True", "blank": "True"},
  209. ),
  210. "created_by": (
  211. "django.db.models.fields.related.ForeignKey",
  212. [],
  213. {"related_name": "'+'", "to": "orm['auth.User']"},
  214. ),
  215. "deleted": (
  216. "django.db.models.fields.BooleanField",
  217. [],
  218. {"default": "False"},
  219. ),
  220. "description": (
  221. "django.db.models.fields.CharField",
  222. [],
  223. {"max_length": "200", "null": "True", "blank": "True"},
  224. ),
  225. "featured": (
  226. "django.db.models.fields.BooleanField",
  227. [],
  228. {"default": "False"},
  229. ),
  230. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  231. "image": (
  232. "sorl.thumbnail.fields.ImageField",
  233. [],
  234. {"max_length": "100", "null": "True", "blank": "True"},
  235. ),
  236. "is_active": (
  237. "django.db.models.fields.BooleanField",
  238. [],
  239. {"default": "True"},
  240. ),
  241. "last_updated": (
  242. "django.db.models.fields.DateTimeField",
  243. [],
  244. {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
  245. ),
  246. "last_updated_by": (
  247. "django.db.models.fields.related.ForeignKey",
  248. [],
  249. {"related_name": "'+'", "to": "orm['auth.User']"},
  250. ),
  251. "long_description": (
  252. "django.db.models.fields.TextField",
  253. [],
  254. {"null": "True", "blank": "True"},
  255. ),
  256. "price": (
  257. "django.db.models.fields.DecimalField",
  258. [],
  259. {"max_digits": "7", "decimal_places": "2"},
  260. ),
  261. "shipping_cost": (
  262. "django.db.models.fields.DecimalField",
  263. [],
  264. {"max_digits": "7", "decimal_places": "2"},
  265. ),
  266. "shipping_cost_multiple": (
  267. "django.db.models.fields.DecimalField",
  268. [],
  269. {"max_digits": "7", "decimal_places": "2"},
  270. ),
  271. "sku": (
  272. "django.db.models.fields.SlugField",
  273. [],
  274. {"unique": "True", "max_length": "20"},
  275. ),
  276. "subclass_type": (
  277. "django.db.models.fields.CharField",
  278. [],
  279. {"max_length": "200"},
  280. ),
  281. "synopsis": (
  282. "django.db.models.fields.CharField",
  283. [],
  284. {"max_length": "200", "null": "True", "blank": "True"},
  285. ),
  286. "tax_free": (
  287. "django.db.models.fields.BooleanField",
  288. [],
  289. {"default": "False"},
  290. ),
  291. "title": ("django.db.models.fields.CharField", [], {"max_length": "50"}),
  292. },
  293. "catalog.map": {
  294. "Meta": {"object_name": "Map", "_ormbases": ["catalog.Item"]},
  295. "dimensions": (
  296. "django.db.models.fields.CharField",
  297. [],
  298. {"max_length": "20", "null": "True", "blank": "True"},
  299. ),
  300. "item_ptr": (
  301. "django.db.models.fields.related.OneToOneField",
  302. [],
  303. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  304. ),
  305. },
  306. "catalog.movie": {
  307. "Meta": {"object_name": "Movie", "_ormbases": ["catalog.Item"]},
  308. "captioning": (
  309. "django.db.models.fields.CharField",
  310. [],
  311. {"max_length": "50", "null": "True", "blank": "True"},
  312. ),
  313. "format": (
  314. "django.db.models.fields.CharField",
  315. [],
  316. {"max_length": "20", "null": "True", "blank": "True"},
  317. ),
  318. "genre": (
  319. "django.db.models.fields.CharField",
  320. [],
  321. {"max_length": "100", "null": "True", "blank": "True"},
  322. ),
  323. "item_ptr": (
  324. "django.db.models.fields.related.OneToOneField",
  325. [],
  326. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  327. ),
  328. "language": (
  329. "django.db.models.fields.CharField",
  330. [],
  331. {"max_length": "50", "null": "True", "blank": "True"},
  332. ),
  333. "music": (
  334. "django.db.models.fields.CharField",
  335. [],
  336. {"max_length": "200", "null": "True", "blank": "True"},
  337. ),
  338. "producer": (
  339. "django.db.models.fields.CharField",
  340. [],
  341. {"max_length": "200", "null": "True", "blank": "True"},
  342. ),
  343. "region": (
  344. "django.db.models.fields.CharField",
  345. [],
  346. {"max_length": "50", "null": "True", "blank": "True"},
  347. ),
  348. "runtime_minutes": (
  349. "django.db.models.fields.IntegerField",
  350. [],
  351. {"null": "True", "blank": "True"},
  352. ),
  353. "sound": (
  354. "django.db.models.fields.CharField",
  355. [],
  356. {"max_length": "50", "null": "True", "blank": "True"},
  357. ),
  358. },
  359. "catalog.subscription": {
  360. "Meta": {"object_name": "Subscription", "_ormbases": ["catalog.Item"]},
  361. "duration": ("django.db.models.fields.IntegerField", [], {}),
  362. "item_ptr": (
  363. "django.db.models.fields.related.OneToOneField",
  364. [],
  365. {"to": "orm['catalog.Item']", "unique": "True", "primary_key": "True"},
  366. ),
  367. "shipping_method": (
  368. "django.db.models.fields.CharField",
  369. [],
  370. {"default": "u'REGULAR'", "max_length": "20"},
  371. ),
  372. "shipping_type": (
  373. "django.db.models.fields.CharField",
  374. [],
  375. {"default": "'INSTATE'", "max_length": "10"},
  376. ),
  377. },
  378. "catalog.zipcode": {
  379. "Meta": {"object_name": "ZipCode"},
  380. "city": (
  381. "django.db.models.fields.CharField",
  382. [],
  383. {"max_length": "64", "null": "True", "blank": "True"},
  384. ),
  385. "county": (
  386. "django.db.models.fields.CharField",
  387. [],
  388. {"max_length": "64", "null": "True", "blank": "True"},
  389. ),
  390. "created": (
  391. "django.db.models.fields.DateTimeField",
  392. [],
  393. {"auto_now_add": "True", "blank": "True"},
  394. ),
  395. "created_by": (
  396. "django.db.models.fields.related.ForeignKey",
  397. [],
  398. {"related_name": "'+'", "to": "orm['auth.User']"},
  399. ),
  400. "deleted": (
  401. "django.db.models.fields.BooleanField",
  402. [],
  403. {"default": "False"},
  404. ),
  405. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  406. "is_active": (
  407. "django.db.models.fields.BooleanField",
  408. [],
  409. {"default": "True"},
  410. ),
  411. "last_updated": (
  412. "django.db.models.fields.DateTimeField",
  413. [],
  414. {"auto_now": "True", "auto_now_add": "True", "blank": "True"},
  415. ),
  416. "last_updated_by": (
  417. "django.db.models.fields.related.ForeignKey",
  418. [],
  419. {"related_name": "'+'", "to": "orm['auth.User']"},
  420. ),
  421. "state": (
  422. "django.db.models.fields.CharField",
  423. [],
  424. {"max_length": "2", "null": "True", "blank": "True"},
  425. ),
  426. "zipcode": (
  427. "django.db.models.fields.CharField",
  428. [],
  429. {"unique": "True", "max_length": "9"},
  430. ),
  431. },
  432. "contenttypes.contenttype": {
  433. "Meta": {
  434. "ordering": "('name',)",
  435. "unique_together": "(('app_label', 'model'),)",
  436. "object_name": "ContentType",
  437. "db_table": "'django_content_type'",
  438. },
  439. "app_label": (
  440. "django.db.models.fields.CharField",
  441. [],
  442. {"max_length": "100"},
  443. ),
  444. "id": ("django.db.models.fields.AutoField", [], {"primary_key": "True"}),
  445. "model": ("django.db.models.fields.CharField", [], {"max_length": "100"}),
  446. "name": ("django.db.models.fields.CharField", [], {"max_length": "100"}),
  447. },
  448. }
  449. complete_apps = ["catalog"]
  450. symmetrical = True