Oops, wrong HTML down there. The actual HTML is:

<html>
<head/>
<body>
<form action="/boughtsold/" method="post">
        <table>
                {{ form.as_table }}
        </table>
        <input type="submit", value = "Buy", name="buy"/>
        <input type="submit", value = "Sell", name="Sell"/>
</form>
</body>
</html>



On Dec 9, 2009, at 9:21 PM, Kenneth McDonald wrote:

>
>> And the code to create and validate the form is...?  That might help
>> in figuring out what is wrong.
>>
> Sure. It's just:
>
>
>
> def buysell(request):
>     form = BuySellForm()
>     return render_to_response('buysellform.html', {'form': form})
>
>
>
> in file 'buysell.py', and is referenced as http://.../buysell, as per
> the urls.py file:
>
>
>
> from django.conf.urls.defaults import *
> from mysite import buysell
>
> # Uncomment the next two lines to enable the admin:
> # from django.contrib import admin
> # admin.autodiscover()
>
> urlpatterns = patterns('',
>     (r'^buysell/$', buysell.buysell),
>     (r'^boughtsold/$', buysell.boughtsold),
>
>
> and for good measure the HTML is:
>
>
>
> <html><head/>
> <body>
> <form method="post" action="/boughtsold/">
>       Symbol:<input type="text", name="symbol" value="{{ symbol }}"><p/>
>       Shares:<input type="text", name="shares"><p/>
>       Price:<input type="text", name="price"><p/>
>       <input type="submit", value="buy">
>       <input type="submit", value="sell">
> </form>
> </body>
> </html>
>
>
> Thanks!
> Ken
>
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "Django users" 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/django-users?hl=en 
> .
>
>

--

You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en.


Reply via email to