awesto / django-shop

A Django based shop system
http://www.django-shop.org
BSD 3-Clause "New" or "Revised" License
3.2k stars 1.04k forks source link

Deploy on AWS #793

Closed pydrogo closed 4 years ago

pydrogo commented 4 years ago

After deploying on AWS elastic beanstalk I get the below error even when I run python manage.py shell : from parler_rest.serializers import TranslatedFieldsField, TranslatedField, TranslatableModelSerializerMixin ImportError: cannot import name 'TranslatableModelSerializerMixin'

I have these config files: .ebextensions/01_packages.config :

packages:
  yum:
    git: []
    postgresql93-devel: []

.ebextensions/02_python.config:

option_settings:
  "aws:elasticbeanstalk:application:environment":
    DJANGO_SETTINGS_MODULE: "mahimoshop.settings"
    "PYTHONPATH": "/opt/python/current/app:$PYTHONPATH"
  "aws:elasticbeanstalk:container:python":
    WSGIPath: wsgi.py
    NumProcesses: 1
    NumThreads: 20
  "aws:elasticbeanstalk:container:python:staticfiles":
    "/static/": "workdir/static/"
container_commands:
  01_migrate:
    command: "source /opt/python/run/venv/bin/activate && python manage.py migrate --noinput"
    leader_only: trueo

here is my pip freze result:

Babel==2.7.0
certifi==2019.9.11
chardet==3.0.4
defusedxml==0.6.0
Django==1.11.25
django-admin-sortable2==0.7.3
django-allauth==0.40.0
django-angular==2.2.3
django-appconf==1.0.3
django-classy-tags==0.9.0
django-cms==3.5.3
django-cors-headers==3.1.1
django-filer==1.5.0
django-filter==2.2.0
django-formtools==2.1
django-fsm==2.6.1
django-fsm-admin==1.2.4
django-haystack==2.8.1
django-ipware==2.1.0
django-js-asset==1.2.2
django-mptt==0.10.0
django-parler==2.0
django-parler-rest==2.0
django-phonenumber-field==3.0.1
django-polymorphic==1.3.1
django-post-office==3.2.1
django-rest-auth==0.9.5
django-sass-processor==0.7.4
django-sekizai==1.0.0
django-select2==6.3.1
django-shop==1.0.2
django-treebeard==4.3
djangocms-admin-style==1.4.0
djangocms-bootstrap==1.1.2
djangocms-cascade==0.19
djangocms-text-ckeditor==3.8.0
djangorestframework==3.8.2
djangorestframework-jwt==1.11.0
djangoshop-sendcloud==1.0
djangoshop-stripe==1.0
drf-haystack==1.8.6
easy-thumbnails==2.6
elasticsearch==1.7.0
html5lib==1.0.1
idna==2.8
jsonfield==2.0.2
libsass==0.19.3
oauthlib==3.1.0
phonenumbers==8.10.21
Pillow==6.2.1
psycopg2==2.7.7
PyJWT==1.7.1
python-dateutil==2.8.0
python3-openid==3.1.0
pytz==2019.3
requests==2.22.0
requests-oauthlib==1.2.0
six==1.12.0
stripe==1.53.0
Unidecode==1.0.23
urllib3==1.25.6
webencodings==0.5.1
jrief commented 4 years ago

Question on that level can only be answered through paid support. Feel free to contact me on my personal email address.

pydrogo commented 4 years ago

Thank you @jrief just for future references, changing the django-parler-rest==2.0 to django-parler-rest==2.1 solved my issue.

jrief commented 4 years ago

But then, this probably doesn't have anything to do with AWS and could be reproduced on a local setup. Thanks for the hint, I will adopt the dependencies.

pydrogo commented 4 years ago

But then, this probably doesn't have anything to do with AWS and could be reproduced on a local setup. Thanks for the hint, I will adopt the dependencies.

Yes exactly It's not related to the AWS. I could produce that on my local machine after opening this issue. I didn't use the Cookiecutter. I generated requirements.txt from pipfile and then pip installed the packages from requirements.txt then python manage.py initialize_shop_demo.