Skip to content

Cannot use forms or views with single-table customized organization models #191

@bareynol

Description

@bareynol

I have created custom organization, organization user, and organization owner models using the abstract organization models

The "Getting Started" sections of the docs say this about single-table customized organization models:

If however you want to use single-table customized organization models and/or custom organization user models, it may be best to treat Django organizations as a library and not install it in your Django project. See the Advanced customization using abstract models section.

However, forms.py and views.py both import the Organization model from organizations.models, which causes this error:

Django Version: | 2.2.9
-- | --
RuntimeError
Model class organizations.models.Organization doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

I'm currently just copying the forms.py and views.py code over to my app, but is there a better way to accomplish being able to use those utilities without having organizations installed as an app?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions