Reputation: 2038
I'm working on a Django project for a large organization, and the full app will be for internal, private use, while a subset of the view functions and templates will also need to be available publicly. Due to IT constraints, the public portion will be on a different server, and won't be able to use the same files (but it will be able to query the database on the private server).
Is there a way to maintain a subset of the app's files on a separate server?
For example, if the private version has view functions a, b, and c, the public version will only use c. And the public version will only need the relevant template files, etc.
Does Django have some way of accomplishing this? Or Git, somehow (maybe gitignore)? I'm just trying to save myself from having to manually copy all updates from the full version to the partial version.
Upvotes: 1
Views: 44
Reputation: 1649
This is the type of thing that Django's app structure is for. You could make the shared functionality a standalone pluggable app, managed as its own git repository. The projects that depend on it can include it in their requirements.txt and settings files. When you update the shared functionality, you increment the project version, and then update the requirements files.
Upvotes: 1