Bleeding edge django template focused on code quality and security.

Overview

wemake-django-template

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

Bleeding edge django2.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:

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.

We offer free email support for anyone who is using this. If you have any problems or questions, drop us a line at [email protected]. And we will try to help you.

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

License

MIT. See LICENSE for more details.

Comments
  • Make the Dockerfile multi-stage for dev and prod

    Make the Dockerfile multi-stage for dev and prod

    We thus separate what concerns python dependencies install, and the work-in-progress code to be mounted inside the VM.

    Having a COPY of the whole code and THEN a mountpoint on same folder is dangerous, because mount failure would be a silent error, and lead to hard-to-debug wrong behaviour.

    opened by pakal 12
  • Keeping Django database migrations backward compatible

    Keeping Django database migrations backward compatible

    After reading this post: https://medium.com/3yourmind/keeping-django-database-migrations-backward-compatible-727820260dbb

    Maybe we should add next libraries:

    • https://github.com/3YOURMIND/django-add-default-value
    • https://github.com/3YOURMIND/django-deprecate-fields
    • https://github.com/3YOURMIND/django-migration-linter
    feature dependencies pr-merged 
    opened by DmytroLitvinov 12
  • Update django to 2.2

    Update django to 2.2

    It is just released: https://docs.djangoproject.com/en/2.2/releases/2.2/

    Let's do it!

    • [x] Check libraries compatibility with django>=2.2
    • [ ] Upgrade source code at project
    feature dependencies python 
    opened by sobolevn 11
  • pytest not run

    pytest not run

    I launched a project. After creating the model, I'm trying to run tests. But I get an error.

    ERROR collecting server/apps/main/admin.py 
    server/apps/main/admin.py:12: in <module>
        admin.site.register(File, Dd)
    .venv/lib/python3.7/site-packages/django/contrib/admin/sites.py:110: in register
        raise AlreadyRegistered('The model %s is already registered' % model.__name__)
    E   django.contrib.admin.sites.AlreadyRegistered: The model File is already registered
    
    ERROR collecting server/apps/main/models.py 
    server/apps/main/models.py:28: in <module>
        class File(AbstractDefaultModel):
    .venv/lib/python3.7/site-packages/django/db/models/base.py:118: in __new__
        "INSTALLED_APPS." % (module, name)
    E   RuntimeError: Model class main.models.File doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
    

    my code models.py

    class AbstractDefaultModel(models.Model):
        is_active = models.BooleanField(
            verbose_name=_('is_active'),
            default=True)
    
        created_at = models.DateTimeField(
            verbose_name=_('created at'),
            auto_now_add=True)
    
        updated_at = models.DateTimeField(
            verbose_name=_('updated at'),
            auto_now=True)
    
        def __str__(self):
            return '{id}'.format(id=self.id)
    
        class Meta:
            abstract = True
    
    class File(AbstractDefaultModel):
        code = models.PositiveIntegerField(
            verbose_name='code',
            unique=True,
            editable=True)
    
        profile = models.CharField(
            verbose_name='name',
            max_length=100,
            blank=True,
            null=True)
    
        class Meta:
            verbose_name = 'file'
            verbose_name_plural = 'files'
    

    my code admin.py

    from server.apps.main.models import File
    class FileAdmin(admin.ModelAdmin):
        list_display = ['id', 'profile']
    
    admin.site.register(File, FileAdmin)
    
    pr-merged 
    opened by folt 10
  • Trying to run docker-compose build && docker-compose up gives an error:  test_project exited with code 127

    Trying to run docker-compose build && docker-compose up gives an error: test_project exited with code 127

    Trying to run docker-compose build && docker-compose up gives an error: test_project exited with code 127. I see ': No such file or directory'sh in the console output and since the error code 127 also is related to unknown command there seem to be something wrong with the dockerfile related to django.

    I'm testing this on Windows 10.

    pr-available pr-rejected 
    opened by weholt 10
  • Bump ipython from 7.31.0 to 8.0.0 in /{{cookiecutter.project_name}}

    Bump ipython from 7.31.0 to 8.0.0 in /{{cookiecutter.project_name}}

    Bumps ipython from 7.31.0 to 8.0.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies python 
    opened by dependabot[bot] 8
  • makemigrations permission denied.

    makemigrations permission denied.

    Hello,

    When I run in the following command in development mode.

    docker-compose -f docker-compose.yml -f docker-compose.dev.yml run --rm web python manage.py makemigrations
    

    I get in the following error; "Permission denied: '/code/server/apps/main/migrations/0002_blogpost_is_ok.py'"

    I'm using Linux.

    opened by mazlum 8
  • Database engine variables in a more general way

    Database engine variables in a more general way

    opened by folt 8
  • Bump flake8-pytest-style from 1.4.0 to 1.4.1 in /{{cookiecutter.project_name}}

    Bump flake8-pytest-style from 1.4.0 to 1.4.1 in /{{cookiecutter.project_name}}

    Bumps flake8-pytest-style from 1.4.0 to 1.4.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Automerge options (never/patch/minor, and dev/runtime dependencies)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies python 
    opened by dependabot-preview[bot] 7
  • Add note about `kira-setup`

    Add note about `kira-setup`

    We have this awesome little tool to setup Gitlab projects that perfectly matches this template. It is called kira-setup and it is a part of kira bots family.

    We can mention it in the docs. Maybe someone will find it useful. Link: https://github.com/wemake-services/kira-setup

    feature documentation 
    opened by sobolevn 7
  • Default site URL announced by docker should not be trusted

    Default site URL announced by docker should not be trusted

    Docker on start announces Starting development server at http://0.0.0.0:8000/. It is wrong and it is available under http://127.0.0.1:8000/. This should be reflected somewhere in documentation.

    bug documentation 
    opened by Hiyorimi 7
  • Update postgres Docker tag to v15

    Update postgres Docker tag to v15

    Mend Renovate

    This PR contains the following updates:

    | Package | Update | Change | |---|---|---| | postgres | major | 14-alpine -> 15-alpine |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 2
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    docker-compose
    {{cookiecutter.project_name}}/docker-compose.override.yml
    {{cookiecutter.project_name}}/docker-compose.yml
    • postgres 14-alpine
    {{cookiecutter.project_name}}/docker/docker-compose.prod.yml
    • caddy 2.6.2

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
  • Use `pytest-modified-env` plugin

    Use `pytest-modified-env` plugin

    Yesterday I found that a single django test case in my private project was modifying os.environ without a clean up.

    It was the root cause of flaky CI builds that happened like once a week (because of random test order).

    Now, this won't happen: https://github.com/wemake-services/pytest-modified-env

    opened by sobolevn 0
Releases(django-one)
  • django-one(Jun 5, 2019)

  • goodbye-pipenv(Nov 16, 2018)

    This is the last pipenv release.

    We do not want to maintain any it any further. We are switching to poetry on all our projects.

    See #549 for more details. See "Migration guide" for more information.

    Source code(tar.gz)
    Source code(zip)
Combine the power of FastAPI and Django to build a production-ready application capable of utilizing all of the best features of both worlds.

FastAPI and Django Combo This projects aims to combine FastAPI and Django to build a Production ready application capable of utilizing all of the feat

Nsikak Imoh 33 Dec 27, 2022
Bleeding edge django template focused on code quality and security.

wemake-django-template Bleeding edge django2.2 template focused on code quality and security. Purpose This project is used to scaffold a django projec

wemake.services 1.6k Jan 08, 2023
A template for some new Python tool or package with a reasonable basic setup.

python-app-template A template with a reasonable basic setup, including: black (formatting) flake8 (linting) mypy (type checking) isort (import sortin

Anton Pirogov 3 Jul 19, 2022
This is the starter for the Flask React project.

Flask React Project This is the starter for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github

Jami Travers 5 May 25, 2022
Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.

Template repository to build PyTorch projects from source on any version of PyTorch/CUDA/cuDNN.

Joonhyung Lee/이준형 651 Dec 12, 2022
Boilerplate for starting a python project

Python Project Boilerplate Simple boilerplate for starting a python proect. Using the repo Follow following steps to install client on server Create a

Prajwal Dahal 1 Nov 19, 2021
simple flask starter app utilizing docker

Simple flask starter app utilizing docker to showcase seasonal anime using jikanpy (myanimelist unofficial api).

Kennedy Ngugi Mwaura 5 Dec 15, 2021
A full stack boilerplate for FastAPI

A full stack boilerplate for FastAPI

Tyler M. Kontra 94 Dec 13, 2022
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.

Cookiecutter Django Powered by Cookiecutter, Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly. Documentati

Daniel Roy Greenfeld 10k Jan 01, 2023
Cookiecutter Flask OpenAPI is a template for jumpstarting production-ready Flask projects quickly.

Cookiecutter Flask OpenAPI is a template for jumpstarting production-ready Flask projects quickly. It has a well organized and scalable structure. It uses API design first

Roger Camargo 3 Nov 17, 2022
A simple cookiecutter to create Python Telegram bots, wrapped with Django.

PTB Django cookiecutter A simple cookiecutter to create Python Telegram bots, wrapped with Django. Based on this cool projects python-telegram-bot (PT

Carlos Lugones 20 Nov 12, 2022
Boilerplate code for a Python Flask API

MrMat :: Python :: API :: Flask Boilerplate code for a Python Flask API This variant of a Python Flask API is code-first and using native Flask Featur

0 Dec 26, 2021
Launchr is an open source SaaS starter kit, based on Django.

Launchr Launchr is an open source SaaS starter kit. About Launchr is a fully-equipped starter template, ready to start a SaaS web app. It implements t

Jannis Gebauer 183 Jan 06, 2023
Forkable, Minimal Template for Starknet Projects.

Forkable, Minimal Template for Starknet Projects.

velleity.eth 44 Oct 09, 2022
A platform for developers 👩‍💻 who wants to share their programs and projects.

Hacktoberfest-2021 A platform for developers 👩‍💻 who wants to share their projects and programs. Hacktoberfest has updated their rules and now this

Mayank Choudhary 40 Nov 07, 2022
Django sample app with users including social auth via Django-AllAuth

demo-allauth-bootstrap Simple, out-of-the-box Django all-auth demo app A "brochure" or visitor (no login required) area A members-only (login required

Andrew E 215 Dec 20, 2022
Creating Templates and components so those can be reusable some time and makes workflow a lot easier!

TEMPLATES AND COMPONENTS IN ANY LANG! This is an Open Repository For Students to Contribute code in Hackoctoberfest in different Languages and Tech me

SriSravyaN 9 Feb 19, 2022
Django starter project with 🔋

A batteries-included Django starter project. For a production-ready version see the book Django for Professionals. 🚀 Features Django 3.1 & Python 3.8

William Vincent 1.5k Jan 08, 2023
Project template layout for Django 3.0+

Django 3.0+ project template This is a simple Django 3.0+ project template with my preferred setup. Most Django project templates make way too many as

José Padilla 649 Dec 30, 2022
Bleeding edge django template focused on code quality and security.

wemake-django-template Bleeding edge django2.2 template focused on code quality and security. Purpose This project is used to scaffold a django projec

wemake.services 1.6k Jan 04, 2023