How do I get better in function based views.

I have been learning Django for months but I got to understand CRUD functions in December 2021. I realized I have a long way to go and I haven’t been learning it actively because I’m in school. My question; How can I improve my skills in writing the function based views? Should i read the documentation or continue to watch tutorials. But remember i have built projects when when i understood CRUD functions. How can i learn to write function based views for other tasks or problems? How did you learn to write other view functions which are not CRUD?
Thank you,

Neither. The best way to learn and improve your skills is by writing more views.

A view function accepts a request and returns a response. There’s nothing special or fancy about how that’s done. Assuming use of the standard Django views, probably 99+% of all your views are going to end by returning an HttpResponse. (I’m including the idea of returning a redirect in this, as the redirect simply sends you to another page to return an HttpResponse.)

1 Like

That probably depends a bit of what documentation you have read so far. Generally, the Django documentation is very good and I’d recommend studying it. Regarding function-based views, I found especially Working with forms | Django documentation | Django very helpful.

Besides that, I think that unfortunately function based views are less prominent in the docs than they deserve. Thus, I also very much recommend Django Views — The Right Way

1 Like