简体   繁体   English

使用GAE / Django在Test Shop上安装自定义应用程序

[英]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. 我在使用django和app引擎在我的测试车间安装自定义应用程序时遇到了一些麻烦。 I downloaded the appropriate zip file on github for the app engine project (https://github.com/shopify/shopify_django_app). 我在github上为app引擎项目(https://github.com/shopify/shopify_django_app)下载了相应的zip文件。

I created the app on the partner admin with the callback url 我使用回调网址在合作伙伴管理员上创建了应用

http://localhost:8000/login/finalize

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

SHOPIFY_API_SECRET = '1fddc.......' 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. 我输入https://crooks-and-sons5046.myshopify.com (测试店),它将我发送到我所做的合作伙伴登录表单并登录。 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: 或者我输入了crooks-and-sons5046,我从服务器上回复了500错误,其中显示了异常值:
cannot concatenate 'str' and 'NoneType' objects Exception Location: /Users/timwhitaker/gae/mfshopify/shopify/session.py in 无法连接'str'和'NoneType'对象异常位置:/Users/timwhitaker/gae/mfshopify/shopify/session.py in
__computed_password, line 87 __computed_pa​​ssword,第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. 我的api密钥和密钥都输入到shopify_settings.py中,因此这使我相信没有为会话创建令牌。

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. 这里的在线演示https://shopify-django-example.appspot.com/非常适合我,我没有搞乱所包含的任何文件。

Any ideas? 有任何想法吗?

Is your Shopify App configured to use Legacy or OAuth Authentication? 您的Shopify应用程序是否已配置为使用旧版或OAuth身份验证? I think the example app zip file for app engine is quite old, so probably only works with Legacy Authentication. 我认为app引擎的示例应用程序zip文件很旧,所以可能只适用于Legacy Authentication。

However, the master branch for the shopify_django_app project has been updated to support OAuth with Shopify. 但是,shopify_django_app项目的主分支已更新为使用Shopify支持OAuth。 That along with the newer version of the shopify_python_api would be needed to be updated to use OAuth Authentication. 这将与更新版本的shopify_python_api一起更新以使用OAuth身份验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM