Skip to main content

A compilation of the applications we often use in addition to Django Rest Framework

Project description

PixelForest DRF

PyPI version Python versions Django versions

This repository host the code of the PixelForest DRF package. This package will host most of the reusable applications/code we use on a project basis as the PixelForest Dev Team.

Note This package is under public licensing because we figured it might be useful for other as it is.

Current subpackages

  • utils: A subpackage with useful tools for Django applications. Not an application itself (but used as one for testing), no need to add it to your installed apps
  • countries: A django application to handle some location data, based on 3 levels: Country, SubRegion and Region
  • companies: A django application to handle companies structure, based on 4 levels: CompanyGroup, Company, Subsidiary and Service
  • users: A django application to handle users
  • rest: A collection of basic apis for the applications subpackages

Getting started

Requirements

The following requirements will need to be installed and configured

Installation

You can install the package using pip:

pip install pixelforest_drf

Add the wanted application(s) to your INSTALLED_APPS:

INSTALLED_APPS = (
    ...,
    'rest_framework',  # necessary to use pixelforest_drf.rest
    'phonenumber_field',  # necessary to use pixelforest_drf.users
    'pixelforest_drf.companies',
    'pixelforest_drf.countries',
    'pixelforest_drf.users',
    ...,
)

If you use the pixelforest_drf.users subpackage, define the user in your settings:

AUTH_USER_MODEL = "users.PFUser"

Run the included migrations:

python3 manage.py migrate

Rest Endpoints

Add the wanted URL patterns:

from pixelforest_drf.rest import api_urls

urlpatterns = [
    ...,
    path('', include(api_urls)),
    ...,
]

Or, if you are not using all subpackages, you can nitpick:

from pixelforest_drf.rest.countries import api_urls as countries_urls
from pixelforest_drf.rest.companies import api_urls as companies_urls
from pixelforest_drf.rest.users import api_urls as users_urls

urlpatterns = [
    ...,
    path('', include(countries_urls)),
    path('', include(companies_urls)),
    path('', include(users_urls)),
    ...,
]

Contributing

Guidelines

Please contact the PixelForest Dev Team for any bug report or feature request.

Credit

Contributors

Jean-Xavier Raynaud - email - Product Owner / System Architect / Developer

Milo Parigi - email - Scrum Master / Developer

Victor Duvernois - email - Developer

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

pixelforest_drf-0.2.3.tar.gz (846.9 kB view details)

Uploaded Source

Built Distribution

pixelforest_drf-0.2.3-py3-none-any.whl (852.9 kB view details)

Uploaded Python 3

File details

Details for the file pixelforest_drf-0.2.3.tar.gz.

File metadata

  • Download URL: pixelforest_drf-0.2.3.tar.gz
  • Upload date:
  • Size: 846.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for pixelforest_drf-0.2.3.tar.gz
Algorithm Hash digest
SHA256 4a7f0bc1ab0859f69e838d23d50f337222b24e8b355bfc21170395b416a980c9
MD5 bcec833dfc11aa286a4eb0056de718e4
BLAKE2b-256 ff16fff99e2f159ad57c3608f74dec3539aa430414548c8716c84d6389756664

See more details on using hashes here.

File details

Details for the file pixelforest_drf-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: pixelforest_drf-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 852.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5

File hashes

Hashes for pixelforest_drf-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e4a3d810bccaca0419505ace1e4622248e59813102ae6abc950fe7c4475400c5
MD5 391b1d4867c548beb15634bbe9b67ede
BLAKE2b-256 38fb06836a9ee152fc95c89554007ef097c51f1eaf86fe50ed41d72c6e71b5cc

See more details on using hashes here.

Supported by

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