How can I convert a Django Project into a Django application inside my own project?

Viewed 136

I have found a Django project who's purpose is to send emails to subscribers and it is divided into several applications but I view this project as an application and want to include it in my own project. What are the minimal steps to convert that project into an app ?

1 Answers

Create a new app inside your existing project, then create a unique file for each resource type by grouping the target project's app files together (e.g. put all models in one file). To create a unique urls file you need to use absolute paths. For templates create new folders in your static dir or inserts them in existing one (but folder structures must match). For migrations put them in a unique folder inside your app. You need to update your project settings to match those of the target project (especially for custom settings). Update dependencies to contain those of the target project. Depending on the target project you will also need some redesign.

Otherwise you can extract only the resources you are interested in and use them in your project with some modifications.

Related