1

I'm making a site in django which has profiles for users and companies with text fields, photos, choices, etc., and I want them to look the same while viewing or editing them (in case of the owner of the profile). Basically the user must click somewhere and all the information becomes editable, without having to go into other "profile editing" page.

The only way of doing this that I can think of is by making to different pages, one for only "viewing" the data, and other for editing it, and try to make them look the same anyhow..

I wonder, if there is an elegant and simple way of integrating this two functionalities in django?

Thanks.

4

1 に答える 1

0

You're talking about manipulating the DOM without page loads. You're going to use AJAX to retrieve your form. I would recommend using Tastypie to create REST endpoints. Then you'll need to do AJAX calls to get your form. I would recommend using jQuery.

If you would prefer something simplier. You could always user a hidden form field and then manipulate the DOM with jQuery.

于 2012-10-09T04:42:38.183 に答える