we added these lines in our views.py

def get_items(request):
    return {request}  

@view_config(route_name='diagnose', xhr=True, renderer='json')
def r_ajax(request):
    items = get_items(request)
    logger = logging.getLogger("random")
    logger.warning(json.dumps(items))


our ajax post looks like this:
                  $.ajax({
                      type: "POST",
                      url: "/diagnose",
                      dataType: "json",
                      data: Data,
                      success: function (msg) {
                        alert("succes: " + msg);
                      },
                      error: function(){
                          alert(msg + 'tet');
                          }                      
                   });

how can we get the json out of our ajax request?



On Wednesday, March 13, 2013 4:42:30 PM UTC+1, Gert V wrote:
>
> We use pyramid and chameleon template.
>
> Currently we have a page where users can fill in a table.
> This table has a variable lenght because rows are added dynamically.
> We want to get all the content of the table and put it in a list, so we 
> send it to our database.
>
> The biggest problem is that we don't know how to send the data to a list 
> and get it to our vieuw.
> can some1 help me with this problem?
> thanks in advance.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to