Tuesday, August 25, 2015

Re: Using ModelForms

 
On Tue, Aug 25, 2015, at 14:16, Hugo Kitano wrote:
Noted.  "/stat/s" is an index page.  Here is what my urls.py looks like.  Also, by using print statements, I've realized that the request.method is always GET, not POST, which makes it so no model instance is ever saved.  What does this GET request refer to specifically?
 
Thanks
 
 
 
 

 
Your form posts to /stats/, but /stats/ does not map to your view method `submit`. You need to post data to the view that's processing it, so fix t form or the urls.py.
 
On Monday, August 24, 2015 at 3:29:40 PM UTC-7, Hugo Osvaldo Barrera wrote:
 
On Mon, Aug 24, 2015, at 16:41, Hugo Kitano wrote:
I'm actually now pretty certain that my html file is what's causing it to not work
 

 
Including your message as an inline image rather than simple text will reduce the amount of people that can actually read your message (and complicate following the thread).
 
Does "/stats/" point to the above mentioned view ("submit")? What does your urls.py look like? Did you try putting a "print" (or anything alike) into the view function to really make sure it's the one being called?
 
--
Hugo Osvaldo Barrera
 

Email had 1 attachment:

  • Auto Generated Inline Image 1
      12k (image/png)
 
--
Hugo Osvaldo Barrera
 

No comments:

Post a Comment