Mike Hansen wrote:
> I apologize if this already showed up on the list. I originally posted this
> from google groups, and I think it ate it.
>
> I'm new to Django. As a small Django project, I'm making a internal purchase
> request form. One section has user information and another section has a
> selection of items to request to be purchased(computer hardware and
> software). The items in the second section are dynamic. I read them from a
> database, and the list of items can fluctuate depending on what is being
> offered. Is it possible to use newforms to do this? I'm not sure how to
> create the form object. BTW, I'm using 0.96.
>
>
> class RequestForm(forms.Form):
> name = forms.CharField(max_length=100)
> department= forms.CharField()
> email= forms.EmailField()
> # here's where I get lost. I'd like some sort of dictionary/class/list
> that
> # has items, and quantities requested.
>
> Does anyone have any ideas on this?
>
> Thanks.
Mike,
Have a look at using the ForeignKey attribute to pull in information
from another database.
I've just started using Django myself. For how I've done this,
check-out http://www.launcpad.net/posys/pypo - look at
http://bazaar.launchpad.net/~andylockran/posys/pypo/annotate/6?file_id=models.py-20080902200058-47p99xmqjp3zourq-3
for the model.
Regards,
Andy
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---