wemake-services / wemake-django-template Goto Github PK
View Code? Open in Web Editor NEWBleeding edge django template focused on code quality and security.
Home Page: https://wemake-django-template.rtfd.io
License: MIT License
Bleeding edge django template focused on code quality and security.
Home Page: https://wemake-django-template.rtfd.io
License: MIT License
We need to create the document for closing a project (ltd)
Would our template benefit from moving apps into server/apps/
directory?
I can see several benefits:
coverage
and pylint
setup.py
Cons:
django
structureSubtasks:
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;"
Here's how it should work:
cookiecutter
clidocker-compose
is spawned to run all tests inside this new projectAfter 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
When installing docker
setting to n
it really does not change anything:
docker/
folderdocker-compose.yml
and .dockerignore
I would really like to get some support from @lk-geimfari
What needs to be done:
django-rest-framework
#40mimesis
journald
or syslog
https://docs.docker.com/compose/compose-file/#logging
https://github.com/jazzband/silk/
Consider adding it alongside with drf
and an example application.
Right now radon
is a special beast. But it can be integrated into flake8
linting with
Here's a good example: https://github.com/magfest/ubersystem-deploy/blob/master/README-pycharm.md
There are two options:
Dockerfile
docker-compose.yml
We need to investigate which one is better.
Docs:
Pluggable app for django
: https://github.com/KristianOellegaard/django-health-check
Good tutorial: http://codeblog.dotsandbrackets.com/docker-health-check/
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.
Add PYTHONHASHSEED="random"
to Dockerfile
Should we add explicit note about using overlay2
(or maybe other?) as a default driver for docker
?
https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/
We should also document why using this driver will benefit your project.
https://docs.docker.com/engine/swarm/secrets/#defining-and-using-secrets-in-compose-files
https://docs.docker.com/compose/compose-file/#short-syntax-2
It would be also nice to provide an example with PG_PASSWORD
variable.
I have never used it before, but this issue looks promising:
docker/compose#2092
I will need to add a django-rest-framework
example with jwt
auth.
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! ๐ค
We need to test the most complex example:
It would be also nice to:
This can be achieved with https://github.com/hackebrot/pytest-cookies
Right now we are serving static files from django
.
That's not a right way to do it.
We need to use:
For some reason I have now started to receive segmentation fault errors in development. It does not happen all the time. Just happens at some unpredictable cases.
I have found two solutions (hacks):
--noreload
option to runserver
commandimport threading; threading.stack_size(2*1024*1024) # noqa
to the top level of manage.py
Waiting this issue to be fixed: https://bugs.alpinelinux.org/issues/8134
Also related: docker-library/python#211
Right now pipenv
is broken.
Just delete www.
part in Caddyfile
.
It will make it easier to integrate this stack with heroku.
And it might be useful, since we deploy to heroku sometimes.
A fabric
maybe?
There are some neat libraries:
Our next big milestone is to bring mypy
support for all our projects.
Things that needs to be done:
mypy
by defaultdjango
and other tools we useIt'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
Maybe, we should add restart: always
to the docker-compose.prod.yml
.
Now we are using restart-policy
. But this only works with swarm
.
Need to state this in docs.
Should it be included?
I guess, right now it is way too complex to implement and maintain.
https://www.youtube.com/watch?v=CteZol_7pxo&feature=youtu.be
https://about.gitlab.com/features/review-apps/
Right now security is configured in different places across the settings package.
Tasks:
django-security
django-csp
Deeper dive required: https://docs.docker.com/engine/security/trust/content_trust/#push-trusted-content
We will need this setting to be able to ping localhost
for health checks.
Related #27
We should include:
In the productions settings we are missing:
For some reason Pipfile
misses https://pypi.python.org/pypi/flake8-docstrings
Right now pipenv
is broken.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.