Giter Club home page Giter Club logo

clean_proposal's Introduction

app api serializers viewsets views admins business_logic validators unit_of_work (caso de uso) dto (schemas de pydantic o dataclases) exceptions domain_model tests

mkdir -p api/serializers api/viewsets mkdir -p views/admins mkdir -p business_logic/validators mkdir -p business_logic/unit_of_work mkdir -p business_logic/dto mkdir -p business_logic/exceptions mkdir -p domain_model mkdir -p tests

Extras

Puede simplificar las views https://github.com/oxan/djangorestframework-dataclasses

https://github.com/rsinger86/drf-typed

Para usar Pydantic con DRF https://github.com/yezz123/pyngo https://www.obytes.com/blog/integrate-pydantic-with-django-and-django-rest-framework

Typed Views https://rsinger86.github.io/drf-typed/views/request_elements/

from rest_framework import serializers
from rest_typed import typed_api_view

class CommentSerializer(serializers.Serializer):
    email = serializers.EmailField()
    content = serializers.CharField(max_length=200)
    created = serializers.DateTimeField(read_only=True)

"""
    POST
    {
        "email": "[email protected]",
        "content": "great job team!",
    }
"""
@typed_api_view(["POST"])
def create_comment(comment: CommentSerializer):
    # is_valid() automatically called.
    # ready to access comment.validated_data

https://github.com/django-polymorphic/django-polymorphic

CookieCutter para hacer templates de apps https://cookiecutter.readthedocs.io/en/1.7.2/

clean_proposal's People

Contributors

iariap avatar

Watchers

 avatar  avatar

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.