Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2013-05-19 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  senko
 Type:  Bug  |   Status:  closed
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  loaddata |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Andrew Godwin ):

 In [changeset:"7a99d1e167f81c5fcd1b9f7f548c5d6959cef2ef"]:
 {{{
 #!CommitTicketReference repository=""
 revision="7a99d1e167f81c5fcd1b9f7f548c5d6959cef2ef"
 Merge pull request #1134 from senko/ticket_18990

 Fixed #18990: Loaddata now complains if fixture doesn't exist
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2013-05-19 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  senko
 Type:  Bug  |   Status:  closed
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  loaddata |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Senko Rasic ):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"cc3b3ba93a7bfdd2ece739e97e36150a719acd3e"]:
 {{{
 #!CommitTicketReference repository=""
 revision="cc3b3ba93a7bfdd2ece739e97e36150a719acd3e"
 Fixed #18990: Loaddata now complains if fixture doesn't exist

 The fixture named "initial_data" is exceptional though; if it
 doesn't exist, the error is not raised. This allows syncdb and
 flush management commands to attempt to load it without causing
 an error if it doesn't exist.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2013-05-19 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  senko
 Type:  Bug  |   Status:  closed
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  loaddata |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Senko Rasic ):

 In [changeset:"c44a2c40fe0ed79b0fa00233a204d41e9c677750"]:
 {{{
 #!CommitTicketReference repository=""
 revision="c44a2c40fe0ed79b0fa00233a204d41e9c677750"
 Fixed #18990 -- Loaddata now complains if fixture doesn't exist

 If the fixture doesn't exist, loaddata will output a warning.

 The fixture named "initial_data" is exceptional though; if it
 doesn't exist, the warning is not emitted. This allows syncdb and
 flush management commands to attempt to load it without causing
 spurious warnings.

 Thanks to Derega, ptone, dirigeant and d1ffuz0r for contributions
 to the ticket.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2013-05-19 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  senko
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Ready for
 Keywords:  loaddata |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by oinopion):

 * stage:  Accepted => Ready for checkin


Comment:

 Looks good to me.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2013-05-19 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  senko
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by senko):

 Another good comment by derega via IRC: the output from the warnings looks
 a bit unfriendly:

 {{{
 (django-dev)[tachyon:djangotest]$ python manage.py loaddata asd.json
 as.json
 /home/senko/.virtualenvs/django-
 dev/lib/python2.7/django/core/management/commands/loaddata.py:173:
 UserWarning: No fixture named 'asd' found.
   warnings.warn("No fixture named '%s' found." % fixture_name)

 /home/senko/.virtualenvs/django-
 dev/lib/python2.7/django/core/management/commands/loaddata.py:173:
 UserWarning: No fixture named 'as' found.
   warnings.warn("No fixture named '%s' found." % fixture_name)

 Installed 0 object(s) from 0 fixture(s)
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2013-05-19 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  senko
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by senko):

 Updated the pull request according to the comments by derega.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2013-05-19 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  senko
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by derega):

 PR 1134 breaks current functionality. If the list of files is generated
 with a script this now bails out on first not found file. It might be a
 good idea, but nonetheless it is backward incompatible change.

 I think it would be better to just list the not found files and continue.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2013-05-18 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  senko
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by senko):

 * needs_better_patch:  1 => 0
 * needs_tests:  1 => 0


Comment:

 @ptone: that would still hide an error when you specify a single fixture
 (but not an absolute path), eg: ./manage.py loaddata myfixture.json (it's
 not an absolute path and wouldn't register here).

 Reading the source, it seems to me that the name "initial_data" is special
 to Django (syncdb and flush hardcode it), so a solution I tried was to not
 raise the CommandError if the fixture name is "initial_data". I don't like
 the part that it's now hardcoded in another place - is there a good place
 to put this in, except settings (since we probably don't want it to be
 user-settable).

 Another possible solution would be to raise the error unconditionally and
 catch it in flush/syncdb, but that would catch *any* CommandError loaddata
 might raise, which is again probably not what we want.

 Based on the above, I think this approach makes sense - here's a pull
 request with a fix and updated tests for it:
 https://github.com/django/django/pull/1134

 Please let me know if this makes sense.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2013-05-18 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  senko
 Type:  Bug  |   Status:  assigned
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  1
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by senko):

 * owner:  nobody => senko
 * status:  new => assigned


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2012-10-06 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  1
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-

Comment (by d1ffuz0r):

 Hmm. Every time the commands "loaddata" and "flush" trying to load the
 'initial_data' fixture, how be with it. Ignore? Because that be generate
 the errors. Setup  "--no-initial-data" default value to False can break
 backward compatibilities

 django/core/management/commands/syncdb.py:
 {{{
 # Load initial_data fixtures (unless that has been disabled)
 if load_initial_data:
 call_command('loaddata', 'initial_data', verbosity=verbosity,
  database=db, skip_validation=True)

 }}}


 
 Sorry for my English

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2012-10-05 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  1
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by ptone):

 * needs_better_patch:  0 => 1


Comment:

 I think we only want to raise an error when a single fixture file was
 specified no valid fixture files were found in a dir - which I believe
 means checking at this point:

 {{{
 if os.path.isabs(fixture_name):
 fixture_dirs = [fixture_name]
 }}}

 Since we have specified a single file - and it does not exist - raising an
 actual CommandError is probably what is desired.  The tests should check
 that this is raised using assertRaises.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2012-10-05 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by d1ffuz0r):

 * cc: d1fffuz0r@… (added)


Comment:

 bump

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2012-09-24 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  1|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by claudep):

 * needs_tests:  0 => 1


-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2012-09-23 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  1|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by dirigeant):

 * cc: dirigeant (added)
 * has_patch:  0 => 1


Comment:

 Please check attached patch for an easy fix.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2012-09-19 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
-+-
 Reporter:  sergzach |Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Management |  Version:  1.4
  commands)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:  loaddata |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by ptone):

 * needs_docs:   => 0
 * needs_better_patch:   => 0
 * component:  Core (Other) => Core (Management commands)
 * needs_tests:   => 0
 * stage:  Unreviewed => Accepted


Comment:

 While the "0 fixture(s)" is accurate - I agree a more helpful
 message/error could be displayed.

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Django] #18990: 'manage.py loaddata' does not report if the loading file does not exist

2012-09-19 Thread Django
#18990: 'manage.py loaddata' does not report if the loading file does not exist
--+--
 Reporter:  sergzach  |  Owner:  nobody
 Type:  Bug   | Status:  new
Component:  Core (Other)  |Version:  1.4
 Severity:  Normal|   Keywords:  loaddata
 Triage Stage:  Unreviewed|  Has patch:  0
Easy pickings:  0 |  UI/UX:  0
--+--
 In the next case the file '''ProductCategory2.json''' does not exist but
 the loaddata utility does not report about it. It reports that 0 objects
 installed from 0 fixtures instead.

 {{{
 v11162:/www/lavka/dargent# python manage.py loaddata
 /root/models/ProductCategory2.json
 Installed 0 object(s) from 0 fixture(s)
 }}}

 There are files in /root/lavka/:


 {{{
 v11162:/www/lavka/dargent# ls /root/models/
 Country.json  Producer.json  ProductCategory.json
 }}}

-- 
Ticket URL: 
Django 
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.