Sunday, June 26, 2016

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

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?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6a501b35-8ff9-454f-ada7-9721d528b394%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment