Git Product home page Git Product logo

wemake-services / wemake-django-template Goto Github PK

View Code? Open in Web Editor NEW
1.9K 34.0 211.0 5.34 MB

Bleeding edge django template focused on code quality and security.

Home Page: https://wemake-django-template.rtfd.io

License: MIT License

Python 76.63% Shell 13.67% Makefile 1.10% Dockerfile 6.48% Batchfile 1.44% CSS 0.68%
django docker caddy gitlab-ci pytest cookiecutter-template python python3 cookiecutter mypy

wemake-django-template's Introduction

wemake-django-template

wemake.services Awesome Build status Documentation Status Dependencies Status wemake-python-styleguide

Bleeding edge django4.2 template focused on code quality and security.


Purpose

This project is used to scaffold a django project structure. Just like django-admin.py startproject but better.

Features

Installation

Firstly, you will need to install dependencies.

The recommended way is via pipx:

pipx install cookiecutter
pipx inject cookiecutter jinja2-git

Or via global pip:

pip install cookiecutter jinja2-git

Then, create a project itself:

cookiecutter gh:wemake-services/wemake-django-template

Who is using this template?

If you use our template, please add yourself or your company in the list.

Here's a nice list of real-life open-source usages of this template.

License

MIT. See LICENSE for more details.

wemake-django-template's People

Contributors

alisher-matkurbanov avatar alwxsin avatar andreyermilov avatar apt-ma avatar arfey avatar chexex avatar damienallen avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar dmytrolitvinov avatar ffedoroff avatar folt avatar hiyorimi avatar jackton1 avatar mazlum avatar monosans avatar mschoettle avatar oxyum avatar pakal avatar proha avatar pujitm avatar pyup-bot avatar radzak avatar renovate[bot] avatar serzh-unknown avatar sgaynetdinov avatar sobolevn avatar wwarne avatar xgmsx avatar

Stargazers

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

Watchers

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

wemake-django-template's Issues

Add mypy

Our next big milestone is to bring mypy support for all our projects.

Things that needs to be done:

  • Installing mypy by default
  • Adding typehints everywhere
  • Installing stubs for django and other tools we use

Add pylint for reports

pylint is quite brutal for CI process, but generating artifacts on the job is nice.
It allows to view all the stats about our code base.

Possible restructure, create `server/apps/` directory

Would our template benefit from moving apps into server/apps/ directory?

I can see several benefits:

  • It would be easy to integrate coverage and pylint
  • It would be easy to ingrate setup.py
  • Cleaner directory structure

Cons:

  • Not a default django structure

Add integration tests with docker

Here's how it should work:

  • A new project is created via cookiecutter cli
  • A docker-compose is spawned to run all tests inside this new project

Add more info about pipenv install

After completing these steps

pip install pipsi
pipsi install pew
pipsi install pipenv

I can't execute

pipenv install -d

The result is :

command not found: pipenv

Use django-database-url

It will make it easier to integrate this stack with heroku.

And it might be useful, since we deploy to heroku sometimes.

Add tests

We need to test the most complex example:

  • local development works
  • development container works
  • production container works

It would be also nice to:

  • Run the default project's tests
  • Run the default project's style checks
  • Run the default project's QA

This can be achieved with https://github.com/hackebrot/pytest-cookies

Pre-commit hooks question

It's unclear how and when to use

pre-commit hooks

pre-commit install
pre-commit install -t commit-msg

They are described in Development process section

Update Documentation Info

The Given Info is a bit ambiguous for a newcomer.
It will be nice to add "Quick Start" Content , where all the steps are described.

Docker files are not removed

When installing docker setting to n it really does not change anything:

  • remove docs
  • docker/ folder
  • docker-compose.yml and .dockerignore

Caddy: switch to HSTS

https://caddyserver.com/docs/automatic-https

HTTP Strict Transport Security (HSTS) is a web security policy mechanism which helps to protect websites against protocol downgrade attacks and cookie hijacking. Enabling HSTS declares that web browsers should only interact with the server using a secure HTTPS connection, and never via an insecure HTTP connection. The policy specifies a period of time during which the server must be accessed in a secure fashion.

Caddy does not enable HSTS by default, because if you wish to use the domain without HTTPS, HSTS having been enabled and remembered by a browser means the browser will not allow connections to your server. HSTS should only be enabled in a production environment when you know that you won't want to disable HTTPS in the future. It can easily be enabled by adding the header below to your Caddyfile.

header / Strict-Transport-Security "max-age=31536000;"

Initial Update

Hi ๐Ÿ‘Š

This is my first visit to this fine repo, but it seems you have been working hard to keep all dependencies updated so far.

Once you have closed this issue, I'll create separate pull requests for every update as soon as I find one.

That's it for now!

Happy merging! ๐Ÿค–

Act of Handover

We need to create the document for closing a project (ltd)

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.