Is it possible to get all the fields from a given model without writing list of all the fields in the view.py file when working with UpdateView in class-based views?
class UserProfileEditView(UpdateView):
model = UserProfile
fields = ['first_name', 'last_name', 'email', 'level', 'course', 'country', 'title', 'avatar', 'icon', 'instagram']
slug_field = 'username'
template_name = 'profile.html'
context_object_name = 'User'
What I mean is instead of writing all the fields in a list (e.g 'first_name', 'last_name'... etc.), can I use something to get all of the fields from given model.