Skip to content

nm-examples/wagtail-response-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Wagtail -> Response Checker

Admin and frontend page response checker

Live testing scenario

Wagtail 3 has had some extensive changes over previous verions: Documentation

Mostly, if you miss renaming an import it can be seen quite quickly when running the site. But some other changes can be hard to spot. E.G.

class CustomHelpPanel(EditHandler):
  template = 'toolkits/custom_help_panel.html'

  def render(self):
    return mark_safe(render_to_string(self.template, {
      'self': self,
        'title': self.form.parent_page.title
    }))

Won't show up as an error until you try to edit the page it's used on.

If you have one page model that all pages use/inherit from where the above is used like so:

content_panels = [CustomHelpPanel()] + Page.content_panels + [
    ...
]

I dare say you will spot it quickly. But you might just have 1000's of pages to potentially check across 10's of different page models.

Check Responses Command

check_responses.py can be dropped into any app folder as per the django management command folder stucture and run with ./manage.py check_responses

Your site will need some content, preferably close to the same content as your live or staging site and will need to be running: python manage.py runserver

Don't commit the check_responses file and end up deploying it! (suggestion)

It's really only useful during development and testing.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages