0010_add_person_model.py 19 KB

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