inconsistent namespacing for fixture files vs. template files (and everything else)?

20 views
Skip to first unread message

Daniel Brotsky

unread,
Jun 26, 2016, 8:22:38 PM6/26/16
to Django users
In the Django code wiki topic on Fixtures, there is a recommendation to "namespace" fixture files for an app by using the app name as a prefix in the filename (the example given is myapp/fixtures/myapp_testdata.json).  But the Django tutorial on templates suggests "namespacing" templates using a parent folder named for the app (the example given is polls/templates/polls/index.html).  I am writing some code that's trying to do generic template and fixture manipulation, and I am finding the fixture recommendation to be problematic for a number of reasons (variability in the separator character, ambiguity when it appears in the fixture file name, etc.).  Does anyone know the reason for the inconsistent recommendation?  I have found that using the subfolder convention works just fine with loaddata and fixture files (for example, loaddata myapp/fixture.json works as well as loaddata myapp_fixture.json), but I am worried that there is some other issue that I am missing.  If not, Is there any chance of getting the Django code wiki altered to bless the foldering convention as well as the prefix convention?
Reply all
Reply to author
Forward
0 new messages