error in urlconf

2010-09-25 Thread CarloRatm
http://pastebin.com/aY6tZm6j

What's wrong with that code ?

Thank you,
cheers

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Trying to make a POST call to a Django view

2016-05-02 Thread carloratm
hello everyone,
I am a frontend developer studying Django, so please forgive my noobish 
question...
I am trying to make a simple ajax call working.

I have a form in a template. I would like to use that form to save an 
object into the database (asynchronously).
On form submit event:
* I prevent regular action
* I serialize form data in a JSON
* I pass that object to a view using a jquery POST
* The view receive the JSON data
* The view use the request.POST data to save an object into the database.
* The view returns a message.

Is that flow straightforward, or am I completely missing the goal?

Now some code and the error I got.

The relevant part of template:

http://dpaste.com/3Z7TRPM


And this is the error I got:

http://dpaste.com/3FYMGYG

I noticed that in the view the request.POST is *empty*!
That is wrong, I suppose.

I am surely missing something.
Any help is really appreciated.

Thank you in advance,
carlo

-- 
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/44f6da2a-c677-4485-99f2-eec20f8dfe0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.