문제

I want to write django custom backend for search functionality of my site (using mysql match against query / fulltext search), so where should I write it? Should I write it in model of a new separate app. ? Or should I write it in some existing app. or should write it in some existing apps' model?

I am not much experienced in django and have never write any backend before. I know it can be done anyway, but I want to know what is recommended way.I assume it will be usable in other projects or apps also.

thanks

도움이 되었습니까?

해결책

Just put it in your app that requires your middleware. Or create a django app that holds all your middlewares.

다른 팁

Your backend is normal Python code, and just like other Python modules the files can live anywhere. As long as you are able to import it using the Python shell, django can use it.

In other words as long as it is in PYTHONPATH, then your applications can use it.

It does not need to be part of an app or a project.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top