Skip to main content

BaseApp Profiles

Project description

BaseApp Profiles

Reusable app to handle profiles, URL's paths and metadata. It provides useful models and GraphQL Interfaces.

How to install:

And install the package with pip install baseapp-profiles.

If you want to develop, install using this other guide.

How to use

Add baseapp_profiles to your project's INSTALLED_APPS and run ./manage.py migrate as any other django model:

INSTALLED_APPS = [
    'baseapp_profiles',
]

Add baseapp_profiles.middleware.CurrentProfileMiddleware to the MIDDLEWARE list in your django settings file, make sure it is after django.contrib.auth.middleware.AuthenticationMiddleware.

Add baseapp_profiles.permissions.ProfilesPermissionsBackend to the AUTHENTICATION_BACKENDS list in your django settings file.

Expose ProfilesMutations and ProfilesQuery in your GraphQL/graphene endpoint, like:

from baseapp_profiles.graphql.mutations import ProfilesMutations
from baseapp_profiles.graphql.queries import ProfilesQuery

class Query(graphene.ObjectType, ProfilesQuery):
    pass

class Mutation(graphene.ObjectType, ProfilesMutations):
    pass

schema = graphene.Schema(query=Query, mutation=Mutation)

ProfileInterface

ProfileInterface is a GraphQL interface that can be used to query for profiles. It has the following fields:

  • profile return the Profile for the object

How to develop

General development instructions can be found in main README.

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

baseapp_profiles-0.2.2.tar.gz (12.9 kB view details)

Uploaded Source

File details

Details for the file baseapp_profiles-0.2.2.tar.gz.

File metadata

  • Download URL: baseapp_profiles-0.2.2.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for baseapp_profiles-0.2.2.tar.gz
Algorithm Hash digest
SHA256 26b9239d7e822c2be4c0a78463410f0e5e964a3f40eed8f29f62f98a0e055f55
MD5 72efc5e21173dfa1b661a781b775efdd
BLAKE2b-256 94099fa66309aae18d7a591a82039cb2dbe2d39fabab4427bcc1373ae753412f

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