Re: dynamic form with popup

2011-08-22 Thread ozgur yilmaz
Thanks Shawn, I think i satisfied with this way. It seems a suitable way for Django. I'll use it. Thanks again, 2011/8/23 Shawn Milochik : > On 08/22/2011 05:44 PM, ozgur yilmaz wrote: >> >> Ok. Thank you so much. So, formset is a suitable way to achieve this. >> But, is it

Re: dynamic form with popup

2011-08-22 Thread Shawn Milochik
On 08/22/2011 05:44 PM, ozgur yilmaz wrote: Ok. Thank you so much. So, formset is a suitable way to achieve this. But, is it the most django-oriented way? Is there any alternative way? Maybe using popup window to select a product, and handle the return value of popup, then use a hiddenvalue to

Re: dynamic form with popup

2011-08-22 Thread ozgur yilmaz
Ok. Thank you so much. So, formset is a suitable way to achieve this. But, is it the most django-oriented way? Is there any alternative way? Maybe using popup window to select a product, and handle the return value of popup, then use a hiddenvalue to hold the return value. And repeat this for many

Re: dynamic form with popup

2011-08-22 Thread Shawn Milochik
On 08/22/2011 05:33 PM, ozgur yilmaz wrote: thanks, but i think i have to use a suitable js for adding a new product. am i wrong? To do it the way you want you'll have to use JavaScript, but it's easy (especially with jQuery) to dynamically add elements to your form. No refreshing

Re: dynamic form with popup

2011-08-22 Thread Yaşar Arabacı
If you want to dynamically update your Cart without refreshing the page, yes you will need to write some heavy ajax. But if you are okey with page refreshing, you can temprorarily save your cart in session and use formsets as shawn suggested. 2011/8/23 ozgur yilmaz > thanks,

Re: dynamic form with popup

2011-08-22 Thread ozgur yilmaz
thanks, but i think i have to use a suitable js for adding a new product. am i wrong? 2011/8/23 Shawn Milochik : > On 08/22/2011 05:21 PM, ozgur yilmaz wrote: >> >> thats not the answer. you can add item to basket by clicking a button >> "add to basket" on every item page. My

Re: dynamic form with popup

2011-08-22 Thread Shawn Milochik
On 08/22/2011 05:21 PM, ozgur yilmaz wrote: thats not the answer. you can add item to basket by clicking a button "add to basket" on every item page. My purpose is to fill a single form, with 1 or many products. Than a single button, saves a checkout object and many product object. Use

Re: dynamic form with popup

2011-08-22 Thread Yaşar Arabacı
And also, I suggest that you create Cart model, with ManyToMany field to your product. And you can add your checkout date there too, and other cart related information like total price etc. Keep your cart as a session variable until checked out, you can then save your cart. So that you could have

Re: dynamic form with popup

2011-08-22 Thread ozgur yilmaz
thats not the answer. you can add item to basket by clicking a button "add to basket" on every item page. My purpose is to fill a single form, with 1 or many products. Than a single button, saves a checkout object and many product object. 23 Ağustos 2011 00:12 tarihinde Yaşar Arabacı

Re: dynamic form with popup

2011-08-22 Thread Yaşar Arabacı
I don't know the answer, but you may want to check this out: http://www.satchmoproject.com/ 2011/8/23 ozgur yilmaz > Hi, I have a problem. > > I have two models: > > class CheckOut(models.Model): > models.DateField() > > class Product(models.Model): > checkout =