Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shared library between multiple Django projects?

If I have 2 Django apps, how could I share a common library between both? I was thinking about a third library project, that I shortcut to in the other 2 projects locally, & on production replace the shortcut with the whole Library folder. would something like this work? and if so, how would I switch out the shortcut for the actual folder on release?

like image 945
be2213444 Avatar asked Apr 22 '26 15:04

be2213444


1 Answers

I reckon you want to share code among apps on different servers.

There are 2 methods you can use to achieve that:

  1. Publish it to PyPI (Public)
  2. Use it from your Github (Private)

Publishing to PyPI:

Read and follow this article

Use it from your github:

Follow the above(Publishing to PyPI) article till the publishing part. After that follow this article.

like image 133
No blyat Avatar answered Apr 24 '26 04:04

No blyat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!