How to make new Python example

We use as an example FittingWithMasks.py

  • Drupal/Content/Add Content/Create Python Example
  • Edit title "Fitting with masks"
  • Edit Body in Full HTML
  • Upload intensity image FittingWithMasks.png
  • Edit Python Script

For some reason, when you save page for the first time, part of script is not appearing on the screen. Just go to edit and save again. Whole script will be in place.
if you need to highlight the line, use highlight:[70,118];

  • Add FitWithMasks.py to the Files
  • Tags -> Fitting (this will trigger appearance of the example in the table generated by Drupal's View machinery)
  • Book Outline: Book -> Documentation, Parent Item -> Fitting
  • Url path settings -> documentation/python_examples/fitting_with_masks
  • Publishing options -> remove temporarily "Published". When release is about to be ready, make example published.

How to replace image.

Situation: we have a tutorial with myimage.png image inserted somewhere. We want to update an image, keeping the same file name.

  • Start to edit tutorial, go to media library from CK editor, remove old image.
  • Go to media, upload new image, insert image
  • At this point you will see still an old image. This is because of caching.
  • Got to Configuration/Media/Image styles, push "flush all styles"
  • Return back to your tutorial, an image will be updated.