Re: Django-cart. How to run method add_to_cart?

2013-10-03 Thread Ricardo Kamada
Hi Leonardo. managed to make the implementation of the cart. not used the card but django django carton. There are the same but they are similar. veleu for help. I'm passing the objects by post. Thanks for the help. Em 02/10/2013 04:10, "Leonardo Giordani" escreveu:

Re: Django-cart. How to run method add_to_cart?

2013-10-02 Thread Leonardo Giordani
Hi Ricardo, well this is a question that needs a good explanation. I try to give you some hints about what you need to research about: a. You need to send data to the Django server through a POST view. This is a HTTP "verb", that is one of many different ways the browser has to communicate with

Re: Django-cart. How to run method add_to_cart?

2013-10-01 Thread Ricardo Kamada
you already helped me a lot =) Leonardo looks just http://dpaste.com/1402408/ On line 20 I pass a value of fixed amount in the template. How would get the amount in input dynamically? Abs [] s Ricardo 2013/10/1 Leonardo Giordani > Ricardo, > > I think the example

Re: Django-cart. How to run method add_to_cart?

2013-10-01 Thread Leonardo Giordani
Ricardo, I think the example on the django-cart site are somehow incorrect: since you are going to change the database you shall use a POST view and not a GET. However, putting apart HTTP verbs for a moment, let's look at how you call views from URLs. If you write something like the following in

Re: Django-cart. How to run method add_to_cart?

2013-10-01 Thread Ricardo Kamada
Leonardo Hi thanks for the reply but I still can not understand. I really need to pass the id and quantity parameters in the url? After all I'm recording the items in the correct session? I saw that the method has no return add_to_cart, as well as other methods remove_from_cart. In my template I

Re: Django-cart. How to run method add_to_cart?

2013-10-01 Thread Leonardo Giordani
You have to implement an URL dispatcher that links an URL to your view. Read here and feel free to ask again if something is still not clear. Leonardo Giordani Author of The Digital Cat My profile on About.me

Re: Django-cart. How to run method add_to_cart?

2013-09-30 Thread Ricardo
Hi, I have this same problem. I'm looking for answer everywhere. enemybass could implement? If someone can help me with this [] s Em quarta-feira, 26 de setembro de 2012 05h33min24s UTC-3, enemybass escreveu: > > https://github.com/bmentges/django-cart > > *I'm* a total *newbie* to *Django.

Django-cart. How to run method add_to_cart?

2012-09-26 Thread enemybass
https://github.com/bmentges/django-cart *I'm* a total *newbie* to *Django. *How to run method *add_to_car*t? In template I would have button "add to cart". Thanks. def add_to_cart(request, product_id, quantity): product = Product.objects.get(id=product_id) cart = Cart(request)