Skip to content
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

Clean up generic views by using as_view() directly as applicable #164

Open
Tracked by #115
kiancm opened this issue Feb 9, 2021 · 0 comments
Open
Tracked by #115

Clean up generic views by using as_view() directly as applicable #164

kiancm opened this issue Feb 9, 2021 · 0 comments

Comments

@kiancm
Copy link
Contributor

kiancm commented Feb 9, 2021

Instead of :

class ThermoDetail(DetailView):
       ...

use

path("thermo/<int:pk>/", DetailView.as_view(model=Thermo, context_object_name="thermo"), name="thermo-detail")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant