Alexa.py ignored
Hi,
I think I might be misunderstanding a little bit of how to set this up. But I have created a new app. I have then created the an alexa.py, and added the DjangoAlexa to urls.py; but it is still using the default alexa.py, e.g. not picking up the intents from my version of alexa.py.
Could you let me if there is a step I am missing outside of creating alexa.py in my app, adding the URLS. When I test on the alexa development console, I am always getting the default text: -
"text": "Welcome. What would you like to do next?"
Jack,
This also confused me at first. The slides are a little helpful (it would be nice to have a more verbose explanation).. http://slides.com/rocktavious/django-alexa#/5/3
Here is what I did...
- make sure you add the environment variables for your skill. I at first thought this was in the settings.py, but it is not. You have to add these in your OS. Note that the part after "ALEXA_APP_ID_" tells django-alexa which django project to look under. In this case it is "my_app" On linux: export ALEXA_APP_ID_my_app=amzn1.echo-sdk-ams.app.e18a3326-4775-45f2-83n0-5eeg03832401
You also have to add the code from the lower code blocks (from http://slides.com/rocktavious/django-alexa#/5/3), as well as putting django_alexa into your installed apps (http://slides.com/rocktavious/django-alexa#/5/4) to your settings.py
-
In your project, you have to tell your project where to put the alexa urls. So, in your project folder base urls.py (e.g. ~/django/my_app/my_app/urls.py) add this at the top: import django_alexa # to include django-alexa and then url(r'^', include('django_alexa.urls')),
-
In my case, I could not get it to automatically load the alexa.py file, so I forced it to load by adding this line to my ~/django/my_app/my_app/init.py import alexa
These steps worked for me to get it to stop doing what you described.
I hope that helps. T
That is great
Thanks for your help! This worked great, the only thing I changed was passed a string to the app paramater on the intent decorator