Re: [Django] #5931: __repr__ for db Fields

2011-05-03 Thread Django
#5931: __repr__ for db Fields
-+-
   Reporter:  Thomas |  Owner:  nobody
  Güttler  | Status:  closed
   Type: |  Component:  Database layer
  Cleanup/optimization   |  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution:  fixed  |  Has patch:  1
   Triage Stage:  Ready for  |Needs tests:  0
  checkin|  Easy pickings:  1
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by jezdez):

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


Comment:

 In [16145]:
 {{{
 #!CommitTicketReference repository="" revision="16145"
 Fixed #5931 -- Added __repr__ to db fields. Thanks, Thomas Güttler,
 emulbreh and magopian.
 }}}

-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5931: __repr__ for db Fields

2011-05-01 Thread Django
#5931: __repr__ for db Fields
-+-
   Reporter:  Thomas |  Owner:  nobody
  Güttler  | Status:  new
   Type: |  Component:  Database layer
  Cleanup/optimization   |  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Ready for  |Needs tests:  0
  checkin|  Easy pickings:  1
Needs documentation:  0  |
Patch needs improvement:  0  |
-+-
Changes (by aaugustin):

 * stage:  Accepted => Ready for checkin


-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5931: __repr__ for db Fields

2011-05-01 Thread Django
#5931: __repr__ for db Fields
-+-
   Reporter:  Thomas |  Owner:  nobody
  Güttler  | Status:  new
   Type: |  Component:  Database layer
  Cleanup/optimization   |  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  1
Patch needs improvement:  0  |
-+-
Changes (by magopian):

 * needs_better_patch:  1 => 0


Comment:

 I understand now ;) thanks for the feedbacks and comments!

 I've attached an updated patch, with the additional test and the specific
 case for the Field instantiated without a name.

 Please let me know if this needs further improvements!

-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5931: __repr__ for db Fields

2011-04-30 Thread Django
#5931: __repr__ for db Fields
-+-
   Reporter:  Thomas |  Owner:  nobody
  Güttler  | Status:  new
   Type: |  Component:  Database layer
  Cleanup/optimization   |  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  1
Patch needs improvement:  1  |
-+-

Comment (by julien):

 That said, I also think that ``
 would be rather confusing. If the field doesn't have a name, then simply
 displaying `` would be preferable in my
 opinion.

-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5931: __repr__ for db Fields

2011-04-30 Thread Django
#5931: __repr__ for db Fields
-+-
   Reporter:  Thomas |  Owner:  nobody
  Güttler  | Status:  new
   Type: |  Component:  Database layer
  Cleanup/optimization   |  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  1
Patch needs improvement:  1  |
-+-

Comment (by julien):

 Replying to [comment:7 claudep]:
 > I think that Julien's comment was referring to a test like:
 >
 > {{{
 > from django.db.model.fields import CharField
 > my_field = CharField()
 > repr(my_field)
 > }}}
 >
 > that should reveal the None value in place of the name.

 That's correct. There's nothing preventing you from using a `Field` on its
 own, hence the "`getattr(self, 'name', None))`" in the patch ;)

-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5931: __repr__ for db Fields

2011-04-30 Thread Django
#5931: __repr__ for db Fields
-+-
   Reporter:  Thomas |  Owner:  nobody
  Güttler  | Status:  new
   Type: |  Component:  Database layer
  Cleanup/optimization   |  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  1
Patch needs improvement:  1  |
-+-
Changes (by claudep):

 * needs_better_patch:  0 => 1


Comment:

 I think that Julien's comment was referring to a test like:

 {{{
 from django.db.model.fields import CharField
 my_field = CharField()
 repr(my_field)
 }}}

 that should reveal the None value in place of the name.

-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5931: __repr__ for db Fields

2011-04-30 Thread Django
#5931: __repr__ for db Fields
-+-
   Reporter:  Thomas |  Owner:  nobody
  Güttler  | Status:  new
   Type: |  Component:  Database layer
  Cleanup/optimization   |  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  1
Patch needs improvement:  0  |
-+-
Changes (by magopian):

 * cc: mathieu.agopian@… (added)
 * needs_better_patch:  1 => 0


Comment:

 Here is an updated patch that applies on the current trunk.

 I believe there's no way a {{{django.db.models.fields.Field}}} won't have
 a name anymore though.

-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5931: __repr__ for db Fields

2011-04-29 Thread Django
#5931: __repr__ for db Fields
-+-
   Reporter:  Thomas |  Owner:  nobody
  Güttler  | Status:  new
   Type: |  Component:  Database layer
  Cleanup/optimization   |  (models, ORM)
  Milestone: |   Severity:  Normal
Version:  SVN|   Keywords:
 Resolution: |  Has patch:  1
   Triage Stage:  Accepted   |Needs tests:  0
Needs documentation:  0  |  Easy pickings:  1
Patch needs improvement:  1  |
-+-
Changes (by julien):

 * needs_better_patch:  0 => 1
 * easy:   => 1


Comment:

 This looks great but it'd be even better if the tests also covered the
 0.001% of use cases (i.e. when the field does not have a name)  :-)

-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #5931: __repr__ for db Fields

2009-10-25 Thread Django
#5931: __repr__ for db Fields
---+
  Reporter:  Thomas Güttler   | Owner:  
nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Changes (by anonymous):

  * needs_better_patch:  1 => 0

-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---



Re: [Django] #5931: __repr__ for db Fields

2008-12-15 Thread Django
#5931: __repr__ for db Fields
---+
  Reporter:  Thomas Güttler   | Owner:  
nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Accepted  | Has_patch:  1 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  1 |  
---+
Changes (by mtredinnick):

  * needs_better_patch:  0 => 1
  * stage:  Design decision needed => Accepted

Comment:

 Seems reasonable. However, the test doesn't show that it works as
 expected. It shows that when you use a field in a completely non-standard
 fashion (outside of a model), it reports None. That's maybe 0.001% of the
 normal use-cases. Testing the other 99%+ would be ideal. :-)

-- 
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 this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---