Tim Whitaker
Tim Whitaker

Reputation: 11

Installing a custom app on Test Shop with GAE/Django

I'm having some troubles getting a custom app installed on my test shop using django and app engine. I downloaded the appropriate zip file on github for the app engine project (https://github.com/shopify/shopify_django_app).

I created the app on the partner admin with the callback url

http://localhost:8000/login/finalize

SHOPIFY_API_KEY = '6a17608.......'

SHOPIFY_API_SECRET = '1fddc.......'

Now I load it up and am greeted by the login page.

Now one of 2 things happen.

I enter https://crooks-and-sons5046.myshopify.com (test shop) and it sends me to the partner login form which I do and login. Then it just redirects me to my stores admin page and it doesn't bring up the install frame like I see on the online demo example.

OR I enter crooks-and-sons5046 and I get a 500 error kicked back from the server that says Exception Value:
cannot concatenate 'str' and 'NoneType' objects Exception Location: /Users/timwhitaker/gae/mfshopify/shopify/session.py in
__computed_password, line 87

This is the relevant line

return md5(self.secret + self.token).hexdigest() 

My api key and secret key are both entered in the shopify_settings.py so this leads me to believe the token is not being created for the session.

The online demo here https://shopify-django-example.appspot.com/ works perfectly for me and I didn't mess around with any of the files that were in the included zip.

Any ideas?

Upvotes: 1

Views: 211

Answers (1)

Dylan Smith
Dylan Smith

Reputation: 1522

Is your Shopify App configured to use Legacy or OAuth Authentication? I think the example app zip file for app engine is quite old, so probably only works with Legacy Authentication.

However, the master branch for the shopify_django_app project has been updated to support OAuth with Shopify. That along with the newer version of the shopify_python_api would be needed to be updated to use OAuth Authentication.

Upvotes: 3

Related Questions