Sometimes we need to customized 3rd-party python modules and integrated with our Django. There are several options, but what i use here is the best for most cases. We should keep them separated from django and treat as python modules which we can install using “pip install”.
Here is the solution, first we need to have github or bitbucket account. Fork and modify 3rd-party modules and hosted into your account.
Some example, i’ve django-pagination-bootstrap modified. So, i put into :
1 | https://bitbucket.org/polatic/django-bootstrap-pagination |
In requirement.txt, we just need to put zip link :
1 | https://bitbucket.org/polatic/django-bootstrap-pagination/get/master.zip |
That’s it. Remember, we can do pip install on zip file.