equal
deleted
inserted
replaced
53 #: list of model fields which will *not* be gathered by the form |
53 #: list of model fields which will *not* be gathered by the form |
54 exclude = ['user'] |
54 exclude = ['user'] |
55 |
55 |
56 |
56 |
57 @decorators.view |
57 @decorators.view |
58 def edit(request, page_name=None, program=None, link_name=None, |
58 def edit(request, page_name=None, program=None, link_id=None, |
59 template='soc/person/profile/edit.html'): |
59 template='soc/person/profile/edit.html'): |
60 """View for a Person to modify the properties of a Person Model. |
60 """View for a Person to modify the properties of a Person Model. |
61 |
61 |
62 Args: |
62 Args: |
63 request: the standard django request object. |
63 request: the standard django request object. |
75 # TODO(tlarsen) |
75 # TODO(tlarsen) |
76 # if program: |
76 # if program: |
77 # query for the human-readable program name and pass that to the form |
77 # query for the human-readable program name and pass that to the form |
78 |
78 |
79 # TODO(tlarsen) |
79 # TODO(tlarsen) |
80 # if link_name: |
80 # if link_id: |
81 # query for a site-wide user profile for a friendly display name |
81 # query for a site-wide user profile for a friendly display name |
82 # to use in the greeting |
82 # to use in the greeting |
83 # else: |
83 # else: |
84 # use user to query for a site-wide user profile for a friendly |
84 # use user to query for a site-wide user profile for a friendly |
85 # display name to use in the greeting |
85 # display name to use in the greeting |
91 if not form.errors: |
91 if not form.errors: |
92 return http.HttpResponse('This would update the model') |
92 return http.HttpResponse('This would update the model') |
93 |
93 |
94 return shortcuts.render_to_response( |
94 return shortcuts.render_to_response( |
95 template, dictionary={'template': template, 'form': form, 'user': user, |
95 template, dictionary={'template': template, 'form': form, 'user': user, |
96 'program': program, 'link_name': link_name}) |
96 'program': program, 'link_id': link_id}) |