trallard / Shef_CodeFirst_Python

Course materials for the Advanced Python course in Sheffield πŸ€–πŸ’ͺπŸΌπŸ‘©πŸ»β€πŸ’»
http://bitsandchips.me/Shef_CodeFirst_Python/
5 stars 28 forks source link

Flask session plan #36

Closed darrenvong closed 6 years ago

darrenvong commented 6 years ago

Here's a rough structure of how I'm thinking the session and a half should go:

Beginning of Session 3 and 4

Session 3

Before we go into the technical details on how to use Flask, cover:

Now, the technical part:

Ignore the part in the curriculum note which says that we need to control-c and restart our server. It's wrong. With debug=True, Flask restarts the server automatically when it detects code changes.

Session 4

Picking up from where we left off from the previous session, before we dive into the technical details:

Now, the technical details:

darrenvong commented 6 years ago

Just finished writing up a rough plan for the next two sessions... It's ended up a lot longer than I expected :joy:

Tagged you in as well @paulienuh since you're the pro of the Beginner's course. Do all of these make sense/will this structure transition well for those who have done the course?

darrenvong commented 6 years ago

Also @cgmcintyr when you have recovered from HackNotts and have a moment, take a look! :)

trallard commented 6 years ago

Ignore the part in the curriculum note which says that we need to control-c and restart our server. It's wrong. With debug=True, Flask restarts the server automatically when it detects code changes.

It might be worth pointing out that this is the case and that the debug=True enables live update of the app

Also

Show good practices like breaking down common HTML parts across all pages (headers/footers) of a typical website into separate template files?

I think this would be the best approach given the fact that most of them have not done the beginners course... IMO only, you're the boss here @darrenvong

darrenvong commented 6 years ago

Thanks for the feedback @trallard! I agree that the breaking down into parts pattern is probably the better route to go - the idea that this will then lead to re-usable bits seem more intuitive!

The base template then inherit style might be a bit confusing if not covered well, considering we won't really be doing anything Object Oriented related...

pawlean commented 6 years ago

Just wanted to say that after seeing the slides, I really liked how you've laid this out @darrenvong! A huge improvement from last year's for sure - I'll be sitting in and working through it myself too!

darrenvong commented 6 years ago

Hmm just gonna reopen this before session 4 is done so I can quickly find it :blush:

darrenvong commented 6 years ago

Still need to cover Sending data from HTML template back to Python part, otherwise we should be good to move forward...

trallard commented 6 years ago

So what is actually missing?

Did you cover the other way around from Python to the HTML template?

darrenvong commented 6 years ago

@trallard Yes, that was covered in session 3. The main things we haven't covered yet include:

It really should have been done and dusted in the last session, but sadly it went quite far off plan... 😭

trallard commented 6 years ago

Is all of the material for the missing bits in the repo now?

darrenvong commented 6 years ago

All the bits I've prepared are there, although I think @cgmcintyr has some additional slides when he quickly gave an overview on HTTP requests towards the end of the last session.

I've also slipped in forms in this week's challenge (tough to set one when we practically did nothing...), so if the girls engage with it then they should have an awareness of it by next session.