Django Template में फॉर्म का स्वचालित भराव
📁 पायथन
नमस्ते।
एक उपयोगकर्ता प्रोफ़ाइल फॉर्म है। इसे स्क्रीन पर प्रदर्शित करते समय वर्तमान उपयोगकर्ता के डेटा से भरना आवश्यक है। यह कैसे किया जा सकता है?
class Profile(models.Model): user = models.OneToOneField(User) img = models.ImageField(upload_to='user_pic/', blank=True, verbose_name='अवतार') phone = models.IntegerField(max_length=10, verbose_name=u'संपर्क फ़ोन')class ProfileForm(forms.Form): first_name = forms.CharField(label=u'नाम', max_length=30, required=True) last_name = forms.CharField(label=u'उपनाम', max_length=30, required=True) password = forms.CharField(label=