hackforla / hackforla/peopledepot

Store project logos in django

Open
#91 7 comments 0 reactions 0 assignees View on GitHub
complexity: missing dependency feature: docs: PD team documentation feature: DR p-feature: projects PII: FALSE question role: db architect s: org s: PD team s: VRMS size: 0.5pt
Dominant language
Python
Stars
14
Forks
37
Avg merge
9d 15h
Merged PRs (30d)
5

Description

### Dependency
- After the following:
- [ ] [v0.01 - initial setup](https://github.com/hackforla/peopledepot/milestone/3) and before
- [ ] [v0.03 tables for CTJ functions](https://github.com/hackforla/peopledepot/milestone/10)
- [ ] [v0.04 tables for hackforla.org website existing functions](https://github.com/hackforla/peopledepot/milestone/11)
- [ ] [v0.05 tables for kb functions](https://github.com/hackforla/peopledepot/milestone/13)

### Overview
Suggestion from a PR review. The project image_logo field is a URL, but would be better managed by django.

### Action Items
- [ ] discussion
- [ ] decision and reasoning
- [ ] add a decision record

### Discussion Items
- [ ] current design
- [ ] proposed design
- [ ] advantages/disadvantages

### Resources/Instructions
- original comment

>Should the image fields be [ImageFields](https://docs.djangoproject.com/en/4.1/ref/models/fields/#django.db.models.ImageField) so Django can manage them? You would need to sort out how you will be storing the images - probably an S3 bucket for production but a local media volume for dev. You can use django-storages and a different MEDIA_URL configurations for dev and prod.

_Originally posted by @cnk in https://github.com/hackforla/peopledepot/pull/84#discussion_r985380281_

- current design (URLField)
- logo is an external link
- link needs to be public
- the project must remember why they need to host the file there and not remove it
- django-managed logo image
- logo image is stored in django
- S3 bucket for production
- docker media volume for development
- safer from potential rickrolls
- easier for projects to generate spec-conforming logo image and keep it with us (where it's being used)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.