/srv/irclogs.ubuntu.com/2011/11/18/#ubuntu-website.txt

svwilliamscjohnston, can I run a workflow by you01:29
svwilliamsI'm trying to understand django, I thought I had it but I'm getting a recursive error01:30
cjohnstoncan try svwilliams01:32
svwilliamsso child agenda item01:34
svwilliamsyou are on the page01:34
cjohnstonyup01:34
svwilliams... agenda_item_update01:34
cjohnstonok01:35
svwilliamsI've added a link that takes you to agenda_item_add_child01:35
svwilliamsthe render automatically sets the parent01:35
svwilliamsso on the "if Request.POST"01:36
cjohnstonwhats the bug again please01:36
cjohnstonnm01:36
cjohnstongot it01:36
svwilliams70712301:37
cjohnstonfwiw.. bug 70712301:37
ubot4Launchpad 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/70712301:37
cjohnston;-)01:37
svwilliamsnice!01:37
svwilliamsafter the form.save in the if request.POST01:38
svwilliamsI render back to the original parent01:38
cjohnstoncan you pastebin the code?01:38
svwilliamsand thats when it goes into recursive nightmare01:38
svwilliamsyup just thought of that one sec01:39
svwilliamshttp://pastie.org/288107001:40
svwilliamsneeds some cleaning its copied together other functions01:41
cjohnstonwhat there is new01:42
cjohnstonwhat lines01:42
svwilliamsits all new01:43
svwilliamsits a new function, which may01:43
svwilliamsbe the wrong way to do it01:43
cjohnstongotcha01:44
* cjohnston is tired too fwiw01:44
svwilliamsno worries a second pair of eyes sometimes is all one needs01:45
svwilliamsI basically tried to understand add and update01:46
svwilliamsand then implement a function around adding a child and returnin to the original update01:46
cjohnstonya.. im kinda thinkin thats a little too much01:47
svwilliamsyeah I thought so too01:47
svwilliamsthe issue I had was when generating the new agenda_item01:48
svwilliamsI need to set to it the parent and as I tried to implement it it grew into what you see01:48
svwilliamswait ... oh man I haven't been coding enough lately I think I may have it01:49
svwilliamswhen I do the render_to_response out to meetings/agenda_item_new.html01:49
svwilliamsand it saves doesn't it post to agenda_item_new01:49
svwilliamsa couple of prints statements would probably tell me01:50
svwilliamsif thats the case I can get rid of the "if post" stuff01:50
svwilliamsI think typing it out got my mind cranking again01:51
svwilliamsI'll let you know how it goes01:51
cjohnstonok01:51
cjohnstonsvwilliams: tonight you made me think of something..01:52
svwilliamsyeah?01:52
cjohnstonInitially I just wanted a url linking to add a new item basically01:52
cjohnstonbut.. that link should probably save the current item01:52
cjohnstonand then set the current item as the parent item in the new one01:52
svwilliamsI thought about that at first, so hmm01:53
svwilliamsa new save button01:53
svwilliamsthat save's and adds a child01:53
cjohnstonnot a new save button.. just if you click the link 'Add Child Item' it saves the current item01:54
svwilliamsok01:55
cjohnstonsvwilliams: i have to head out..02:07
cjohnstonlet me know how it goes02:07
cjohnstonif you are having trouble, push the code to LP and mhall119 or i can look at it tomorrow.02:07
svwilliamsok, sounds good!02:10
=== johnoxton_ is now known as johnoxton
benonsoftwareHello all20:14
Ronnieping daker22:19

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!