2
0

0001_initial.py 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798
  1. # -*- coding: utf-8 -*-
  2. # Generated by Django 1.10.5 on 2017-03-15 07:16
  3. from __future__ import unicode_literals
  4. from django.db import migrations, models
  5. import django.db.models.deletion
  6. import modelcluster.fields
  7. import wagtail.blocks
  8. import wagtail.fields
  9. import wagtail.embeds.blocks
  10. import wagtail.images.blocks
  11. class Migration(migrations.Migration):
  12. initial = True
  13. dependencies = [
  14. ("wagtailimages", "0018_remove_rendition_filter"),
  15. ("wagtailcore", "0032_add_bulk_delete_page_permission"),
  16. ]
  17. operations = [
  18. migrations.CreateModel(
  19. name="FooterText",
  20. fields=[
  21. (
  22. "id",
  23. models.AutoField(
  24. auto_created=True,
  25. primary_key=True,
  26. serialize=False,
  27. verbose_name="ID",
  28. ),
  29. ),
  30. ("body", wagtail.fields.RichTextField()),
  31. ],
  32. options={
  33. "verbose_name_plural": "Footer Text",
  34. },
  35. ),
  36. migrations.CreateModel(
  37. name="FormField",
  38. fields=[
  39. (
  40. "id",
  41. models.AutoField(
  42. auto_created=True,
  43. primary_key=True,
  44. serialize=False,
  45. verbose_name="ID",
  46. ),
  47. ),
  48. (
  49. "sort_order",
  50. models.IntegerField(blank=True, editable=False, null=True),
  51. ),
  52. (
  53. "label",
  54. models.CharField(
  55. help_text="The label of the form field",
  56. max_length=255,
  57. verbose_name="label",
  58. ),
  59. ),
  60. (
  61. "field_type",
  62. models.CharField(
  63. choices=[
  64. ("singleline", "Single line text"),
  65. ("multiline", "Multi-line text"),
  66. ("email", "Email"),
  67. ("number", "Number"),
  68. ("url", "URL"),
  69. ("checkbox", "Checkbox"),
  70. ("checkboxes", "Checkboxes"),
  71. ("dropdown", "Drop down"),
  72. ("radio", "Radio buttons"),
  73. ("date", "Date"),
  74. ("datetime", "Date/time"),
  75. ],
  76. max_length=16,
  77. verbose_name="field type",
  78. ),
  79. ),
  80. (
  81. "required",
  82. models.BooleanField(default=True, verbose_name="required"),
  83. ),
  84. (
  85. "choices",
  86. models.TextField(
  87. blank=True,
  88. help_text="Comma separated list of choices. Only applicable in checkboxes, radio and dropdown.",
  89. verbose_name="choices",
  90. ),
  91. ),
  92. (
  93. "default_value",
  94. models.CharField(
  95. blank=True,
  96. help_text="Default value. Comma separated values supported for checkboxes.",
  97. max_length=255,
  98. verbose_name="default value",
  99. ),
  100. ),
  101. (
  102. "help_text",
  103. models.CharField(
  104. blank=True, max_length=255, verbose_name="help text"
  105. ),
  106. ),
  107. ],
  108. options={
  109. "ordering": ["sort_order"],
  110. "abstract": False,
  111. },
  112. ),
  113. migrations.CreateModel(
  114. name="FormPage",
  115. fields=[
  116. (
  117. "page_ptr",
  118. models.OneToOneField(
  119. auto_created=True,
  120. on_delete=django.db.models.deletion.CASCADE,
  121. parent_link=True,
  122. primary_key=True,
  123. serialize=False,
  124. to="wagtailcore.Page",
  125. ),
  126. ),
  127. (
  128. "to_address",
  129. models.CharField(
  130. blank=True,
  131. help_text="Optional - form submissions will be emailed to these addresses. Separate multiple addresses by comma.",
  132. max_length=255,
  133. verbose_name="to address",
  134. ),
  135. ),
  136. (
  137. "from_address",
  138. models.CharField(
  139. blank=True, max_length=255, verbose_name="from address"
  140. ),
  141. ),
  142. (
  143. "subject",
  144. models.CharField(
  145. blank=True, max_length=255, verbose_name="subject"
  146. ),
  147. ),
  148. (
  149. "body",
  150. wagtail.fields.StreamField(
  151. (
  152. (
  153. "heading_block",
  154. wagtail.blocks.StructBlock(
  155. (
  156. (
  157. "heading_text",
  158. wagtail.blocks.CharBlock(
  159. classname="title", required=True
  160. ),
  161. ),
  162. (
  163. "size",
  164. wagtail.blocks.ChoiceBlock(
  165. blank=True,
  166. choices=[
  167. ("", "Select a header size"),
  168. ("h2", "H2"),
  169. ("h3", "H3"),
  170. ("h4", "H4"),
  171. ],
  172. required=False,
  173. ),
  174. ),
  175. )
  176. ),
  177. ),
  178. (
  179. "paragraph_block",
  180. wagtail.blocks.RichTextBlock(
  181. icon="pilcrow",
  182. template="blocks/paragraph_block.html",
  183. ),
  184. ),
  185. (
  186. "image_block",
  187. wagtail.blocks.StructBlock(
  188. (
  189. (
  190. "image",
  191. wagtail.images.blocks.ImageChooserBlock(
  192. required=True
  193. ),
  194. ),
  195. (
  196. "caption",
  197. wagtail.blocks.CharBlock(required=False),
  198. ),
  199. (
  200. "attribution",
  201. wagtail.blocks.CharBlock(required=False),
  202. ),
  203. )
  204. ),
  205. ),
  206. (
  207. "block_quote",
  208. wagtail.blocks.StructBlock(
  209. (
  210. ("text", wagtail.blocks.TextBlock()),
  211. (
  212. "attribute_name",
  213. wagtail.blocks.CharBlock(
  214. blank=True,
  215. label="e.g. Guy Picciotto",
  216. required=False,
  217. ),
  218. ),
  219. )
  220. ),
  221. ),
  222. (
  223. "embed_block",
  224. wagtail.embeds.blocks.EmbedBlock(
  225. help_text="Insert an embed URL e.g https://www.youtube.com/watch?v=SGJFWirQ3ks",
  226. icon="media",
  227. template="blocks/embed_block.html",
  228. ),
  229. ),
  230. )
  231. ),
  232. ),
  233. ("thank_you_text", wagtail.fields.RichTextField(blank=True)),
  234. (
  235. "image",
  236. models.ForeignKey(
  237. blank=True,
  238. null=True,
  239. on_delete=django.db.models.deletion.SET_NULL,
  240. related_name="+",
  241. to="wagtailimages.Image",
  242. ),
  243. ),
  244. ],
  245. options={
  246. "abstract": False,
  247. },
  248. bases=("wagtailcore.page",),
  249. ),
  250. migrations.CreateModel(
  251. name="GalleryPage",
  252. fields=[
  253. (
  254. "page_ptr",
  255. models.OneToOneField(
  256. auto_created=True,
  257. on_delete=django.db.models.deletion.CASCADE,
  258. parent_link=True,
  259. primary_key=True,
  260. serialize=False,
  261. to="wagtailcore.Page",
  262. ),
  263. ),
  264. (
  265. "introduction",
  266. models.TextField(blank=True, help_text="Text to describe the page"),
  267. ),
  268. (
  269. "body",
  270. wagtail.fields.StreamField(
  271. (
  272. (
  273. "heading_block",
  274. wagtail.blocks.StructBlock(
  275. (
  276. (
  277. "heading_text",
  278. wagtail.blocks.CharBlock(
  279. classname="title", required=True
  280. ),
  281. ),
  282. (
  283. "size",
  284. wagtail.blocks.ChoiceBlock(
  285. blank=True,
  286. choices=[
  287. ("", "Select a header size"),
  288. ("h2", "H2"),
  289. ("h3", "H3"),
  290. ("h4", "H4"),
  291. ],
  292. required=False,
  293. ),
  294. ),
  295. )
  296. ),
  297. ),
  298. (
  299. "paragraph_block",
  300. wagtail.blocks.RichTextBlock(
  301. icon="pilcrow",
  302. template="blocks/paragraph_block.html",
  303. ),
  304. ),
  305. (
  306. "image_block",
  307. wagtail.blocks.StructBlock(
  308. (
  309. (
  310. "image",
  311. wagtail.images.blocks.ImageChooserBlock(
  312. required=True
  313. ),
  314. ),
  315. (
  316. "caption",
  317. wagtail.blocks.CharBlock(required=False),
  318. ),
  319. (
  320. "attribution",
  321. wagtail.blocks.CharBlock(required=False),
  322. ),
  323. )
  324. ),
  325. ),
  326. (
  327. "block_quote",
  328. wagtail.blocks.StructBlock(
  329. (
  330. ("text", wagtail.blocks.TextBlock()),
  331. (
  332. "attribute_name",
  333. wagtail.blocks.CharBlock(
  334. blank=True,
  335. label="e.g. Guy Picciotto",
  336. required=False,
  337. ),
  338. ),
  339. )
  340. ),
  341. ),
  342. (
  343. "embed_block",
  344. wagtail.embeds.blocks.EmbedBlock(
  345. help_text="Insert an embed URL e.g https://www.youtube.com/watch?v=SGJFWirQ3ks",
  346. icon="media",
  347. template="blocks/embed_block.html",
  348. ),
  349. ),
  350. ),
  351. blank=True,
  352. verbose_name="Page body",
  353. ),
  354. ),
  355. (
  356. "collection",
  357. models.ForeignKey(
  358. blank=True,
  359. help_text="Select the image collection for this gallery.",
  360. null=True,
  361. on_delete=django.db.models.deletion.SET_NULL,
  362. to="wagtailcore.Collection",
  363. ),
  364. ),
  365. (
  366. "image",
  367. models.ForeignKey(
  368. blank=True,
  369. help_text="Landscape mode only; horizontal width between 1000px and 3000px.",
  370. null=True,
  371. on_delete=django.db.models.deletion.SET_NULL,
  372. related_name="+",
  373. to="wagtailimages.Image",
  374. ),
  375. ),
  376. ],
  377. options={
  378. "abstract": False,
  379. },
  380. bases=("wagtailcore.page", models.Model),
  381. ),
  382. migrations.CreateModel(
  383. name="HomePage",
  384. fields=[
  385. (
  386. "page_ptr",
  387. models.OneToOneField(
  388. auto_created=True,
  389. on_delete=django.db.models.deletion.CASCADE,
  390. parent_link=True,
  391. primary_key=True,
  392. serialize=False,
  393. to="wagtailcore.Page",
  394. ),
  395. ),
  396. (
  397. "hero_text",
  398. models.CharField(
  399. help_text="Write an introduction for the bakery", max_length=255
  400. ),
  401. ),
  402. (
  403. "hero_cta",
  404. models.CharField(
  405. help_text="Text to display on Call to Action",
  406. max_length=255,
  407. verbose_name="Hero CTA",
  408. ),
  409. ),
  410. (
  411. "body",
  412. wagtail.fields.StreamField(
  413. (
  414. (
  415. "heading_block",
  416. wagtail.blocks.StructBlock(
  417. (
  418. (
  419. "heading_text",
  420. wagtail.blocks.CharBlock(
  421. classname="title", required=True
  422. ),
  423. ),
  424. (
  425. "size",
  426. wagtail.blocks.ChoiceBlock(
  427. blank=True,
  428. choices=[
  429. ("", "Select a header size"),
  430. ("h2", "H2"),
  431. ("h3", "H3"),
  432. ("h4", "H4"),
  433. ],
  434. required=False,
  435. ),
  436. ),
  437. )
  438. ),
  439. ),
  440. (
  441. "paragraph_block",
  442. wagtail.blocks.RichTextBlock(
  443. icon="pilcrow",
  444. template="blocks/paragraph_block.html",
  445. ),
  446. ),
  447. (
  448. "image_block",
  449. wagtail.blocks.StructBlock(
  450. (
  451. (
  452. "image",
  453. wagtail.images.blocks.ImageChooserBlock(
  454. required=True
  455. ),
  456. ),
  457. (
  458. "caption",
  459. wagtail.blocks.CharBlock(required=False),
  460. ),
  461. (
  462. "attribution",
  463. wagtail.blocks.CharBlock(required=False),
  464. ),
  465. )
  466. ),
  467. ),
  468. (
  469. "block_quote",
  470. wagtail.blocks.StructBlock(
  471. (
  472. ("text", wagtail.blocks.TextBlock()),
  473. (
  474. "attribute_name",
  475. wagtail.blocks.CharBlock(
  476. blank=True,
  477. label="e.g. Guy Picciotto",
  478. required=False,
  479. ),
  480. ),
  481. )
  482. ),
  483. ),
  484. (
  485. "embed_block",
  486. wagtail.embeds.blocks.EmbedBlock(
  487. help_text="Insert an embed URL e.g https://www.youtube.com/watch?v=SGJFWirQ3ks",
  488. icon="media",
  489. template="blocks/embed_block.html",
  490. ),
  491. ),
  492. ),
  493. blank=True,
  494. verbose_name="Home content block",
  495. ),
  496. ),
  497. (
  498. "promo_title",
  499. models.CharField(
  500. blank=True,
  501. help_text="Title to display above the promo copy",
  502. max_length=255,
  503. null=True,
  504. ),
  505. ),
  506. (
  507. "promo_text",
  508. wagtail.fields.RichTextField(
  509. blank=True, help_text="Write some promotional copy", null=True
  510. ),
  511. ),
  512. (
  513. "featured_section_1_title",
  514. models.CharField(
  515. blank=True,
  516. help_text="Title to display above the promo copy",
  517. max_length=255,
  518. null=True,
  519. ),
  520. ),
  521. (
  522. "featured_section_2_title",
  523. models.CharField(
  524. blank=True,
  525. help_text="Title to display above the promo copy",
  526. max_length=255,
  527. null=True,
  528. ),
  529. ),
  530. (
  531. "featured_section_3_title",
  532. models.CharField(
  533. blank=True,
  534. help_text="Title to display above the promo copy",
  535. max_length=255,
  536. null=True,
  537. ),
  538. ),
  539. ],
  540. options={
  541. "abstract": False,
  542. },
  543. bases=("wagtailcore.page",),
  544. ),
  545. migrations.CreateModel(
  546. name="People",
  547. fields=[
  548. (
  549. "id",
  550. models.AutoField(
  551. auto_created=True,
  552. primary_key=True,
  553. serialize=False,
  554. verbose_name="ID",
  555. ),
  556. ),
  557. (
  558. "first_name",
  559. models.CharField(max_length=254, verbose_name="First name"),
  560. ),
  561. (
  562. "last_name",
  563. models.CharField(max_length=254, verbose_name="Last name"),
  564. ),
  565. (
  566. "job_title",
  567. models.CharField(max_length=254, verbose_name="Job title"),
  568. ),
  569. (
  570. "image",
  571. models.ForeignKey(
  572. blank=True,
  573. null=True,
  574. on_delete=django.db.models.deletion.SET_NULL,
  575. related_name="+",
  576. to="wagtailimages.Image",
  577. ),
  578. ),
  579. ],
  580. options={
  581. "verbose_name_plural": "People",
  582. "verbose_name": "Person",
  583. },
  584. ),
  585. migrations.CreateModel(
  586. name="StandardPage",
  587. fields=[
  588. (
  589. "page_ptr",
  590. models.OneToOneField(
  591. auto_created=True,
  592. on_delete=django.db.models.deletion.CASCADE,
  593. parent_link=True,
  594. primary_key=True,
  595. serialize=False,
  596. to="wagtailcore.Page",
  597. ),
  598. ),
  599. (
  600. "introduction",
  601. models.TextField(blank=True, help_text="Text to describe the page"),
  602. ),
  603. (
  604. "body",
  605. wagtail.fields.StreamField(
  606. (
  607. (
  608. "heading_block",
  609. wagtail.blocks.StructBlock(
  610. (
  611. (
  612. "heading_text",
  613. wagtail.blocks.CharBlock(
  614. classname="title", required=True
  615. ),
  616. ),
  617. (
  618. "size",
  619. wagtail.blocks.ChoiceBlock(
  620. blank=True,
  621. choices=[
  622. ("", "Select a header size"),
  623. ("h2", "H2"),
  624. ("h3", "H3"),
  625. ("h4", "H4"),
  626. ],
  627. required=False,
  628. ),
  629. ),
  630. )
  631. ),
  632. ),
  633. (
  634. "paragraph_block",
  635. wagtail.blocks.RichTextBlock(
  636. icon="pilcrow",
  637. template="blocks/paragraph_block.html",
  638. ),
  639. ),
  640. (
  641. "image_block",
  642. wagtail.blocks.StructBlock(
  643. (
  644. (
  645. "image",
  646. wagtail.images.blocks.ImageChooserBlock(
  647. required=True
  648. ),
  649. ),
  650. (
  651. "caption",
  652. wagtail.blocks.CharBlock(required=False),
  653. ),
  654. (
  655. "attribution",
  656. wagtail.blocks.CharBlock(required=False),
  657. ),
  658. )
  659. ),
  660. ),
  661. (
  662. "block_quote",
  663. wagtail.blocks.StructBlock(
  664. (
  665. ("text", wagtail.blocks.TextBlock()),
  666. (
  667. "attribute_name",
  668. wagtail.blocks.CharBlock(
  669. blank=True,
  670. label="e.g. Guy Picciotto",
  671. required=False,
  672. ),
  673. ),
  674. )
  675. ),
  676. ),
  677. (
  678. "embed_block",
  679. wagtail.embeds.blocks.EmbedBlock(
  680. help_text="Insert an embed URL e.g https://www.youtube.com/watch?v=SGJFWirQ3ks",
  681. icon="media",
  682. template="blocks/embed_block.html",
  683. ),
  684. ),
  685. ),
  686. blank=True,
  687. verbose_name="Page body",
  688. ),
  689. ),
  690. (
  691. "image",
  692. models.ForeignKey(
  693. blank=True,
  694. help_text="Landscape mode only; horizontal width between 1000px and 3000px.",
  695. null=True,
  696. on_delete=django.db.models.deletion.SET_NULL,
  697. related_name="+",
  698. to="wagtailimages.Image",
  699. ),
  700. ),
  701. ],
  702. options={
  703. "abstract": False,
  704. },
  705. bases=("wagtailcore.page", models.Model),
  706. ),
  707. migrations.AddField(
  708. model_name="homepage",
  709. name="featured_section_1",
  710. field=models.ForeignKey(
  711. blank=True,
  712. help_text="First featured section for the homepage. Will display up to three child items.",
  713. null=True,
  714. on_delete=django.db.models.deletion.SET_NULL,
  715. related_name="+",
  716. to="wagtailcore.Page",
  717. verbose_name="Featured section 1",
  718. ),
  719. ),
  720. migrations.AddField(
  721. model_name="homepage",
  722. name="featured_section_2",
  723. field=models.ForeignKey(
  724. blank=True,
  725. help_text="Second featured section for the homepage. Will display up to three child items.",
  726. null=True,
  727. on_delete=django.db.models.deletion.SET_NULL,
  728. related_name="+",
  729. to="wagtailcore.Page",
  730. verbose_name="Featured section 2",
  731. ),
  732. ),
  733. migrations.AddField(
  734. model_name="homepage",
  735. name="featured_section_3",
  736. field=models.ForeignKey(
  737. blank=True,
  738. help_text="Third featured section for the homepage. Will display up to six child items.",
  739. null=True,
  740. on_delete=django.db.models.deletion.SET_NULL,
  741. related_name="+",
  742. to="wagtailcore.Page",
  743. verbose_name="Featured section 3",
  744. ),
  745. ),
  746. migrations.AddField(
  747. model_name="homepage",
  748. name="hero_cta_link",
  749. field=models.ForeignKey(
  750. blank=True,
  751. help_text="Choose a page to link to for the Call to Action",
  752. null=True,
  753. on_delete=django.db.models.deletion.SET_NULL,
  754. related_name="+",
  755. to="wagtailcore.Page",
  756. verbose_name="Hero CTA link",
  757. ),
  758. ),
  759. migrations.AddField(
  760. model_name="homepage",
  761. name="image",
  762. field=models.ForeignKey(
  763. blank=True,
  764. help_text="Homepage image",
  765. null=True,
  766. on_delete=django.db.models.deletion.SET_NULL,
  767. related_name="+",
  768. to="wagtailimages.Image",
  769. ),
  770. ),
  771. migrations.AddField(
  772. model_name="homepage",
  773. name="promo_image",
  774. field=models.ForeignKey(
  775. blank=True,
  776. help_text="Promo image",
  777. null=True,
  778. on_delete=django.db.models.deletion.SET_NULL,
  779. related_name="+",
  780. to="wagtailimages.Image",
  781. ),
  782. ),
  783. migrations.AddField(
  784. model_name="formfield",
  785. name="page",
  786. field=modelcluster.fields.ParentalKey(
  787. on_delete=django.db.models.deletion.CASCADE,
  788. related_name="form_fields",
  789. to="base.FormPage",
  790. ),
  791. ),
  792. ]