0001_initial.py 32 KB

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