Hi,
     am trying to design my form template.
     i was able to create a form to add and edit entities in the
datastore using the     create object. in the template i use the
{{ form.as_table }} to render the form. my problem is manually specify
where to place the fields so i can design the page.

something like: {{ form.fieldname }} as used in django forms

code snippet:
views.py
from django.views.generic.create_update import create_object,
delete_object, update_object

def add_eatingplace(request):
    return create_object(request, form_class=EatingPlaceForm,
template_name="forms/eating_place.html",
        post_save_redirect = reverse('menuapp.views.own_eatingplace',
kwargs=dict(key='%(key)s')))

eating_place.html
<form action="" method="post" enctype="multipart/form-data">
  <table>
    {{ form.as_table }}
     <tr><td colspan="1">
      <input type="submit"
        value="{% if object %}Apply changes{% else %}Add{% endif %}" /
>
    </td></tr>
  </table>
</form>

all i want to do is remove the {{ form.as_table }} and use
{{ form.eatingplace_name }} but it doesn't work.


Thanks

--

You received this message because you are subscribed to the Google Groups 
"app-engine-patch" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/app-engine-patch?hl=en.


Reply via email to