Closed alexphelps closed 8 years ago
@alexphelps, thanks for letting us know about this issue. We're working on it right now (and deprecating 1.7 while we are at it per #278 278).
This is due to a regression in 1.9 that will be fixed in 1.9.1. See the bug report and the commit.
I'll make a note of it in the documentation.
Tested with 1.9.1 dev; no issues. Give it a shot if you'd like:
pip uninstall django
pip install git+https://github.com/django/django.git@0154702a987bd06d20e53fe23284b2c4a93b9063
Nice :+1:
Good news! 1.9.1 just released
why am I seeing
~/.ve/local/lib/python2.7/site-packages/djstripe/__init__.py:23: UserWarning: dj-stripe deprecation notice: Django 1.7 and lower are no longer
supported. Please upgrade to Django 1.8 or higher.
Reference: https://github.com/pydanny/dj-stripe/issues/275
in my Django 1.10.7 installation? shouldn't that be void?
Why am I being asked to upgrade to django 1.8 or higher when I'm running django 1.11.1?
@tobydeh see #307. We haven't cherry-picked that fix into master and won't because we're about to release 1.0.0
Hello
I am receiving two different errors, this: UserWarning: dj-stripe deprecation notice: Django 1.7 and lower are no longer supported. Please upgrade to Django 1.8 or higher. Reference: https://github.com/pydanny/dj-stripe/issues/275 warnings.warn(msg) I am using: Django==1.11.3 | stripe==1.62.0
And this, when running the final command 'python manage.py djstripe_init_customers' i receive the following if ("email" not in subscriber_model._meta.get_all_field_names()) and not hasattr(subscriber_model, 'email'): AttributeError: 'Options' object has no attribute 'get_all_field_names'
@the-webguys Go ahead and switch to the 1.0.0 branch. You'll find the errors will disappear
@kavdev sorry for my ignorance, how do i switch? since i used pip install, is there a different command i need to run?
@the-webguys no worries! We've been slow to release the major version change.
pip install git+https://github.com/dj-stripe/dj-stripe.git@1.0.0
you are a legend, thank you
@kavdev any reason i am seeing this error ?: (djstripe.C003) Bad Stripe test API key. HINT: STRIPE_TEST_SECRET_KEY should start with "sktest" The key is a test key lol
solved it, i needed to change STRIPE_SECRET_KEY to STRIPE_TEST_SECRET_KEY
@kavdev but i have a load of new issues, where is the best place to put this, do you have slack?
@the-webguys stackoverflow is the best place to post the question, then just ping us about it on gitter
In the meantime, this is the setup I've used for a multi-server (prod, staging, etc.) setup that doesn't keep track of live and test data in the same db. I change the key in the environment for each server.
STRIPE_SECRET_KEY = get_env_variable("STRIPE_SECRET_KEY")
STRIPE_PUBLISHABLE_KEY = get_env_variable("STRIPE_PUBLISHABLE_KEY")
STRIPE_PUBLIC_KEY = STRIPE_PUBLISHABLE_KEY
STRIPE_LIVE_SECRET_KEY = STRIPE_TEST_SECRET_KEY = STRIPE_SECRET_KEY
STRIPE_LIVE_MODE = get_env_variable("STRIPE_LIVE_MODE")
@the-webguys only go to stackoverflow if it's a question on how to configure or set up dj-stripe; if you find a possible bug, file an issue 👍
@kavdev what would be the test mode for this? STRIPE_LIVE_MODE = get_env_variable("STRIPE_LIVE_MODE") STRIPE_TEST_MODE ?
@the-webguys STRIPE_LIVE_MODE
is a boolean
@kavdev would this work? STRIPE_LIVE_MODE = false
@the-webguys with a capital F, yes 😉
@kavdev
In the install / setup, the examples are
STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "pk_test_XXXXXXXXXXXXXXXXX")
but here you use
STRIPE_SECRET_KEY = get_env_variable("STRIPE_SECRET_KEY")
i just receive an error
NameError: name 'get_env_variable' is not defined
@the-webguys yeah sorry that's just an example from a product of mine (I'm essentially using the env method described in Two Scoops).
Go ahead and use the format described in the docs
@kavdev
which should be just the following 2 lines, of do i need the STRIPE_LIVE_MODE = False
also
STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "pk_test_XXXXXXXXXX")
STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "sk_test_XXXXXXXXXX")
yep. also STRIPE_LIVE_SECRET_KEY = STRIPE_TEST_SECRET_KEY = STRIPE_SECRET_KEY
if you're not splitting up the keys
that's a little confusing, the way i have it now with STRIPE_LIVE_MODE = False
will or should work, as they are?
Sorry, I am fairly new to django
as follows:
STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "pk_test_XXXXXXXXXX")
STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "sk_test_XXXXXXXXXX")
STRIPE_LIVE_MODE = False
gives the following error
HINT: STRIPE_TEST_SECRET_KEY should start with "sk_test_"
@the-webguys it has to do with the way we're reading the variables. Technically you should be adding in both test and live keys explicitly.
For this to work as is, just add the following line:
STRIPE_LIVE_SECRET_KEY = STRIPE_TEST_SECRET_KEY = STRIPE_SECRET_KEY
Do i replace STRIPE_TEST_SECRET_KEY with my test key?
Ideally, you would set
STRIPE_LIVE_SECRET_KEY
STRIPE_LIVE_PUBLIC_KEY
STRIPE_TEST_SECRET_KEY
STRIPE_TEST_PUBLIC_KEY
STRIPE_LIVE_MODE
And populate them from the environment (hard-coding keys is bad practice)
Think i have that correct, thanks again
Tests fail with Django 1.9 meaning that all new Pull Requests will fail given that the current
requirements_test.txt
hasdjango>=1.7
which will result in 1.9 being installed during the build.Example build - https://travis-ci.org/pydanny/dj-stripe/jobs/94795855
I wish I knew how to fix this but it's a little over my head as to how these tests actually work. :confounded: