Country-specific Django helpers, to use in Django Rest Framework

Overview

django-rest-localflavor

https://badge.fury.io/py/django-rest-localflavor.png https://travis-ci.org/gilsondev/django-rest-localflavor.png?branch=master http://smallactsmanifesto.org/static/images/smallacts-badge-80x15-blue.png

Country-specific serializers fields, to Django Rest Framework

Documentation (soon)

The full documentation is at https://django-rest-localflavor.readthedocs.org.

Quickstart

Install django-rest-localflavor:

pip install django-rest-localflavor

Then use it in a project:

INSTALLED_APPS = (
    # ...
    'rest_framework',
    'rest_localflavor',
)
Comments
  • Bump djangorestframework from 3.3.3 to 3.9.1 in /requirements

    Bump djangorestframework from 3.3.3 to 3.9.1 in /requirements

    Bumps djangorestframework from 3.3.3 to 3.9.1.

    Release notes

    Sourced from djangorestframework's releases.

    Version 3.9.1

    Change Notes: https://www.django-rest-framework.org/community/release-notes/#39x-series

    Verision 3.9.0

    Release announcement: https://www.django-rest-framework.org/community/3.9-announcement/

    Change Notes: https://www.django-rest-framework.org/community/release-notes/#39x-series

    Version 3.8.2

    Point release for 3.8.x series

    • Fix read_only + default unique_together validation. #5922
    • authtoken.views import coreapi from rest_framework.compat, not directly. #5921
    • Docs: Add missing argument 'detail' to Route #5920

    Version 3.8.1

    • Use old url_name behavior in route decorators #5915

      For list_route and detail_route maintain the old behavior of url_name, basing it on the url_path instead of the function name.

    Version 3.8

    • Release Announcement

    • 3.8.0 Milestone

    • Breaking Change: Alter read_only plus default behaviour. #5886

      read_only fields will now always be excluded from writable fields.

      Previously read_only fields with a default value would use the default for create and update operations.

      In order to maintain the old behaviour you may need to pass the value of read_only fields when calling save() in the view:

        def perform_create(self, serializer):
            serializer.save(owner=self.request.user)
      

      Alternatively you may override save() or create() or update() on the serialiser as appropriate.

    • Correct allow_null behaviour when required=False #5888

      Without an explicit default, allow_null implies a default of null for outgoing serialisation. Previously such fields were being skipped when read-only or otherwise not required.

      Possible backwards compatibility break if you were relying on such fields being excluded from the outgoing representation. In order to restore the old behaviour you can override data to exclude the field when None.

    ... (truncated)
    Commits
    • 453196e Version 3.9.1 (#6405)
    • 4bb9a3c Fix XSS caused by disabled autoescaping in the default DRF Browsable API view...
    • e3bd4b9 Fix #1811: take limit_choices_to into account with FK (#6371)
    • 9c408b2 Remove reference to deprecated drf-openapi package (#6398)
    • e0ae975 Fix a badly formatted title in docs (#6089)
    • c052a86 compat: (py2) urlparse = urllib.parse (py3) (#6262)
    • a49d744 Fix OpenAPI links (#6382)
    • 0860ef9 Update quickstart to Django 2.0 routing syntax (#6385)
    • 587058e Allow run_validators() to handle non-dict types. (#6365)
    • 0cf18c4 Use Default Version in URLPathVersioning if 'version' Didn't Specified by Cli...
    • Additional commits viewable in compare view

    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 ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major 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

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Create a new syntax to use br_state choices keeping backward compatibility, also create a new 'uf' module.

    Create a new syntax to use br_state choices keeping backward compatibility, also create a new 'uf' module.

    Create a new syntactic sugar to use br_state choices keeping backward compatibility, also create a new 'uf' module, making it easy to reference it in tests or anywhere else. ex:

    from localflavor.br import uf
    uf.GO
    uf.DF
    [ ...] 
    
    opened by decko 1
  • Bump wheel from 0.24.0 to 0.38.1 in /requirements

    Bump wheel from 0.24.0 to 0.38.1 in /requirements

    Bumps wheel from 0.24.0 to 0.38.1.

    Changelog

    Sourced from wheel's changelog.

    Release Notes

    UNRELEASED

    • Updated vendored packaging to 22.0

    0.38.4 (2022-11-09)

    • Fixed PKG-INFO conversion in bdist_wheel mangling UTF-8 header values in METADATA (PR by Anderson Bravalheri)

    0.38.3 (2022-11-08)

    • Fixed install failure when used with --no-binary, reported on Ubuntu 20.04, by removing setup_requires from setup.cfg

    0.38.2 (2022-11-05)

    • Fixed regression introduced in v0.38.1 which broke parsing of wheel file names with multiple platform tags

    0.38.1 (2022-11-04)

    • Removed install dependency on setuptools
    • The future-proof fix in 0.36.0 for converting PyPy's SOABI into a abi tag was faulty. Fixed so that future changes in the SOABI will not change the tag.

    0.38.0 (2022-10-21)

    • Dropped support for Python < 3.7
    • Updated vendored packaging to 21.3
    • Replaced all uses of distutils with setuptools
    • The handling of license_files (including glob patterns and default values) is now delegated to setuptools>=57.0.0 (#466). The package dependencies were updated to reflect this change.
    • Fixed potential DoS attack via the WHEEL_INFO_RE regular expression
    • Fixed ValueError: ZIP does not support timestamps before 1980 when using SOURCE_DATE_EPOCH=0 or when on-disk timestamps are earlier than 1980-01-01. Such timestamps are now changed to the minimum value before packaging.

    0.37.1 (2021-12-22)

    • Fixed wheel pack duplicating the WHEEL contents when the build number has changed (#415)
    • Fixed parsing of file names containing commas in RECORD (PR by Hood Chatham)

    0.37.0 (2021-08-09)

    • Added official Python 3.10 support
    • Updated vendored packaging library to v20.9

    ... (truncated)

    Commits
    • 6f1608d Created a new release
    • cf8f5ef Moved news item from PR #484 to its proper place
    • 9ec2016 Removed install dependency on setuptools (#483)
    • 747e1f6 Fixed PyPy SOABI parsing (#484)
    • 7627548 [pre-commit.ci] pre-commit autoupdate (#480)
    • 7b9e8e1 Test on Python 3.11 final
    • a04dfef Updated the pypi-publish action
    • 94bb62c Fixed docs not building due to code style changes
    • d635664 Updated the codecov action to the latest version
    • fcb94cd Updated version to match the release
    • Additional commits viewable in compare view

    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

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump djangorestframework from 3.3.3 to 3.11.2 in /requirements

    Bump djangorestframework from 3.3.3 to 3.11.2 in /requirements

    Bumps djangorestframework from 3.3.3 to 3.11.2.

    Release notes

    Sourced from djangorestframework's releases.

    Version 3.9.3

    This is the last Django REST Framework release that will support Python 2. Be sure to upgrade to Python 3 before upgrading to Django REST Framework 3.10.

    • Adjusted the compat check for django-guardian to allow the last guardian version (v1.4.9) compatible with Python 2. #6613

    Version 3.9.2

    See Release Notes for details.

    Version 3.9.1

    Change Notes: https://www.django-rest-framework.org/community/release-notes/#39x-series

    Verision 3.9.0

    Release announcement: https://www.django-rest-framework.org/community/3.9-announcement/

    Change Notes: https://www.django-rest-framework.org/community/release-notes/#39x-series

    Version 3.8.2

    Point release for 3.8.x series

    • Fix read_only + default unique_together validation. #5922
    • authtoken.views import coreapi from rest_framework.compat, not directly. #5921
    • Docs: Add missing argument 'detail' to Route #5920

    Version 3.8.1

    • Use old url_name behavior in route decorators #5915

      For list_route and detail_route maintain the old behavior of url_name, basing it on the url_path instead of the function name.

    Version 3.8

    • Release Announcement

    • 3.8.0 Milestone

    • Breaking Change: Alter read_only plus default behaviour. #5886

      read_only fields will now always be excluded from writable fields.

      Previously read_only fields with a default value would use the default for create and update operations.

      In order to maintain the old behaviour you may need to pass the value of read_only fields when calling save() in the view:

        def perform_create(self, serializer):
            serializer.save(owner=self.request.user)
      

    ... (truncated)

    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

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • No matching distribution found

    No matching distribution found

    Hi - I've noticed over the last 2 weeks or so this package seems to not install via pip. When I run:

    pip install django-rest-localflavor

    I get:

    Could not find a version that satisfies the requirement django-rest-localflavor (from versions: )
    No matching distribution found for django-rest-localflavor
    

    Is the package no longer available?

    bug 
    opened by mobleyc 2
  • Update Django Rest Framework

    Update Django Rest Framework

    Update package to django-rest-framework 3.3.3. If use with version, not work because show this error:

     File "/.../rest_localflavor/br/serializers.py", line 12, in <module>
        from rest_framework.compat import MaxLengthValidator, MinLengthValidator
    ImportError: cannot import name 'MaxLengthValidator'
    
    bug enhancement 
    opened by gilsondev 0
Releases(1.2)
Owner
Gilson Filho
Developer and Data Engineer
Gilson Filho
A RESTful way to use your Notion tables as a database.

rest-notion-db A RESTful way to use your Notion tables as a database. Use-cases Form submissions or frontend websites, use one database that

Oorjit Chowdhary 42 Dec 27, 2022
Allows simplified Python interaction with Rapid7's InsightIDR REST API.

InsightIDR4Py Allows simplified Python interaction with Rapid7's InsightIDR REST API. InsightIDR4Py allows analysts to query log data from Rapid7 Insi

Micah Babinski 8 Sep 12, 2022
Turn your API made with Django REST Framework(DRF) into a GraphQL like API.

Turn your API made with Django REST Framework(DRF) into a GraphQL like API.

Yezy Ilomo 575 Jan 05, 2023
Scaffold django rest apis like a champion 🚀

scaffold django rest apis like a champion 🚀

Abdenasser Elidrissi 133 Jan 05, 2023
Integrate GraphQL into your Django project.

Graphene-Django A Django integration for Graphene. 💬 Join the community on Slack Documentation Visit the documentation to get started! Quickstart For

GraphQL Python 4k Dec 31, 2022
Creating delicious APIs for Django apps since 2010.

django-tastypie Creating delicious APIs for Django apps since 2010. Currently in beta but being used actively in production on several sites. Requirem

3.8k Dec 30, 2022
DRF-extensions is a collection of custom extensions for Django REST Framework

Django REST Framework extensions DRF-extensions is a collection of custom extensions for Django REST Framework Full documentation for project is avail

Gennady Chibisov 1.3k Dec 28, 2022
Simplified REST API to get stickers from Snap

Snap Sticker kit REST API Simplified REST API to get stickers from Snap 💻 Instructions Search stickers Request: url = "https://sticker-kit-horizon733

Dishant Gandhi 1 Jan 05, 2022
The no-nonsense, minimalist REST and app backend framework for Python developers, with a focus on reliability, correctness, and performance at scale.

The Falcon Web Framework Falcon is a reliable, high-performance Python web framework for building large-scale app backends and microservices. It encou

Falconry 9k Jan 03, 2023
Dropdown population implementation for Django REST Framework

drf-dropdown Dropdown population implementation for Django REST Framework Usage Add DropdownView to API URL # urls.py import dropdown urlpatterns = [

Preeti Yuankrathok 4 Dec 06, 2022
The Web API toolkit. 🛠

🛠 The Web API toolkit. 🛠 Community: https://discuss.apistar.org 🤔 💭 🤓 💬 😎 Documentation: https://docs.apistar.com 📘 Requirements: Python 3.6+

Encode 5.6k Dec 27, 2022
Little Library API REST

Little Library API REST py 3.10 The only one requeriment it's to have Flask installed.

Luis Quiñones Requelme 1 Dec 15, 2021
Simple Crud Api With Django Rest Framework

SIMPLE CRUD API WITH DJANGO REST FRAMEWORK Django REST framework is a powerful and flexible toolkit for building Web APIs. Requirements Python 3.6 Dja

kibet hillary 1 May 03, 2022
RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.

RESTler is the first stateful REST API fuzzing tool for automatically testing cloud services through their REST APIs and finding security and reliability bugs in these services.

Microsoft 1.8k Jan 04, 2023
Authentication for Django Rest Framework

Dj-Rest-Auth Drop-in API endpoints for handling authentication securely in Django Rest Framework. Works especially well with SPAs (e.g React, Vue, Ang

Michael 1.1k Dec 28, 2022
Django app for handling the server headers required for Cross-Origin Resource Sharing (CORS)

django-cors-headers A Django App that adds Cross-Origin Resource Sharing (CORS) headers to responses. This allows in-browser requests to your Django a

Adam Johnson 4.8k Jan 05, 2023
RESTful Todolist API

RESTful Todolist API GET todolist/ POST todolist/ {"desc" : "Description of task to do"} DELETE todolist/int:id PUT todolist/int:id Requirements D

Gabriel Tavares 5 Dec 20, 2021
Build a Backend REST API with Python & Django

Build a Backend REST API with Python & Django Skills Python Django djangorestframework Aws Git Use the below Git commands in the Windows Command Promp

JeonSoohyun a.k.a Edoc.. 1 Jan 25, 2022
Django-rest-auth provides a set of REST API endpoints for Authentication and Registration

This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST

Tivix 2.4k Dec 29, 2022