wojtekidd / djangoapp-koszulki

Python bootcamp project - T-shirts portal
https://djangoapp-koszulki.herokuapp.com/
0 stars 3 forks source link

Unable to register without an image file #50

Closed wojtekidd closed 4 years ago

wojtekidd commented 4 years ago

Locally after registration I receive this error

ValueError at /register/

The 'image' attribute has no file associated with it.

Request Method:     POST
Request URL:    http://127.0.0.1:8000/register/
Django Version:     3.0.5
Exception Type:     ValueError
Exception Value:    

The 'image' attribute has no file associated with it.

Exception Location:     /Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/lib/python3.7/site-packages/django/db/models/fields/files.py in _require_file, line 38
Python Executable:  /Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/bin/python
Python Version:     3.7.4
Python Path:    

['/Users/wojtek/PycharmProjects/djangoapp-tshirts',
 '/Library/Frameworks/Python.framework/Versions/3.7/lib/python37.zip',
 '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7',
 '/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/lib-dynload',
 '/Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/lib/python3.7/site-packages',
 '/Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/lib/python3.7/site-packages/odf',
 '/Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/lib/python3.7/site-packages/odf',
 '/Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/lib/python3.7/site-packages/odf',
 '/Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/lib/python3.7/site-packages/odf',
 '/Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/lib/python3.7/site-packages/odf',
 '/Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/lib/python3.7/site-packages/odf',
 '/Users/wojtek/PycharmProjects/djangoapp-tshirts/venv/lib/python3.7/site-packages/odf']

Server time:    Sun, 10 May 2020 14:44:48 +0200
wojtekidd commented 4 years ago

OK so let's do it this way. Until I add storage support to Heroku #51 we will push to master and treat our local environments as Single Point of Truth. 

@KarolinaWojciechowska please fix the code so that it has a 'default.png' avatar in place and send us the file and its location on Slack.

Hopefully this will speed us up when developing.

wojtekidd commented 4 years ago

Fixed temporarily by hashing out media folder from .gitignore