DjangoGirls / tutorial

This is a tutorial we are using for Django Girls workshops
http://tutorial.djangogirls.org/
Other
1.53k stars 1.86k forks source link

Upgrade tutorial to Django 3.2 #1757

Closed adamantike closed 2 years ago

adamantike commented 2 years ago

This diff includes the needed changes for the tutorial to be available for Django 3.2 in the English version.

Most of these changes were already available in the django-3.1 branch, and the #1678 pull request. Big props to @nikhiljohn10 for the huge initial effort!

Closes #1677

adamantike commented 2 years ago

Good catch! Fixed the pending link, and double-checked again. Feel free to review one more time.

das-g commented 2 years ago

Has anyone gone through and tested the whole tutorial with these changes? (I didn't have time to do so, yet, and might not get to it anytime soon.)

If not, shall we merge this anyway already, and just wait whether readers report any discrepancies? I'd much prefer if this small but major change was properly tested before releasing, but I also don't want to drag it out too long.

ekohl commented 2 years ago

I'm in the same boat @das-g so I'm also leaning to merging.

adamantike commented 2 years ago

To try to automate these kinds of checks in the short term, considering there's no much time available, would a simple Dockerfile that runs these commands and apply incremental diff files to the Django project be useful?

At least, that will allow building/running the container with a specific Python version, check the stdout to compare with the provided ones in the tutorial, and review that the Django server correctly runs at the end of the tutorial. It would involve duplicating most of the code and the steps provided in the tutorial, though.

das-g commented 2 years ago

To try to automate these kinds of checks in the short term, considering there's no much time available, would a simple Dockerfile that runs these commands and apply incremental diff files to the Django project be useful?

At least, that will allow building/running the container with a specific Python version, check the stdout to compare with the provided ones in the tutorial, and review that the Django server correctly runs at the end of the tutorial. It would involve duplicating most of the code and the steps provided in the tutorial, though.

Setting that up would probably require about as much time as going through the tutorial manually. So it'd only pay off, it can be re-used for checking further changes. That would mean that the duplicated code would have to be kept around and to be kept in sync with the code in the tutorial, which already sounds like quite an anti-pattern.

If we wanted something like that, there should be a single source of truth from which both the rendered tutorial as well as the code to be tested can be derived completely automatically. That'd probably require using something like Python doctest or similar.

While that be pretty cool, it's quite different from our current setup, and I don't know whether the hassle to migrate to a different workflow (that we'd have to define / figure out first) would be worth the hassle.

ekohl commented 2 years ago

Given there's been no response in 2 weeks, I'm leaning to merging. Right now @das-g has requested changes, which I think are addressed but that's why I won't push the big green button now.

das-g commented 2 years ago

Sorry I was (and will be in the near future) busy with other stuff.

:shipit: Let's merge and see if anyone complains about something being broken. :see_no_evil:

adamantike commented 2 years ago

Thank you for coming back to it!

If any issue is reported regarding the upgrade, I'm available to work on it.