-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stop using MethodViews in flask apps #1102
Comments
@bhearsum I have some clarifying questions for this issue.
balrog/src/auslib/web/admin/emergency_shutoff.py Lines 48 to 50 in ab3882c
Instead we would have the get function that is in the ScheduledChangeView: balrog/src/auslib/web/admin/views/scheduled_changes.py Lines 61 to 73 in ab3882c
|
To answer the second question first -- any code that is shared by multiple views would need to be refactored to be a plain function (not a class method), which the new view functions could then call. This is actually what is already happening in
(This code is connected to an endpoint name through balrog/src/auslib/web/admin/swagger/api.yml Line 1990 in ab3882c
|
@bhearsum Thank you for the detailed explanation on my second question. After going through the linked files again, I now understand how plain functions would work as the base in place of the base views. |
Plain functions are just fine.
(Imported from https://bugzilla.mozilla.org/show_bug.cgi?id=1508137, filed by @allan-silva)
The text was updated successfully, but these errors were encountered: