Let's get started...

eeintech   Wagtail   May 5, 2020  (Updated on May 6, 2020)


python wagtail

Let's compare two popular Wagtail code blocks:

# This is python code
import random

first = bool(random.getrandbits(1))

print('Welcome', end='')
if first:
  pass
else:
  print(' back')
# This is python code
import random

first = bool(random.getrandbits(1))

print('Welcome', end='')
if first:
  pass
else:
  print(' back')

My preference goes to wagtailcodeblock, it's easier to copy-paste the code (using the top-right button) and it shows the line numbers.