Code

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5896 closed (invalid)

initial SQL pathname incorrect in doc

Reported by: smoonen@… Owned by: nobody
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

On the "model-api" documentation page, the pathname in the section "Providing initial SQL data" is incorrect. It references "app / sql / model.sql", but judging from the code the correct path is "app / model / sql / object.sql".

Attachments (1)

5896.diff (2.1 KB) - added by arien <regexbot@…> 7 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 7 years ago by arien <regexbot@…>

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

django.core.management.sql.custom_sql_for_model says it's one of:

  • <appname>/<modelname>.<settings.DATABASE_ENGINE>.sql
  • <appname>/<modelname>.sql

Changed 7 years ago by arien <regexbot@…>

comment:2 Changed 7 years ago by arien <regexbot@…>

  • Has patch set
  • Triage Stage changed from Accepted to Ready for checkin

comment:3 Changed 7 years ago by mtredinnick

  • Resolution set to invalid
  • Status changed from new to closed

There's no bug here.

We test the current behaviour in regressiontests/initial_sql_regress/ (although that test doesn't completely validate that the initial SQL is executed, you can check that by putting a syntax error in the file). Note that app_dir in the method arien points to has "sql" on the end of it. So <app_dir>/sql is the correct location.

comment:4 Changed 7 years ago by arien <regexbot@…>

The os.path.join(..., 'sql') slipped by me. The variable name 'app_dir' is somewhat misleading in this context, but you are right, there's no real bug here. Sorry about that. :-)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.