html - Django form: *Nothing* happens when submit button is clicked -


I probably have some very basic missing but I'm stumped.

My HTML Form (in a Django template):

  & lt; Form id = "site_signout" method = "POST" & gt; {% csrf_token%} & lt; Input type = "submit" value = "sign in" & gt; & Lt; / Form & gt;   

In my browser (run my site on Dev Server), when I & lt; Input & gt; I click on the button, nothing happens, like nothing. Normally appears in some terminals such as

  [PO / I / url / HTTP / 1.1] 302 0   

or in firebug, let me get the net panel Something will be seen in the HTML tab of POST . But I'm not seeing anything.

It is okay to submit another (for other forms) buttons on the work of my site.

What can be done with it?

> Edit: is the relevant part of my idea:

  if request.method == 'POST': pdb.set_trace () Edit  

Edit: My intention is that I am for this form right now because I have to check this code, before I get more code Write Just post to the same page (URL) that the form is turned on as I understand it, it only returns action attribute to & lt; Form & gt; The element should be completely abandoned by how I started it, but since it was not working, I tried some other option such as action = "/" , Which I originally posted above, however, I intend that the form is in the same way, as the form itself is. So to clarify this point I have edited my original code sample to completely cancel the verb attribute.

This is my top-level urls.py:

  urlpatterns = Pattern ('', url ('' inspection '', included ('main_inspection.urls' ), ...) + static (settings.MEDIA_URL, document_root = settings.MEDIA_ROOT)   

Here is the main_inspection.urls with the relevant URL:

  
  http  
 : //127.0.0.1: 8000 / inspection / home /    

The solution turned out to be very silly, upstairs The question can not be searched by any person who reads:

I had to capture some of the JS events in the event in which the form was located. < P>: When something looks really awkward that the IC HTML level is happening on the bus, check to make sure that you have not written any stupid JS code, which is causing the effect.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -