Re: [Django] #31313: Error in Example in Model field reference > Field.choices > Enumeration types

2020-02-26 Thread Django
#31313: Error in Example in Model field reference > Field.choices > Enumeration
types
-+-
 Reporter:  Lee Hopkins  |Owner:  Andrey
 Type:   |  Doroschenko
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  3.0
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Mariusz Felisiak ):

 In [changeset:"59ac25c93b228cd4ef34d4f36fbfbab3d9f6b4ad" 59ac25c9]:
 {{{
 #!CommitTicketReference repository=""
 revision="59ac25c93b228cd4ef34d4f36fbfbab3d9f6b4ad"
 [3.0.x] Fixed #31313 -- Fixed is_upperclass() example in enumeration types
 docs.

 Backport of f1016814d84b1423cfe0df85644c9870a6bc6b41 from master
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.ef40491333d7fdc4f57439df02dad3b9%40djangoproject.com.


Re: [Django] #31313: Error in Example in Model field reference > Field.choices > Enumeration types

2020-02-26 Thread Django
#31313: Error in Example in Model field reference > Field.choices > Enumeration
types
-+-
 Reporter:  Lee Hopkins  |Owner:  Andrey
 Type:   |  Doroschenko
  Cleanup/optimization   |   Status:  closed
Component:  Documentation|  Version:  3.0
 Severity:  Release blocker  |   Resolution:  fixed
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak ):

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


Comment:

 In [changeset:"f1016814d84b1423cfe0df85644c9870a6bc6b41" f101681]:
 {{{
 #!CommitTicketReference repository=""
 revision="f1016814d84b1423cfe0df85644c9870a6bc6b41"
 Fixed #31313 -- Fixed is_upperclass() example in enumeration types docs.
 }}}

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.8d717cbde0411eccf0f35af1fd8c388b%40djangoproject.com.


Re: [Django] #31313: Error in Example in Model field reference > Field.choices > Enumeration types

2020-02-26 Thread Django
#31313: Error in Example in Model field reference > Field.choices > Enumeration
types
-+-
 Reporter:  Lee Hopkins  |Owner:  Andrey
 Type:   |  Doroschenko
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  3.0
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Ready for
 |  checkin
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * 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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.74bb10321ed0c98cf94a934eac0470b8%40djangoproject.com.


Re: [Django] #31313: Error in Example in Model field reference > Field.choices > Enumeration types

2020-02-26 Thread Django
#31313: Error in Example in Model field reference > Field.choices > Enumeration
types
-+-
 Reporter:  Lee Hopkins  |Owner:  Andrey
 Type:   |  Doroschenko
  Cleanup/optimization   |   Status:  assigned
Component:  Documentation|  Version:  3.0
 Severity:  Release blocker  |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by felixxm):

 * owner:  nobody => Andrey Doroschenko
 * status:  new => assigned
 * severity:  Normal => Release blocker


Comment:

 [https://github.com/django/django/pull/12499 PR]

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.762b107c31c6b419a121562b4eedff00%40djangoproject.com.


Re: [Django] #31313: Error in Example in Model field reference > Field.choices > Enumeration types

2020-02-26 Thread Django
#31313: Error in Example in Model field reference > Field.choices > Enumeration
types
--+
 Reporter:  Lee Hopkins   |Owner:  nobody
 Type:  Cleanup/optimization  |   Status:  new
Component:  Documentation |  Version:  3.0
 Severity:  Normal|   Resolution:
 Keywords:| Triage Stage:  Accepted
Has patch:  1 |  Needs documentation:  0
  Needs tests:  0 |  Patch needs improvement:  0
Easy pickings:  0 |UI/UX:  0
--+
Changes (by Simon Charette):

 * has_patch:  0 => 1
 * type:  Uncategorized => Cleanup/optimization
 * stage:  Unreviewed => Accepted


-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.75b4065a29c1f143b023c6c31dd3c7c0%40djangoproject.com.


[Django] #31313: Error in Example in Model field reference > Field.choices > Enumeration types

2020-02-26 Thread Django
#31313: Error in Example in Model field reference > Field.choices > Enumeration
types
-+
   Reporter:  lhopkins   |  Owner:  nobody
   Type:  Uncategorized  | Status:  new
  Component:  Documentation  |Version:  3.0
   Severity:  Normal |   Keywords:
   Triage Stage:  Unreviewed |  Has patch:  0
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+
 The example in the new Field.choices Enumeration types documentation has
 an error:

 {{{
 class Student(models.Model):

 class YearInSchool(models.TextChoices):
 FRESHMAN = 'FR', _('Freshman')
 SOPHOMORE = 'SO', _('Sophomore')
 JUNIOR = 'JR', _('Junior')
 SENIOR = 'SR', _('Senior')
 GRADUATE = 'GR', _('Graduate')

 year_in_school = models.CharField(
 max_length=2,
 choices=YearInSchool.choices,
 default=YearInSchool.FRESHMAN,
 )

 def is_upperclass(self):
 return self.year_in_school in {YearInSchool.JUNIOR,
 YearInSchool.SENIOR}
 }}}

 The method `is_upperclass()` attempts to access the `YearInSchool` class
 directly, but cannot. The method should be:

 {{{
 def is_upperclass(self):
 return self.year_in_school in {self.YearInSchool.JUNIOR,
 self.YearInSchool.SENIOR}
 }}}

 or:

 {{{
 def is_upperclass(self):
 return self.year_in_school in {Student.YearInSchool.JUNIOR,
 Student.YearInSchool.SENIOR}
 }}}

 https://docs.djangoproject.com/en/3.0/ref/models/fields/#enumeration-types

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.8e5943e058270a73ea334b53a3980bd6%40djangoproject.com.