Re: a question about site framework

2007-08-01 Thread gt7658b

Kai:

I was worrying about how to use the django database api to do site
related queries. I mean how do I simply retrieve articles of a site
without having to use the custom query.

Harry

On Aug 1, 9:36 pm, "Kai Kuehne" <[EMAIL PROTECTED]> wrote:
> Hi Harry,
>
> On 8/2/07, gt7658b <[EMAIL PROTECTED]> wrote:
>
>
>
> > Kai:
>
> > Thanks for the suggestions. In this case, my Article will have
> > relationship with category, not directly withsite. Will I still be
> > able to take advantage of the functions ofsiteframework?
>
> I don't understand you (well, it's late.. maybe that's the reason).
> Your articles have a realtionship with a category and a
> category belongs to one-or-more sites. Isn't that what you
> wanted?
>
> Kai


--~--~-~--~~~---~--~~
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: a question about site framework

2007-08-01 Thread Kai Kuehne

Hi Harry,

On 8/2/07, gt7658b <[EMAIL PROTECTED]> wrote:
>
> Kai:
>
> Thanks for the suggestions. In this case, my Article will have
> relationship with category, not directly with site. Will I still be
> able to take advantage of the functions of site framework?

I don't understand you (well, it's late.. maybe that's the reason).
Your articles have a realtionship with a category and a
category belongs to one-or-more sites. Isn't that what you
wanted?

Kai

--~--~-~--~~~---~--~~
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: a question about site framework

2007-08-01 Thread gt7658b

Kai:

Thanks for the suggestions. In this case, my Article will have
relationship with category, not directly with site. Will I still be
able to take advantage of the functions of site framework?

Harry

On Jul 31, 9:45 pm, "Kai Kuehne" <[EMAIL PROTECTED]> wrote:
> ManyToManyField maybe is way better. Sorry, its late.


--~--~-~--~~~---~--~~
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: a question about site framework

2007-07-31 Thread Kai Kuehne

ManyToManyField maybe is way better. Sorry, its late.

--~--~-~--~~~---~--~~
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: a question about site framework

2007-07-31 Thread Kai Kuehne

Hi,

On 8/1/07, Hai Dong <[EMAIL PROTECTED]> wrote:
>
> Hello:
>
> I got a question. What if I have two sites, and each site has several
> categories (where articles belong to). For such kind of case what is the
> best way of utilizing the site framework.

What about a ForeignKey field in the categories model pointing
to a site? Something like:

from django.contrib.sites.models import Site

class Category(models.Model):

site = models.ForeignKey(Site)


> Thanks,
> Harry

Kai

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



a question about site framework

2007-07-31 Thread Hai Dong

Hello:

I got a question. What if I have two sites, and each site has several
categories (where articles belong to). For such kind of case what is the
best way of utilizing the site framework.

Thanks,
Harry

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