Daniel, you nailed it! I didn't have the name specified. Adding that makes 
it propagate through!

On Monday, November 28, 2016 at 6:34:19 PM UTC-6, Jordan W wrote:
>
> Hi,
>
> I have been working on a small project for myself and some friends, and I 
> seem to have hit a hitch in getting it to work as expected.
>
> In my detail view, I have a small simple form:
>     <form class="inline" action="/app/action/" method="POST">
>     {% csrf_token %}
>        <button type="submit">Prepare</button>
>     </form>
>
>
> My main list view and detail view are class based views, with me 
> attempting to use a FBV for prepare because it seems simpler to understand. 
> I've put a breakpoint in the "action" view, and tried to inspect the 
> request and see data from clicking the button come through, but I don't see 
> it. I am clearly missing something about how django sends POST data. I have 
> tried adding the following in bold to see how to get the data through, as 
> well as adding *args, **kwargs, as well as positional and named keyword 
> arguments to my "action" FBV:
>
>     <form class="inline" action="/app/action/" method="POST" *id="{{ 
> obj.id <http://obj.id> }}" objid="{{ obj.id <http://obj.id> }}"*>
>     {% csrf_token %}
>         *{{obj.id <http://obj.id>}}*
>         *<input type="hidden" value="{{obj.id <http://obj.id>}}" />*
>        <button type="submit">Prepare</button>
>     </form>
>
> If anyone can explain what I'm missing, it'd be greatly appreciated!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d75827d7-99b8-4f1e-bd4e-dff5dc000b52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to