Giter VIP home page Giter VIP logo

django-project-package-template's People

Contributors

benjaoming avatar keimlink avatar pyup-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

benjaoming

django-project-package-template's Issues

Suggestion to restructure conf package and remove envparse

Hi @keimlink

Thanks for the project :) I learned a lot, and I really like it!

I know that I can just go and create my own flavor, but maybe it would be much more fun to discuss the approaches, and if you like, I don't mind adding a PR.

I would consider the template for the following purpose:

To bootstrap a simple and easily readable Django project based on best practices, avoiding patterns that some larger quantity of users would want to refactor afterwards.

I would consider the following:

  1. Remove envparse. My own reason is that it entangles development and production settings. I would much prefer to have settings.development and settings.production (possibly add settings.local to the .gitignore template). This way, settings become a lot easier to read and overwrite. The manage.py script has the --settings option, making it easy to switch between settings.

  2. Move urls and wsgi up a level, for me they are not "configuration" any more than the whole project is then a configuration of sorts.

  3. Rename conf to settings.

Here is a pattern that is quite similar to what I mean:

https://django-best-practices.readthedocs.io/en/latest/projects.html#handling-urlconfs-for-multiple-environments

I was once writing a project where we actually included the bootstrapping of settings.local in our manage.py, such that new users couldn't avoid having it created when it didn't exist and then seeing that it existed and contained their secrets.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.