Re: Is there a way to limit the number of element in the template

2008-01-06 Thread Alexandre Forget
n? > > On 7 янв, 02:55, "Alexandre Forget" <[EMAIL PROTECTED]> wrote: > > I tried with and without... no difference > > > > On Jan 6, 2008 6:32 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > &

Re: Is there a way to limit the number of element in the template

2008-01-06 Thread Alexandre Forget
I tried with and without... no difference On Jan 6, 2008 6:32 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > Have you put a space between "all" and filter mark? > > On 7 янв, 02:27, "Alexandre Forget" <[EMAIL PROTECTED]> wrote:

Re: Is there a way to limit the number of element in the template

2008-01-06 Thread Alexandre Forget
update: it doesn't work in the for loop. -- TemplateSyntaxError at /parts/8051/ 'for' statements should use the format 'for x in y': for t in part.forum.thread_set.all |slice: ":5" -- this is the offending line: {% for t in part.forum.thread_set.all |slice: ":5" %} any

Re: Is there a way to limit the number of element in the template

2008-01-06 Thread Alexandre Forget
On Jan 6, 2008 5:44 PM, Alex Koshelev <[EMAIL PROTECTED]> wrote: > > First of all, Part.objects.all()[:5] is still lazy. SQL query executes > only when you try to iterate through items. > And you can slice objects in template with "slice" filter > > {% for p in part.object.all|slice:":5" %} > Th

Is there a way to limit the number of element in the template

2008-01-06 Thread Alexandre Forget
would like to do this without doing the actual query in the view, am I missing something ? thanks Alexandre Forget --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

shemas evolution

2007-09-22 Thread Alexandre Forget
I wonder what people are using *right now* to evolve their data ? I'm using this: # create a fixture with all data in the current db python manage.py dumpdata --indent=4 > initial_data.json # delete de database rm db.sqlite # edit the model # recreate db and reload data manage syncdb --noinp

Re: UnicodeEncodeError

2007-08-03 Thread Alexandre Forget
thanks the help I am using a modified version of django-forum, replacing those __str__ with __unicode__ did the job alex On 8/1/07, Thomas Guettler <[EMAIL PROTECTED]> wrote: > > Am Mittwoch, 1. August 2007 04:23 schrieb Alexandre Forget: > > Hi, > > > > I

UnicodeEncodeError

2007-07-31 Thread Alexandre Forget
Hi, I am stuck with this error, does someone know what it mean? I am using django svn and sqlite. This error happen when I try to delete an object with the admin interface but it delete fine with the shell. any help greatly appreciated alex Traceback (most recent call last): File "/home/alex/