svwilliams | cjohnston, can I run a workflow by you | 01:29 |
---|---|---|
svwilliams | I'm trying to understand django, I thought I had it but I'm getting a recursive error | 01:30 |
cjohnston | can try svwilliams | 01:32 |
svwilliams | so child agenda item | 01:34 |
svwilliams | you are on the page | 01:34 |
cjohnston | yup | 01:34 |
svwilliams | ... agenda_item_update | 01:34 |
cjohnston | ok | 01:35 |
svwilliams | I've added a link that takes you to agenda_item_add_child | 01:35 |
svwilliams | the render automatically sets the parent | 01:35 |
svwilliams | so on the "if Request.POST" | 01:36 |
cjohnston | whats the bug again please | 01:36 |
cjohnston | nm | 01:36 |
cjohnston | got it | 01:36 |
svwilliams | 707123 | 01:37 |
cjohnston | fwiw.. bug 707123 | 01:37 |
ubot4 | Launchpad bug 707123 in loco-team-portal "When Updating a task add a link to add a subtask (affects: 1) (heat: 5)" [Medium,In progress] https://launchpad.net/bugs/707123 | 01:37 |
cjohnston | ;-) | 01:37 |
svwilliams | nice! | 01:37 |
svwilliams | after the form.save in the if request.POST | 01:38 |
svwilliams | I render back to the original parent | 01:38 |
cjohnston | can you pastebin the code? | 01:38 |
svwilliams | and thats when it goes into recursive nightmare | 01:38 |
svwilliams | yup just thought of that one sec | 01:39 |
svwilliams | http://pastie.org/2881070 | 01:40 |
svwilliams | needs some cleaning its copied together other functions | 01:41 |
cjohnston | what there is new | 01:42 |
cjohnston | what lines | 01:42 |
svwilliams | its all new | 01:43 |
svwilliams | its a new function, which may | 01:43 |
svwilliams | be the wrong way to do it | 01:43 |
cjohnston | gotcha | 01:44 |
* cjohnston is tired too fwiw | 01:44 | |
svwilliams | no worries a second pair of eyes sometimes is all one needs | 01:45 |
svwilliams | I basically tried to understand add and update | 01:46 |
svwilliams | and then implement a function around adding a child and returnin to the original update | 01:46 |
cjohnston | ya.. im kinda thinkin thats a little too much | 01:47 |
svwilliams | yeah I thought so too | 01:47 |
svwilliams | the issue I had was when generating the new agenda_item | 01:48 |
svwilliams | I need to set to it the parent and as I tried to implement it it grew into what you see | 01:48 |
svwilliams | wait ... oh man I haven't been coding enough lately I think I may have it | 01:49 |
svwilliams | when I do the render_to_response out to meetings/agenda_item_new.html | 01:49 |
svwilliams | and it saves doesn't it post to agenda_item_new | 01:49 |
svwilliams | a couple of prints statements would probably tell me | 01:50 |
svwilliams | if thats the case I can get rid of the "if post" stuff | 01:50 |
svwilliams | I think typing it out got my mind cranking again | 01:51 |
svwilliams | I'll let you know how it goes | 01:51 |
cjohnston | ok | 01:51 |
cjohnston | svwilliams: tonight you made me think of something.. | 01:52 |
svwilliams | yeah? | 01:52 |
cjohnston | Initially I just wanted a url linking to add a new item basically | 01:52 |
cjohnston | but.. that link should probably save the current item | 01:52 |
cjohnston | and then set the current item as the parent item in the new one | 01:52 |
svwilliams | I thought about that at first, so hmm | 01:53 |
svwilliams | a new save button | 01:53 |
svwilliams | that save's and adds a child | 01:53 |
cjohnston | not a new save button.. just if you click the link 'Add Child Item' it saves the current item | 01:54 |
svwilliams | ok | 01:55 |
cjohnston | svwilliams: i have to head out.. | 02:07 |
cjohnston | let me know how it goes | 02:07 |
cjohnston | if you are having trouble, push the code to LP and mhall119 or i can look at it tomorrow. | 02:07 |
svwilliams | ok, sounds good! | 02:10 |
=== johnoxton_ is now known as johnoxton | ||
benonsoftware | Hello all | 20:14 |
Ronnie | ping daker | 22:19 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!