Russell, thanks for looking into this! See comments & code below. Tom
Russell Keith-Magee wrote: > > - Are you sure that the database has been synced to match the 'with > foreign key' version of the model? Drop the db and recreate to be > sure. Yes, I had done that. > - What does the development server log show? Obviously the initial GET > request is suceeding; is the POST request completing? Is the server > throwing an exception or other error? Here's an example. Both are completing successfully, but the database is not getting changed. [23/Oct/2006 21:31:40] "GET /invoices/edit/1/ HTTP/1.1" 200 1050 [23/Oct/2006 21:31:54] "POST /invoices/edit/1/ HTTP/1.1" 200 1050 > - What db backend and OS are you using? (This shoudn't matter, but just in > case) MySQL 5.0.18, SuSE Linux 10.1 AMD64 > - Can you provide the urls.py and template you are using so that we > can try to replicate the problem. ################################### # urls.py from django.conf.urls.defaults import * from models import Ticket info_dict = { 'queryset': Ticket.objects.all() } new_dict = { 'model': Ticket, 'post_save_redirect': "/invoices/", } urlpatterns = patterns('', (r'^$', 'django.views.generic.list_detail.object_list', info_dict), (r'^new/$', 'django.views.generic.create_update.create_object', new_dict ), (r'^edit/(?P<object_id>\d+)/$', 'django.views.generic.create_update.update_object', new_dict ), (r'^(?P<object_id>\d+)/$', 'django.views.generic.list_detail.object_detail', info_dict), ) ########################## <!-- base.html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <title>{% block title %}{% endblock %}</title> </head> <body> {% block content %}{% endblock %} </body> </html> ########################## <!-- ticket_list.html --> {% extends "invoices/base.html" %} {% block title %} Listing Invoices {% endblock %} {% block content %} Tickets {% for invoice in object_list %} <p>Case number: {{ invoice.case_number }} Ticket price:{{ invoice.dollar_amount }}</p> {% endfor %} {% endblock %} ########################## <!-- ticket_list --> {% extends "invoices/base.html" %} {% block content %} <form action="." method="POST" > <fieldset class="module aligned"> <legend>Ticket</legend> <label for="id_user">user:</label> {{ form.user }} {% if form.user.errors %} <div class='div_errors'> {{ form.project.errors|join:", " }} </div> {% endif %} <label for="id_case_number">case number:</label> {{ form.case_number }} {% if form.case_number.errors %} <div class='div_errors'> {{ form.action.errors|join:", " }} </div> {% endif %} <label for="id_dollar_amount">dollar amount:</label> {{ form.dollar_amount }} {% if form.dollar_amount.errors %} <div class='div_errors'> {{ form.category.errors|join:", " }} </div> {% endif %} </fieldset> <input type="submit" id="submit" value="submit" /> </form> {% endblock %} --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---