On Tue, 2006-09-05 at 18:27 -0700, robbie wrote:
> Malcolm Tredinnick wrote:
> > I am really close to finishing the rewrite work necessary to make this
> > easy. It's a bug that it doesn't work already.
>
> Is there a Django ticket for this bug? I think it's also in the way for
> something I'm tr
Malcolm Tredinnick wrote:
> I am really close to finishing the rewrite work necessary to make this
> easy. It's a bug that it doesn't work already.
Is there a Django ticket for this bug? I think it's also in the way for
something I'm trying to do, so it would be good to track its
progress...
(I
> I am really close to finishing the rewrite work necessary to make this
> easy. It's a bug that it doesn't work already. You should be able to
> filter using
>
> Post.objects.filter(tag = 'django').filter(tag = 'python')
Yes! This is what I tried before but noticed it did not work (the
s
agreed with Malcom on this one:you should be splitting the url string at the top (removing the last blank entry) to get the array of tags.from there you can just iterate over the tags array until you hit the end in a for loop.
then in that for loop, just call a filter on the queryset, using the cur
On Tue, 2006-08-29 at 14:05 +, [EMAIL PROTECTED] wrote:
> > > Yes, you are right. I was not thinking straight.
>
> Not a problem. Help is always appreciated!
>
> > > Anyone know what the
> > > best method for performing this in SQL would be? Select all posts for
> > > each tag and use inte
[EMAIL PROTECTED] wrote:
> That works easily when you're just looking up one Tag. What I'm trying
> to figure out is the best way to search for multiple tags and return
> only the Posts common to all of those tags:
Joe,
My bad. I misunderstood your question. I think the only way to do this
(in S
> > Yes, you are right. I was not thinking straight.
Not a problem. Help is always appreciated!
> > Anyone know what the
> > best method for performing this in SQL would be? Select all posts for
> > each tag and use intersect?
>
> With ManyToMany relationships, you have to think of chasing the
Gary Wilson wrote:
> [EMAIL PROTECTED] wrote:
> > > def tags(request, url):
> > > # Don't need the last item in the list since it will
> > > # always be an empty string since Django will append
> > > # a slash character to the end of URLs by default.
> > > tags = url.split('/')[:-1
[EMAIL PROTECTED] wrote:
> > def tags(request, url):
> > # Don't need the last item in the list since it will
> > # always be an empty string since Django will append
> > # a slash character to the end of URLs by default.
> > tags = url.split('/')[:-1]
> > posts = Post.objects.
> Using .* in your URL regexes is not recommended, you only want to match
> what you absolutely need to match. Something like the following would
> be better:
>
> (r'^tags/(?P([a-zA-Z0-9-]+/)+)$', 'ssrc.blog.views.tags')
OK, cool. Thanks!
> This could be very much simplified now, and with the r
[EMAIL PROTECTED] wrote:
> Hello -
>
> I'm playing around with a blog application and I want it to have a
> tagging feature. I have the usual ManyToMany relationship set up with
> Post and Tag (I'm not going to past my model since I think everyone is
> familiar with this kind of setup).
>
> I have
Hello -
I'm playing around with a blog application and I want it to have a
tagging feature. I have the usual ManyToMany relationship set up with
Post and Tag (I'm not going to past my model since I think everyone is
familiar with this kind of setup).
I have three Posts tagged as follows:
Po
12 matches
Mail list logo