Which name need the sql-file in the sql folder? When I want to load custom sql for the User Model.
Asked
Active
Viewed 297 times
1 Answers
0
From the link you provided :
The hook is simple: Django just looks for a file called sql/modelname
.sql, in your app directory, where modelname
is the model's name in lowercase.
So, if you had a Person model in an app called myapp, you could add arbitrary SQL to the file sql/person.sql inside your myapp directory. Here's an example of what the file might contain:

DanielB
- 2,798
- 1
- 19
- 29
-
I know but I currently try to load custom sql for the django auth User model – Azd325 Jun 27 '12 at 11:25
-
Ah, I see - sorry. Have a look at [this](http://stackoverflow.com/questions/2412328/how-to-load-sql-fixture-in-django-for-user-model) – DanielB Jun 27 '12 at 11:35