thunderlink / ThunderFish

Project Repository for 2019 Spring SWPP Class
MIT License
3 stars 2 forks source link

ImageField in models.py, referencing class model as a field #9

Closed calofmijuck closed 5 years ago

calofmijuck commented 5 years ago

https://github.com/thunderlink/ThunderFish/blob/6f46c1066c2268b5db0e5faa9587c3bf312729d3/backend/server/models.py#L5

This line causes the following error: server.User.photo: (fields.E210) Cannot use ImageField because Pillow is not installed. HINT: Get Pillow at https://pypi.org/project/Pillow/ or run command "pip install Pillow".

Should we install this? Or should we use a different field?

https://github.com/thunderlink/ThunderFish/blob/6f46c1066c2268b5db0e5faa9587c3bf312729d3/backend/server/models.py#L41

This line causes error: NameError: name 'Comment' is not defined

I am not sure if there is a way to reference the class itself as a field.

dwmarcuskim commented 5 years ago

docs on django Searched with keyword "image", it said we should use Pillow library. Let's try with Pillow library.

calofmijuck commented 5 years ago

I still couldn't find a way to link a reply comment to its parent comment.

dwmarcuskim commented 5 years ago

Second issue will be moved to issue #13