Closed tai271828 closed 2 years ago
I think this pull request is a good roadmap for junior/medium Django developer like me to get yourself familiar with the code base of the ohshown project. So, I will suggest people who are interested in the backend contribution like @EagleC0318 @yanghaochang104 to review or simply refer to my implementation. I believe it will help you boost your development efficiency. (fyi @Neilxx @joshuay1 @zztin )
@diaoga Are you happy with the layout of the admin console? Is sight-seeing
the correct term for you? If I remember correctly, you told us once regarding the term, but I did not manage to find the note out. I would love to hear some comments regarding the dashboard if any!
@tai271828 Based on the discussion in the PyCon sprint (#44 ), are we going to use the old ohshown_event table instead to have a new one? I am fine with reusing the old ohshown_event table as the main table, but maybe we need to review the design @yanghaochang104 made (https://github.com/OH-SHOWN/ohshown-backend/issues/44#issuecomment-1066063470) to see if it fits.
Thanks @tai271828 I can understand what "sight-seeing" means but I think "Sighting" is a simpler and better option.
2. @diaoga Are you happy with the layout of the admin console? Is
sight-seeing
the correct term for you? If I remember correctly, you told us once regarding the term, but I did not manage to find the note out. I would love to hear some comments regarding the dashboard if any!
I think "date_of_encounter " is even better. It fit both condition of sighting and finding bear signs.
@tai271828 Based on the discussion in the PyCon sprint (#44 ), are we going to use the old ohshown_event table instead to have a new one? I am fine with reusing the old ohshown_event table as the main table, but maybe we need to review the design @yanghaochang104 made (#44 (comment)) to see if it fits.
Both work. Additionally, both approaches do not conflict with each other, so we can do them in parallel. Simply picking up which part you are interested in and do it will be great and appreciated.
For people who are interested in making new tables, feel free to do it by creating pull requests.
For people who are interested in re-using old/original tables being refactored, also feel free to do it by creating pull requests.
I don't see any potential conflict if the APIs use different namespaces, e.g. v2
url style or -ng
suffix style.
As a community-orientated project, I will suggest let people who create pull requests drive the "direction" of this project. We will respect the opinions from people who create pull requests, and discuss the direction of the project with the pull request to get our common consensus.
For example, I created a pull request to implement the approach of re-using/refactoring the old tables today, and I may create another pull request to implement the approach of creating new tables if I am interested in doing some "experiments". Feel free to let me know if this approach bothers you very much. Let's see if we can get a mutual agreement.
Fixed the bug found in this pull request by @yanghaochang104 and no one object to the model change approach, let me land the pull request and move forward. Thank you everyone for your review!! <3
This pull request aims at 2 missiones:
After landing this pull request, you should see the django admin console looks like this:
Steps to Verify
docker-compose -f docker-compose.dev.yml down --rmi all --volumes; sudo rm -rf /tmp/disfactory_d*; docker-compose -f docker-compose.dev.yml up -d; sleep 15; docker-compose exec web python manage.py createsuperuser ;docker-compose logs --tail 100 -f web
api/ohshown_event
in the admin console.Expected Result