Re: combining unrelated tables

2008-07-01 Thread Shane McNamee
when i try doing that i get a really weird error, but i was doing it like
"render_to_response('Template.html', {'first_qs': Model1.objects.all()},
{'second_qs':Model2.objects.all()})", with the {} around each one, so
hopefully i just had wrong syntax. ill try it like u said. thanks for the
help

-Shane

On Tue, Jul 1, 2008 at 10:21 AM, Richard Dahl <[EMAIL PROTECTED]> wrote:

> Not sure exactly where you are going, but what do you mean by ' Inside
> views.py it only lets me send 1 queryset to the template'  why can't you do
> something like:
>
> render_to_response('Template.html', {'first_qs': Model1.objects.all(),
> 'second_qs':Model2.objects.all()})
>
> -richard
>
>
>
> On 7/1/08, Shane_McNamee <[EMAIL PROTECTED]> wrote:
>
>>
>> hey, i searched around this forum and found a lot of questions similar
>> to this, but i couldnt find an answer to my question.
>>
>> I need to send data to my templates that comes from multiple tables in
>> my database. Inside views.py it only lets me send 1 queryset to the
>> template, so i figured the only way to send data from more than 1
>> table was to join everything i needed into a single queryset. however
>> i cant figure out how to join tables within django. is there a way to
>> do this? and if not is there another way to solve my problem? thanks
>> in advance for any help
>>
>> -Shane
>> >>
>>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: combining unrelated tables

2008-07-01 Thread Richard Dahl
Not sure exactly where you are going, but what do you mean by ' Inside
views.py it only lets me send 1 queryset to the template'  why can't you do
something like:

render_to_response('Template.html', {'first_qs': Model1.objects.all(),
'second_qs':Model2.objects.all()})

-richard



On 7/1/08, Shane_McNamee <[EMAIL PROTECTED]> wrote:
>
>
> hey, i searched around this forum and found a lot of questions similar
> to this, but i couldnt find an answer to my question.
>
> I need to send data to my templates that comes from multiple tables in
> my database. Inside views.py it only lets me send 1 queryset to the
> template, so i figured the only way to send data from more than 1
> table was to join everything i needed into a single queryset. however
> i cant figure out how to join tables within django. is there a way to
> do this? and if not is there another way to solve my problem? thanks
> in advance for any help
>
> -Shane
>
> >
>

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



combining unrelated tables

2008-07-01 Thread Shane_McNamee

hey, i searched around this forum and found a lot of questions similar
to this, but i couldnt find an answer to my question.

I need to send data to my templates that comes from multiple tables in
my database. Inside views.py it only lets me send 1 queryset to the
template, so i figured the only way to send data from more than 1
table was to join everything i needed into a single queryset. however
i cant figure out how to join tables within django. is there a way to
do this? and if not is there another way to solve my problem? thanks
in advance for any help

-Shane

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---