Giter VIP home page Giter VIP logo

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

View Code? Open in Web Editor NEW
2.0K 35.0 216.0 6.56 MB

Bleeding edge django template focused on code quality and security.

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

License: MIT License

Python 76.33% Shell 13.95% Makefile 1.07% Dockerfile 6.57% Batchfile 1.42% CSS 0.66%
django docker caddy gitlab-ci pytest cookiecutter-template python python3 cookiecutter mypy

wemake-django-template's Issues

Act of Handover

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

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

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;"

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

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

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.

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! ๐Ÿค–

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

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 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

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

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.

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.