Skip to main content

django app for organizing users through memberships

Project description

Anorganization uses membership, and organization models to group users. Support for Ariadne graphQL with pre-defined types and basic resolvers.

Requirements

  • Python 3.10+

  • django 4.0+

  • pillow 9.4.0+

Settings

Store uploaded file with tokenize file name, default to False

  • ANORGANIZATION_USE_TOKEN_FILENAME = True

Django admin mixins

Use predefined mixins to construct the admin class.

  • OrganizationAdminMixin

  • MembershipAdminMixin

from django.contrib import admin

from anorganization.models import Organization
from anorganization.mixins import OrganizationAdminMixin


@admin.register(Organization)
class OrganizationAdmin(OrganizationAdminMixin, ModelAdmin):
    ...

Ariadne types and resolvers

Integrate predefined types and resolvers to scheme.

Requirements

  • ariadne 0.16.0+

  • ariadne-relay 0.1.0a8+

schema

from anorganization.graphqls import anorganization_schema
  • anarticle/graphqls/article.graphql

  • anarticle/graphqls/tag.graphql

types

from anorganization.graphqls import anorganization_bindables
  • anorganization

  • anorganization_membership

resolvers

Async version

from anorganization.graphqls import resolve_anorganization_instance, \
        resolve_anorganization_member_connection, resolve_anorganizations

anorganization.set_instance_resolver(resolve_anorganization_instance)
anorganization.set_connection('members', resolve_anorganization_member_connection)

query.set_field('organizations', resolve_anorganizations)
  • resolve_anorganization_instance

  • resolve_anorganization_member_connection

  • resolve_anorganization_membership_instance

  • resolve_anorganizations

  • resolve_anorganization_memberships

Sync version

  • resolve_anorganization_instance_sync

  • resolve_anorganization_member_connection_sync

  • resolve_anorganization_membership_instance_sync

  • resolve_anorganizations_sync

  • resolve_anorganization_memberships_sync

License

django-anarticle is released under the terms of Apache license. Full details in LICENSE file.

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-anorganization-0.1.0rc3.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

django_anorganization-0.1.0rc3-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file django-anorganization-0.1.0rc3.tar.gz.

File metadata

File hashes

Hashes for django-anorganization-0.1.0rc3.tar.gz
Algorithm Hash digest
SHA256 c55ddd72fe9ca2c6f488bd2248a03ed8369b8b0075179291c22c81b995f0174f
MD5 01ca1e47efdde0afb1d8d347975f8ce3
BLAKE2b-256 2ba836e4cab7d70a62275f712c82f63a57ac0974fccc5dec4efa4220184be241

See more details on using hashes here.

File details

Details for the file django_anorganization-0.1.0rc3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_anorganization-0.1.0rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 12e95f5442789011b2342ca4336ba352988222c0ef95ceefda97aaa00e6ecc72
MD5 4237fe6408c8b6e82b6390ea2c95b6fc
BLAKE2b-256 956639334f4d0d9685ca2db5ff083e66dcfdd346592df14ff69af4fe52b988dc

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