Wagtail Photography 1

So this series of posts will detail the creation of a photography portfolio website using Wagtail. They already have great documentation but hopefully this series will guide you through a complete website created using it. I can’t stress just how straightforward Wagtail and Django are for web development.

Before we get to the coding part, this post will first look at the client’s design requirements. They had been using a website creator that rhymes with a certain chocolate brand and wanted something that loads slightly faster as well as wanting it to be more customisable (maybe not right away, but down the road). Furthermore, parts of their website content would get blocked in certain countries of the world that have a loooooooong iptables configuration. At the same time, they didn’t want WordPress because for each additional functionality, there were 20 plugins for it. They wanted something that was easy to use. I suggested Wagtail and gave them some examples of sites using Wagtail and they liked it. I also showed them the admin interface and it reminded them of WordPress but only with the functionality they wanted. So Wagtail it was.

Their requirements were:

  • homepage with a big image. Let’s call it HomePage.
  • category type of page that can have sub-pages (something like Projects -> sub-projects). Let’s call it ProjectsPage with SubProjectPages
  • individual pages (like a featured Project). Let’s call them FeaturedPage
  • contact page

On the homepage we would need:

  • header with menu links
  • footer with social links and footer image
  • big picture in the middle

On the ProjectsPage, we need:

  • a way to display the SubProjectPages
  • nothing else

On the SubProjectPages, we need:

  • editable title
  • text blocks to be put between sections of images
  • gallery of images formed from the various sections of images

On the FeaturedPage, we need:

  • editable title
  • gallery of images

On the ContectPage, we need:

  • editable text from the admin interface
  • a contact form that sends emails to the owner of the site
  • ability to see those emails in the admin interface as well

Other features were suggested and will be implemented later when required. So why not a static site? Basically because of the contact form. Yes can do it on Netlify, yes can use a different service for the Submit POST content but even with server-side rendering for Wagtail, the pages can be cached so it’s not a big problem. Plus Wagtail is fun and a server costing a few dollars a month is enough for the client’s project. Serving it through a global CDN would ensure it is accessible in all countries.

So this is the project description and its requirements. In the following post we will discuss creating the project and building the HomePage as well as which database we will use.