Good afteoon.
there is a form of user profile. When displaying on the screen, it must be filled with the data of the current user. How can this be done?
class profile (models.model): User = models.onetoonefield (user) img = models.imagefield (upload_to = true span>, Verbose_name = '"avatar' ) Phone = Models.integerfield (max_length = 10 , verbose_name = ) class propiLEFORM (forms.FORM): first_name = forms.charfield (Label = u'ym ', max_length = 30 , required = true ) last_name = forms.charfield (label = u'familia ', max_length = 30 , required = true ) password = forms.charfield (label = u'parol ', widget = forms.passwordinput, min_length = 4 , recuired = true ) email = Forms.mailfield (Label = u'e-mail ', required = true ) Phone = Forms.Charfield (Label = U'"" " Phone ', max_LENGTH = 10 , required = true ) Img = forms.imagefield (label = u'vash authar or autar Logo ', required = false ) @render_to ( 'prote.html' ) def edit_profile ( request ): ): ) Form = loginform () {{form_profile.as_p}} I want to fill the form automatically (with my hands in the template not to paint anything). Thank you!
question@mail.ru
·