Re: loaddata on big fixture doesn't seem to end

2008-02-22 Thread msoulier

On Feb 21, 10:57 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> I've logged this as #6643. I'm hoping to have some time tonight to
> look at a few outstanding fixture tickets; I'll add this one to the
> list.

Thanks, you guys rock.

Mike
--~--~-~--~~~---~--~~
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: loaddata on big fixture doesn't seem to end

2008-02-21 Thread Russell Keith-Magee

On Fri, Feb 22, 2008 at 12:07 PM, Malcolm Tredinnick
<[EMAIL PROTECTED]> wrote:
>
>  On Thu, 2008-02-21 at 18:58 -0800, msoulier wrote:
>  > Hi,
>  >
>  > I'm loading a fixture with 2500 objects in it into postgres 7.4.
>  >
>  > For some reason, loaddata is looking in a lot of additional places
>  > than the file I'm handing it.
>
>  If you read the documentation carefully (in django-admin.txt), you'll
>  see that "loaddata" appends the name it's given to a whole bunch of
>  prefixes. It doesn't expect to be handed an absolute filename.

Whilst this is correct, I think this report may be an indicator of a
subtle bug - the '11 fixtures loaded' is obviously wrong, and 27500 is
11x2500. I have a nasty feeling that the fixture loader may actually
be loading the fixture 11 times, due to the way that os.path.join
ignores any provided path once an absolute path name is provided on
the list of paths to join.

I've logged this as #6643. I'm hoping to have some time tonight to
look at a few outstanding fixture tickets; I'll add this one to the
list.

Yours,
Russ Magee %-)

--~--~-~--~~~---~--~~
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: loaddata on big fixture doesn't seem to end

2008-02-21 Thread Malcolm Tredinnick


On Thu, 2008-02-21 at 18:58 -0800, msoulier wrote:
> Hi,
> 
> I'm loading a fixture with 2500 objects in it into postgres 7.4.
> 
> For some reason, loaddata is looking in a lot of additional places
> than the file I'm handing it.
> 
> [EMAIL PROTECTED] teleworker]# PYTHONPATH=.. python manage.py
> loaddata /root/clients.json

If you read the documentation carefully (in django-admin.txt), you'll
see that "loaddata" appends the name it's given to a whole bunch of
prefixes. It doesn't expect to be handed an absolute filename.

It's possibly not crazy to add this option (Russell might know of a
reason why it's a bad idea, but I can't immediately think of one), but,
at the moment, it's behaving as intended and as documented.

Regards,
Malcolm

-- 
Tolkien is hobbit-forming. 
http://www.pointy-stick.com/blog/


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



loaddata on big fixture doesn't seem to end

2008-02-21 Thread msoulier

Hi,

I'm loading a fixture with 2500 objects in it into postgres 7.4.

For some reason, loaddata is looking in a lot of additional places
than the file I'm handing it.

[EMAIL PROTECTED] teleworker]# PYTHONPATH=.. python manage.py
loaddata /root/clients.json
Loading '/root/clients.json' fixtures...
Installing json fixture '/root/clients' from '/usr/lib/python2.3/site-
packages/django/contrib/auth/fixtures'.
Installing json fixture '/root/clients' from '/usr/lib/python2.3/site-
packages/django/contrib/contenttypes/fixtures'.
Installing json fixture '/root/clients' from '/usr/lib/python2.3/site-
packages/django/contrib/sessions/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/dashboard/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/icps/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/clients/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/advanced/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/proxies/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/metrics/fixtures'.
Installing json fixture '/root/clients' from '/etc/e-smith/web/django/
teleworker/js/fixtures'.
Installing json fixture '/root/clients' from absolute path.
Installed 27500 object(s) from 11 fixture(s)

Is there a way to skip everything else and just load the one fixture I
handed it?

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