Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

myarts app | form_valid implementation suggestion #22

Open
LiorA1 opened this issue Apr 20, 2021 · 1 comment
Open

myarts app | form_valid implementation suggestion #22

LiorA1 opened this issue Apr 20, 2021 · 1 comment

Comments

@LiorA1
Copy link

LiorA1 commented Apr 20, 2021

In the myarts/views.py module we can implement 'form_valid', in other manner, without to do a double 'save()' calls.

Implementation suggestion : https://github.com/LiorA1/Django/blob/main/dj4e-samples/myarts/owner.py#L23

@csev
Copy link
Owner

csev commented Apr 20, 2021

Thanks - this is a lot prettier and better from an OO perspective. I will make this change when I can update the course materials.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants