#28653: Error in making queries example in documentation
--------------------------------------------+------------------------
               Reporter:  Stefan Schneider  |          Owner:  nobody
                   Type:  Bug               |         Status:  new
              Component:  Documentation     |        Version:  master
               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                 |
--------------------------------------------+------------------------
 There's a second required argument needed for `Foreign Key` fields:
 `on_delete`
 . Since 1.11 not providing the argument gives an `Deprecation Warning` but
 since 2.0 it's required and gives an error if not provieded

 In the documentation for
 [https://docs.djangoproject.com/en/dev/topics/db/queries/ Making Queries]
 the example doesn't provide the `on_delete` argument.

 {{{
 class Entry(models.Model):
     blog = models.ForeignKey(Blog)
 }}}
 should be:
 {{{
 class Entry(models.Model):
     blog = models.ForeignKey(Blog, on_delete='CASCADING')
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28653>
Django <https://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 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/047.3d24d47fdb5e6888367d540c6ddadc71%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to