Thanks Malcom! But how would I apply this?
Here's my code:
def main(request):
feed_titles = Feed.objects.all()
feed_list = FeedItem.objects.all()
#for i in range (1,13):
#feed_list.append(FeedItem.objects.filter(feed=i)[:7]) #
doesn't work...why?
t = loader.get_template
Thanks Malcolm!
Python code:
def main(request):
feed_titles = Feed.objects.all()
feed_list = FeedItem.objects.all().order_by('feed_id')
#i tried a for loop here appending feed_list to a list...but
template wouldn't see list as object...?
t = loader.get_template('aggregator/
Thanks Malcolm!
Would I make a variable like this?
FeedItems.objects.filter(feed_id='%s').order_by('feed_id')[:8]
???
I want this to loop through rows in my table with different values for
%s...should I do this through my view or template?
Thanks for the help!
On Apr 29, 2:29 am, Malcolm Tre
On Sun, 2007-04-29 at 07:29 +, [EMAIL PROTECTED] wrote:
> Hi everyone,
>
> Django/python newbie but I'm enjoying it so far!
>
> Quick question:
>
> How would I write this
>
> SELECT * FROM aggregator_feeditems WHERE feed_id = 1 ORDER BY feed_id
> LIMIT 0,7
>
> in either a view or template
4 matches
Mail list logo