python - getting the full UserProfile profile -


मैं इसे डीजेंगो के माध्यम से कर रहा हूं

  $ python manage.py shell से django.contrib .auth.models आयात उपयोगकर्ता a = उपयोगकर्ता (उपयोगकर्ता नाम = 'ज़ोरो') a.get_profile ()।?   

मैं get_profile के बाद क्या करता हूं। a.get_profile ()। स्थान की तरह एक ही चीज़ में टाइप करने के बजाय पूर्ण प्रोफ़ाइल प्राप्त करने के लिए केवल स्थान प्राप्त करें

a.get_profile () पूर्ण प्रोफ़ाइल है (इसकी एक उदाहरण वस्तु आपके उपयोगकर्ता प्रोफाइल मॉडल का)। तो आप इसे किसी चर में सहेज सकते हैं और इसे इस्तेमाल कर सकते हैं।

यद्यपि आप अजगर के रूप में सब कुछ प्राप्त करना चाहते हैं, तो आप a.get_profile () .__ dict __ कोशिश कर सकते हैं। / P>

Comments

Popular posts from this blog

php - Creating canonical URLs with custom route-classes -

Mysql Local server hardware -

mysql - Formatting problem with PHP DateTime Difference when used as part of an equation -