Skip to main content

Helper module used in general django applications

Project description

django-aid

Helper module used in general django applications

Django

Jinja2

django.jinja2.environment

Model

django.model.QuerySet

  • annotate_choices Annotate the get_FOO_display() values of fields where choices exist

DRF

ViewSet

  • viewsets.***ModelViewSet ViewSetMixin클래스를 상속받은 GenericViewSet. serializer_classes 속성을 사용하며, put 메서드에 대한 문서화를 해제한다.

Renderer

  • renderers.BrowsableAPIRenderer Form을 제거한 BrowsableAPIRendrer

Fields

  • fields.pk_model_field.PkModelField 특정 Model의 instance를 나타내는 Field 주어지는 데이터가 아래와 같을 경우를 처리

    # dict
    {'pk': 1} or {'id': 1}
    
    # literal (pk가 될 수 있는 숫자/문자 등의 고정 값)
    1 or '1'
    

    생성시에만 사용 가능하다

drf-yasg

  • drf_yasg.schema 문서화 생성 헬퍼 클래스

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-aid-0.1.9.tar.gz (6.7 kB view details)

Uploaded Source

File details

Details for the file django-aid-0.1.9.tar.gz.

File metadata

  • Download URL: django-aid-0.1.9.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6

File hashes

Hashes for django-aid-0.1.9.tar.gz
Algorithm Hash digest
SHA256 14ff474d551165a031a35de0b2bbca3802e4de892f1967a40afc1a16fc19d731
MD5 a1fe46c64e49059c11db3ff9221e59a3
BLAKE2b-256 103c8c72ad6937d34034c53299e5877e8e46108ebd52d2be4fbaaa4b0ab37431

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page