I'm trying to build a very simple ecommerce page using Google Checkout
without the use of a shopping cart.  Here are my models:

class Team(models.Model):
        name = models.CharField(maxlength=30, unique=True)
        def __str__(self):
                return self.name
        class Meta:
                ordering = ['name']
        class Admin:
                pass
class Association(models.Model):
        name = models.CharField(maxlength=30, unique=True)
        def __str__(self):
                return self.name
        class Meta:
                ordering = ['name']
        class Admin:
                pass
class OrderForm(forms.Form):
    association =
forms.ModelChoiceField(queryset=Association.objects.all())
    team = forms.ModelChoiceField(queryset=Team.objects.all())

I'd like users to be able to select their association and team from a
drop down list, and send their selection immediately to Google
Checkout without the use of a shopping cart.

Is there a way to capture their selection and send "team" as the item-
name, and "association" as its description?  Here's my view function
so far:

def order(request):
        order_form = OrderForm()
        return render_to_response('order.html',
                        {'order_form': order_form})

And here's how I'm currently trying to send the info through Google
Checkout:

  <input type="hidden" name="item_name_1"
value="{{ order_form.team.name }}"/>
  <input type="hidden" name="item_description_1"
value="{{ order_form.association.name }}"/>

Right now, when I send this to Google Checkout, instead of sending the
name of the Association and Team that was selected, it sends the word
"team" as the item-name, and "association" as the item-description.
Please let me know if you have any insight!


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to