cookiecutter-djangopackage | cookiecutter template
kandi X-RAY | cookiecutter-djangopackage Summary
kandi X-RAY | cookiecutter-djangopackage Summary
A cookiecutter template for creating reusable Django packages quickly.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a new release
- build docs .
- Removes the example project .
- Run coverage tests .
- Remove . pyc files .
- Clean build files
- Clean up build files .
- Open a web browser .
- Test all tests .
- Run lint tests .
cookiecutter-djangopackage Key Features
cookiecutter-djangopackage Examples and Code Snippets
Community Discussions
Trending Discussions on cookiecutter-djangopackage
QUESTION
I am working on a Django project that is separated into 5 apps (each have 3-6 models). As a whole, this project is definitely something I would reuse in other projects, but it would only be useful if it included all the apps because they are intrinsically related.
Therefore, I want to package this project to make it reusable following the Django docs and Django cookiecutter django package. However, these examples show only how to package with a single app.
From what I have read there are a few options:
- Make 5 packages
- Make one app with 30 models and convert models.py into a module
- Make a package with 5 apps (Similar to how django-allauth is setup)
I am planning on using option 3 because I think option 1 is overkill and option 2 is considered bad practice (See this post and this post). The issue I see with option 3 is that then a project that uses this package would have to install all 5 apps in INSTALLED_APPS
like so:
ANSWER
Answered 2017-Nov-09 at 13:47If the apps are very coupled and can only be used together, IMO makes no sense to have them in different packages. So option 3 is the answer: put them all in a single package installable via setup.py
if it's private, or publish on pip
if it's public.
Shameless plug: for other advice related to Django apps, you might be interested in my "Your Django app is a User Interface" talk: https://www.youtube.com/watch?v=Mnzvjn1v1CY (slides here)
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cookiecutter-djangopackage
You can use cookiecutter-djangopackage like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page