[Django] #26312: Tutorial Part 5 should warn about possible db errors when running your first test

3 views
Skip to first unread message

Django

unread,
Mar 3, 2016, 9:09:21 AM3/3/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
-------------------------------+----------------------
Reporter: UltraBob | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords: tutorial
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+----------------------
When you run your first test as instructed in
https://docs.djangoproject.com/en/1.9/intro/tutorial05/#running-tests you
may run into an error something like {{{Got an error creating the test
database: (1044, "Access denied for user 'user'@'host' to database
'test_db_name'")}}}. For a reader not paying close attention, it is easy
to miss that django is attempting to create an entirely new database, and
the tutorial doesn't mention it. If you had set up a mysql database and
user with privileges just for your django database, then you will see this
error. It would be good if the tutorial mentioned that django will create
a new test database and that if django's mysql connection doesn't have
permission to create a new database, you'll need to create one for it and
grant the necessary priviledges.

--
Ticket URL: <https://code.djangoproject.com/ticket/26312>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Mar 3, 2016, 9:31:38 AM3/3/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
Keywords: tutorial | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* type: Uncategorized => Cleanup/optimization
* needs_tests: => 0
* needs_docs: => 0


Comment:

I think I'd rather put the advice in tutorial 2 "Database setup". Since
most new users probably use SQLite, it would be nice to avoid another
special call out for others where we already have one in tutorial 2 (also
it's likely easier to do all your database configuration once). Feel free
to submit a patch if you can.

--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:1>

Django

unread,
Mar 3, 2016, 8:38:07 PM3/3/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: UltraBob
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: tutorial | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by UltraBob):

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


Comment:

A patch for this is available at
https://github.com/UltraBob/django/tree/ticket_26312

--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:2>

Django

unread,
Mar 3, 2016, 8:38:41 PM3/3/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: UltraBob
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: tutorial | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by UltraBob):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:3>

Django

unread,
Mar 4, 2016, 2:53:21 AM3/4/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: UltraBob
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: tutorial | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by MoritzS):

Just create a pull request, it's easier to review that way.

--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:4>

Django

unread,
Mar 4, 2016, 10:04:39 AM3/4/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: UltraBob
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: tutorial | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1


Comment:

Created a [https://github.com/django/django/pull/6241 PR] and left
comments for improvement.

--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:5>

Django

unread,
Mar 4, 2016, 10:03:44 PM3/4/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: UltraBob
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 1.9

Severity: Normal | Resolution:
Keywords: tutorial | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by UltraBob):

* cc: django@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:6>

Django

unread,
Mar 5, 2016, 9:09:51 AM3/5/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: UltraBob
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed

Keywords: tutorial | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"b388c294eb5745b3e01dedf0220636fae87ea9a2" b388c294]:
{{{
#!CommitTicketReference repository=""
revision="b388c294eb5745b3e01dedf0220636fae87ea9a2"
Fixed #26312 -- Documented "create database" requirement in tutorial 2.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:7>

Django

unread,
Mar 5, 2016, 9:10:08 AM3/5/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: UltraBob
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: tutorial | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"e16a0b0998e456d011327a28ce68ba8afbddfa9a" e16a0b0]:
{{{
#!CommitTicketReference repository=""
revision="e16a0b0998e456d011327a28ce68ba8afbddfa9a"
[1.9.x] Fixed #26312 -- Documented "create database" requirement in
tutorial 2.

Backport of b388c294eb5745b3e01dedf0220636fae87ea9a2 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:8>

Django

unread,
Mar 5, 2016, 10:59:38 AM3/5/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: UltraBob
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: tutorial | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"9ed4a788aa8d6ba6a57a2daa15253c3047048dfb" 9ed4a788]:
{{{
#!CommitTicketReference repository=""
revision="9ed4a788aa8d6ba6a57a2daa15253c3047048dfb"
Refs #26312 -- Reworded tutorial 2 to avoid spelling "error".
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:9>

Django

unread,
Mar 5, 2016, 10:59:53 AM3/5/16
to django-...@googlegroups.com
#26312: Tutorial Part 5 should warn about possible db errors when running your
first test
--------------------------------------+------------------------------------
Reporter: UltraBob | Owner: UltraBob
Type: Cleanup/optimization | Status: closed
Component: Documentation | Version: 1.9

Severity: Normal | Resolution: fixed
Keywords: tutorial | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"72134a04004271a0bd3e853cca3f54f9efc68be2" 72134a04]:
{{{
#!CommitTicketReference repository=""
revision="72134a04004271a0bd3e853cca3f54f9efc68be2"
[1.9.x] Refs #26312 -- Reworded tutorial 2 to avoid spelling "error".

Backport of 9ed4a788aa8d6ba6a57a2daa15253c3047048dfb from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26312#comment:10>

Reply all
Reply to author
Forward
0 new messages