Comments (11)
Hi @dollydagr, I'm moving today so my ability to quickly help is curtained.
If it helps, my development with this has only been with PostgreSQL. Maybe try it with that or MySQL?
from dj-stripe.
Thanks @pydanny for your quick reply. I am digging into this (but I don't believe it's a DBMS issue).
Good luck with your move! Had so many of those.
from dj-stripe.
The exception seems to happen more exactly when djstripe/forms.py fails to import SetPasswordField and PasswordField from allauth.account.forms.
In fact, there is nothing that I can import from allauth.account.forms from djstripe's forms.py (or even my app). However, the method from allauth.account.utils could be imported fine. Right now, just to keep going, I redeclared SetPasswordField and PasswordField (and imported them) from myapp/forms.py (which works).
I know this is not an issue particular to djstripe, but if you have an idea why the classes of allauth.account.forms are inaccessible to the other apps, I'd really appreciate your insight (and remove my dirty fix).
My structure is the following:
my_project:
|_ my_app
|_ djstripe
|_ allauth
|_ account
Thank you!
dollydagr
from dj-stripe.
@dollydagr Are you using pip or actually copying the code of djstripe and allauth directly into your project?
from dj-stripe.
@pydanny I ended up copying the code of djstripe and allauth into my project.
I actually started by pip when I first had this error. As it was hard to trace, I copied the source codes to get a better handle on things and be able to test assumptions (and workarounds). Should I try posting this (what seems to be an) import issue on stackoverflow instead?
from dj-stripe.
Admittedly, the test coverage on the project isn't where it needs to be. And since I delivered the project powered by dj-stripe, I haven't had a chance to work on it since.
In any case, including it the way you did is probably the cause of the import errors. If you want to use a development version, I recommend cloning it outside and then bringing it into your development environment via python setup.py develop
.
from dj-stripe.
Thanks @pydanny for the recommendation. For some reason, even with the development environment setup, I am still getting the same error.
In any case, I wanted to change the signup interaction flow. The current signup form, when filled with both credentials and payment errors, will first and only display stripe errors. When these are fixed, it erases all the payment information to display the credentials (username, password) errors.
So I ended up separating both out. I am making sure my user signs up and verifies their identify. And then I collect their payment. I now integrated all dj-stripe templates into my website, and it's great!
from dj-stripe.
Hey @dollydagr, what should I do with this ticket? Close it? Put a note in the docs and then close it?
from dj-stripe.
Yes @pydanny, this left me perplex, just close it (until/if someone else encounters the issue).
from dj-stripe.
I ran into this as well. It looks like it is being caused by what would end up being a circular import
in allauth/account/forms.py (truncated):
def _base_signup_form_class():
...
try:
fc_class = getattr(mod, fc_classname)
except AttributeError:
raise exceptions.ImproperlyConfigured('Module "%s" does not define a'
' "%s" class' % (fc_module,
fc_classname))
class BaseSignupForm(_base_signup_form_class()):
...
djstripe tests for the presence of allauth with the following:
try:
from allauth.account.utils import setup_user_email
from allauth.account.forms import SetPasswordField # circular import occurs here
from allauth.account.forms import PasswordField
except ImportError:
When reading allauth.account.forms
allauth attempts to import the signup form indicated in settings.py, in this case djstripe.forms.StripeSubscriptionSignupForm which hasn't been defined yet. The only reason this isn't actually causing a circular import error is because allauth is testing for the existence of the class as an attribute of the parent module and raising an exception when it doesn't find it.
from dj-stripe.
Makes sense. Thanks @dustinfarris!
from dj-stripe.
Related Issues (20)
- ProgrammingError: column djstripe_product.default_price_id does not exist HOT 7
- Use case for multiple API Keys? HOT 9
- Plugin 'mkdocstrings' option 'watch' is breaking the docs HOT 2
- Failing webhook events in dj-stripe regarding Plan and Price HOT 2
- Having multiple projects breaks the webhook HOT 1
- The stripe api key placement is very confusing HOT 15
- Use AbstractModels HOT 1
- Webhook doesn't work if API keys removed from .env HOT 4
- Current state of the projects Documentation/Website
- v2.9 Release Checklist HOT 2
- Sync only Subscriptions with specific status HOT 2
- Initial Sync Fails to Import Charge data from Connect Express Accounts
- Re-enable Migration Check in Linter Action for Release 3.0
- Support an upgrade from 2.X HOT 4
- Webhooks for some users are failing after library update from 2.5 to 2.8 HOT 4
- Errors when manually running djstripe_sync_models
- API change for Sepa payments in their source api HOT 1
- Enhance Admin Interface to Dynamically Include All Properties as Read-Only Fields HOT 2
- Impossible to install dj-stripe to my django project HOT 6
- Event Process: pass new obj instance to signal
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dj-stripe.