How can i Edit/Change the value of a model field from views.py

前端 未结 1 432
醉梦人生
醉梦人生 2021-01-26 19:36

Good-day everyone. I want to know how i can change the value of a model-field through the number of items in a defined sessions list

I have already made a profile model

相关标签:
1条回答
  • 2021-01-26 20:16

    Try this:

    UserProfile.objects.filter(user=request.user).update(level='R')
    
    0 讨论(0)
提交回复
热议问题