Haystack register guarded by "settings.TESTING". How do I do that in haystack 2.X -


I understand that everything in 2.X is in the manage.py phase with the hosstack and therefore the site. Registration is no longer required. Some register statements from codebase have been preserved by check for settings.TESTING and there is nothing. How I Template 2.x?

with how this effect can affect (this is not a real answer ). I have not used the old site. I'm guessing a little bit about what I am trying to do. With those warnings ...

There is a possibility that two are indexed, one for testing and one in your default form. Do you add or exclude by the settings. Really telling? Migration documents specify an EXCLUDED_INDEXES setting which you can use in your backend definitions, so if you have some expensive / unnecessary indexes, then they can go to a separate search index file / module and then from your test backend. Can be excluded. You can use your test and other files with default index in a common file.

With the above, you will also need to mess with routing so that the right backend can be used during the trial. Another possibility is to simply define "real" defaults in your main settings, then, in a test_settings file, override the heap pile connection with your test setup by default (including EXCLUDED_INDEXES). Then you do not need to sprinkle your tests with the use of ('test').

Perhaps a good read can happen if you have not already tried to work your stay 80 times;)


Comments