Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinax.stripe.mixins runtime error #568

Open
vincefav opened this issue May 21, 2018 · 3 comments
Open

Pinax.stripe.mixins runtime error #568

vincefav opened this issue May 21, 2018 · 3 comments

Comments

@vincefav
Copy link

Issue Summary

I just installed the latest version of pinax-stripe and my deployment fails with a runtime error.


Steps to Reproduce

I'm using Django 2.0.4 and my installed_apps are:

INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.sites',
    'raven.contrib.django.raven_compat',
    'pinax.stripe',
    'allauth',
    'allauth.account',
    'allauth.socialaccount',
    'allauth.socialaccount.providers.facebook',
    'allauth.socialaccount.providers.google',
    'allauth.socialaccount.providers.twitter',
    ...
    'bootstrap4',
    'crispy_forms',
    'rest_framework',
    'sslserver',
    'storages',
    'django.contrib.humanize',
    'el_pagination',
    'django.contrib.staticfiles',
]

It appears that the error pops up once I add url(r"^payments/", include("pinax.stripe.urls")), to my urls.

What were you expecting to happen? / What actually happened?

I get this error:

Model class account.models.Account doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.

With this traceback:

pinax/stripe/mixins.py in <module> at line 7
from .actions import customers
from .conf import settings
try:
    from account.decorators import login_required # <-- this line is highlighted
except ImportError:
    from django.contrib.auth.decorators import login_required

I was thinking maybe there was a conflict with allauth, but disabling it doesn't seem to fix anything. Any ideas?

@KatherineMichel
Copy link
Member

I think you might need to add "account", to your installed apps.

@vincefav
Copy link
Author

Good call, but now it's definitely clashing with allauth: django.core.exceptions.ImproperlyConfigured: Application labels aren't unique, duplicates: account. Is there a way to rename one of them? Or would that be more trouble than it's worth?

@KatherineMichel
Copy link
Member

I'm not sure tbh. Perhaps could be done with apps.py? Apparently two apps can be relabeled when there is a conflict. https://docs.djangoproject.com/en/2.0/ref/applications/#django.apps.AppConfig.label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants