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 do
Can you be a bit more specific with what you are attempting to do? Have you
created a form with input fields throughout this table? Are you posting the
form data to your pyramid application?
-Vincent
On Wed, Mar 13, 2013 at 8:42 AM, Gert V wrote:
> We use pyramid and chameleon template.
>
> Cu
Thanks for the fast reply. sorry i wasn't clearer on my previous post. If
annything is still not documentated enough please let me know.
i'll give some code snippets of my template. no data is loaded into this
page. the user has to fill in a few fields and after that we want to store
it to our d
I would recommend spending some more time reading the Pyramid
documentation, especially how Pyramid handles form posts with View
Callables:
http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/views.html#handling-form-submissions-in-view-callables-unicode-and-character-set-issues
.
-V
Gert,
What you could do is the following. Make on the client in javascript a
datastructure (probably a list), that has all the relevant data from the
table. Do a JSON.stringify() on a the data structure and send the
resulting string to the webserver either using a hidden field in a form,
ei
You can submit a form with multiple records(this's how checkbox works),
because you data is come from a html table, not in input control, you need
collect all your data in json(take a loook at jquery.ajax) and build a form
submit you wanted, the pyramid side will decode the form submit normally,
Thx for all previous reactions.
We got all our tabledata into a json. It looks like this:
function neeminhoud()
{
var headers = [];
var InputsArray = [];
var Data = [];
var oTable = document.getElementById('tableDiagnose');
var rijen = oTabl
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 lo
We managed to set up a ajax request with our data inside.
We get the succes message, but we don't know how to get the json out of our
ajax request.
We added these lines in our views.py
def get_items(request):
return {request}
@view_config(route_name='
diagnose', xhr=True, renderer='json')
This is related to jQuery, not the Python framework that you're using.
Note that the `success` function receives more arguments than just the message.
\malthe
On 16 March 2013 17:09, Gert V wrote:
> We managed to set up a ajax request with our data inside.
> We get the succes message, but we do
10 matches
Mail list logo