Closed johncarmack1984 closed 7 years ago
That ModuleNotFound
error says that there is no module 'home' which is the folder for the one app in the project. The folder is in fact there, and again, this works fine on desktop. :-/
Okay here's my code in urls.py that seems to be the offending part. Works fine on desktop, shoots up an error on Amazon.
from django.conf.urls import include, url
from django.contrib import admin
from home import views
urlpatterns = [
url(r'^$',views.index,name='index'),
url(r'^admin/', admin.site.urls),
]
I have tried modifying the import statement to say "from . import views"
but that leads to an error on desktop and does not fix the issue on Amazon.
Somewhere between my desktop venv and AWS, the interpreter is not understanding that the home folder is a module inside of the django project.
This was resolved by using a custom storage backend as recommended here: https://www.caktusgroup.com/blog/2014/11/10/Using-Amazon-S3-to-store-your-Django-sites-static-and-media-files/
Expected Behavior
Site should load home app template upon request, as it works fine with
$python manage.py runserver
on desktopActual Behavior
AWS returns this error
zappa tail output:
Possible Fix
??? No clue.
Steps to Reproduce
Launch and update what amounts to a "hello world" to AWS from Zappa from macOS Sierra... I don't know what I could have done differently.
Your Environment
Python 3.6 Django 1.11 Zappa 0.43.1 macOS 10.12.6 (Sierra)
Output of
pip freeze
:Project is here: link
Content of zappa_settings.json: