2009/1/14 May <adles...@gmail.com>: > > Hello, > > I tried the URL and still received this error: > Page not found (404) > Request Method: POST > Request URL: http://127.0.0.1:8000/fsafety//commodity_detail/
Yep... sorry i just checked for the url didnt read the form part in detail :p > I think now that the ID is not getting passed to this line: > <form method="POST" action="/fsafety/{{commodity.id}}/ > commodity_detail/"> Yes this is the problem... since at this point, you _dont_ have the comunity id... :) when you're doing: {% for commodity in commodity_list %} <option value="{{commodity.id}}">{{commodity.commodity}}</option> {% endfor %} here's when you have the data... so you sould change some code: change the following lines: (r'^(?P<commodity_id>\d+)/commodity_detail/$', 'commodity'), <select id="commodity_id" name="commodity'> <form method="POST" action="/fsafety/{{commodity.id}}/commodity_detail/"> by (r'/commodity_detail/$', 'commodity'), <select id="commodity_id" name="commodity_id"> <form method="POST" action="/commodity_detail/"> tho... i guess that would work like this (i aint an expert :P) > Thank you for any help you can give. > > May > > On Jan 13, 10:25 am, Santiago <santiago.j.zar...@gmail.com> wrote: >> replace in your url.py: >> >> (r'^(?P<commodity_id>\d+)$/commodity_detail/', 'commodity'), >> >> by >> >> (r'^(?P<commodity_id>\d+)/commodity_detail/$', 'commodity'), >> >> this _should_ work >> >> 2009/1/14 May <adles...@gmail.com>: >> >> >> >> > My error is not being able to get the ID passed to the next >> > template. >> >> > The code: >> >> >http://dpaste.com/108580/ >> >> > Thank you, >> >> > May >> >> > > > --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---