Page MenuHomePhabricator

Find and fix inaccuracies in Toolforge Django tutorial
Open, LowPublic

Description

https://wikitech.wikimedia.org/wiki/Help:Toolforge/My_first_Django_OAuth_tool contains inaccurate information.

  • Check to see if the information and workarounds outlined in this taks are still appropriate: https://phabricator.wikimedia.org/T198508
  • If the changes are still appropriate, integrate into the documentation
  • Review for further inaccuracies and update.

    This would make a good document for a hackathon sprint or possibly first bug depending on knowledge level.

Event Timeline

srodlund renamed this task from Find and fix innacuracies in https://wikitech.wikimedia.org/wiki/Help:Toolforge/My_first_Django_OAuth_tool to Find and fix inaccuracies in https://wikitech.wikimedia.org/wiki/Help:Toolforge/My_first_Django_OAuth_tool.Feb 19 2020, 10:40 PM

I updated one bit slightly. Shouldn't change much about this task.

TBurmeister renamed this task from Find and fix inaccuracies in https://wikitech.wikimedia.org/wiki/Help:Toolforge/My_first_Django_OAuth_tool to Find and fix inaccuracies in Toolforge Django tutorial.Feb 20 2024, 5:13 PM

Using the new Build Service is now the recommended method for deploying Django applications on Toolforge. I think a better idea would be to:

Hello! @srodlund can i be assigned this? Im new to more organized large scale open-source projects and would like to begin my contribution to them with wikimedia.

Dzahn subscribed.

Hey, it looks like @srodlund's account is inactive. I'm not related to this much but just being bold and assigned it to you. Thanks for volunteering!

Hey, it looks like @srodlund's account is inactive. I'm not related to this much but just being bold and assigned it to you. Thanks for volunteering!

thank you!

I saw your comments on other tickets. I would say in general you can apply Be bold here as well and you can just upload suggested changes or make comments. Whether it's assigned to you is kind of seconday and can always be adjusted. Cheers!

@Chickenleaf: Hi! This task has been assigned to you a while ago. Could you maybe share an update? Do you still plan to work on this task, or do you need any help?

@Chickenleaf: I am resetting the assignee of this task because there has not been progress lately (please correct me if I am wrong!). Resetting the assignee avoids the impression that somebody is already working on this task. It also allows others to potentially work towards fixing this task. Thanks for your understanding!

VRATEJDWIVEDI subscribed.

Hi, I’d like to work on this task as a newcomer. I’ll go through the tutorial, check for inaccuracies, and update the documentation.

Hi! I’m a beginner Python contributor and I’d like to work on this task.
Could you please guide me on which parts of the tutorial need verification first?

Hey, my name is Manoj. Notice the task is already assigned. However, I would still like to help the team looking at the Toolforge Docker tutorial for the Django app using OAuth. Additionally, I will look at the documentation for improvements.

Hi everyone, I’ve gone through the full “My first Django OAuth tool” page carefully and according to my perspective

Overall, the tutorial is very detailed and helpful, but while reading it step by step I noticed a few areas that could be confusing for newcomers

  1. It’s not always clear whether this tutorial reflects the currently recommended Toolforge workflow or an older/legacy deployment approach, especially compared to newer Build Service–based docs.
  1. SQLite is used throughout the early parts of the guide without an upfront note that it’s mainly intended for demos and not ideal for most real Toolforge tools.
  1. Some sections mix local-only setup steps (uWSGI, systemd, nginx) with Toolforge deployment steps, which may be hard for beginners to distinguish.
  1. A few Django examples (such as URL patterns and project structure) appear slightly outdated and might confuse people following modern Django tutorials. like this one path('^admin/', admin.site.urls) is outdated and it should be replace by path('admin/', admin.site.urls)
  1. OAuth-related packages and setup steps work, but could benefit from a bit more clarification about what is required vs optional for new users.

I’d like to start by making small, incremental documentation improvements (clarifying notes, warnings, and minor fixes) to improve readability and reduce confusion for beginners, before attempting any larger restructuring. Please let me know if this approach sounds good.

Hi, I’m a newcomer and GSoC aspirant. I see this task is assigned—are there still parts where I can help (for example reviewing docs or checking for additional inaccuracies)?

Hi, I’ve made initial small fixes on the tutorial page:
• Pinned Django version to a safe range
• Fixed outdated admin URL example
• Corrected a small typo

Please let me know if you’d like me to continue with further clarifications or improvements.

Added a note clarifying that SQLite is mainly intended for demos/small tools and that production tools should consider MariaDB.

Added a note clarifying that the “Use UWSGI locally” section is for local development only, and that Toolforge deployment uses the Kubernetes-based webservice backend.

hi @Dzahn I’ve made several small but important improvements to the Toolforge Django OAuth tutorial (clarified SQLite usage, fixed outdated admin URL example, pinned Django version range, and improved structure/notes).
Please let me know if you’d like me to continue with additional documentation cleanups.

Hi @Manoj0112 thank you for the changes! Even though I assigned this I just acted based on the comments here and can't really answer the question specific to this tutorial. In general though I can encourage you to be bold and if in doubt just do it.

@Manoj0112 thank you for your improvements! As @Dzahn said, if you find more things that can be improved in the docs, be bold and change them!

The Django tutorial is quite old and would benefit from some more updates. The linked task T198508: Updating documentation to mention errors due to Django + MySQL + utf8mb4 index limitations/workarounds on ToolsDB has a few things to check, and I also noticed that the instructions for creating a Python virtual environment are out of date, see Python#Virtual_Environments_and_Packages for the current procedure, which requires running a "webservice shell".

As @Slst2020 suggested above, we should also encourage people to use the newer buildpack django tool tutorial, and add a section about Oauth to that tutorial.

I would recommend creating a test tool in Toolforge to verify that the instructions in both tutorials are working. If you don't have access to Toolforge, you can get access and request membership.