#13680: loaddata should issue a warning when attempting to load data using an
unknown serialization format even when it is unspecified
----------------------------------+-----------------------------------------
Reporter: [email protected] | Owner: nobody
Status: new | Milestone:
Component: Core framework | Version: SVN
Keywords: | Stage: Unreviewed
Has_patch: 0 |
----------------------------------+-----------------------------------------
"loaddata" will issue a warning when you specify the filename and
extension of the fixtures (in an unknown format) you want to load as seen
in the following example:
{{{
./manage.py loaddata myapp/fixtures/initial_data.yaml
Problem installing fixture 'myapp/fixtures/initial_data': yaml is not a
known serialization format.
}}}
"loaddata" has a less helpful message when you attempt to load data in an
unknown format without specifying the file extension (the way syncdb
does):
{{{
./manage.py loaddata myapp/fixtures/initial_data
No fixtures found.
}}}
When the file myapp/fixtures/initial_data.yaml exists, and pyyaml is not
installed, the warning message should be the same whether or not you
specify the file extension. I'd argue that anyone attempting to load
database fixtures by name (sans extension) when a file exists with the
same name would want to see this kind of warning. Some applications rely
on initial_data fixtures and any user who issues ./manage syncdb and
expects initial_data to load automatically could be frustrated if they
fail to notice the 'No fixtures found' message. A warning is more
appropriate in this instance.
--
Ticket URL: <http://code.djangoproject.com/ticket/13680>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.