User talk:Martyav/Apps/Tutorial

About this board

Jeropbrenda (talkcontribs)

Hey Martyav, I've been using your tutorial to learn how to create a web-app and it's really helpful.

I'm facing some issues though:

  1. In User:Martyav/Apps/Tutorial#Refactoring app.py, specifically in the code sample below "Update fetch_potd(day) to include a call to this function". The image is not shown when I use variables "image_info" and potd_page" as they are, but it works when I interchange the assignments i.e use the assignment for "potd_page" in "image_info" and vice versa.
  2. Also in the same section, specifically in the sample code below "Second, to get all the data we need, we'll be making several Action API calls, so having a single function named action_api() doesn't make sense anymore. Delete it and define a new function, fetch_potd(day)". You initialized variable "results" as a list of dicts, I think? (I'm new to python). However, the image is not shown when I use the variable "results" as it is. But when I change it to a dict, i.e remove the square brackets, it works.

I know you have tested the code samples and they worked so it's likely that I'm doing something wrong. I just don't know what it is.

Martyav (talkcontribs)

It's currently a work in progress (second draft), so there might be errors within the tutorial as-is. In particular, I had to restructure the module (and thus, the tutorial) to use Jinja instead of Javascript, so I've been editing earlier sections of the tutorial based on what the code in the finished app looks like. Sometimes I make mistakes. I'll be speaking with my mentor later today about further edits and improvements. Thanks for catching those errors.

Reply to "Need help"
Martyav (talkcontribs)

This is a draft intended as a tutorial for a future web app, aimed at beginner programmers seeking to use the action API for a project.

Martyav (talkcontribs)
Reply to "Purpose"
There are no older topics