-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create table project status 46 #449
base: main
Are you sure you want to change the base?
Create table project status 46 #449
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Denzel,
Thank you for working on this! I tested it, and everything worked well on my end. I just have a couple of questions:
- Why are the descriptions on the 5th and 6th lines in quotation marks in the app/core/initial_data/PD_Table and Field Explanations - ProjectStatus - Data.csv file? Do you think this has an impact on how the code works?
- Shouldn't the uuid field be mentioned in the _seed.py file?
Hey Del, thanks for the comments.
|
I guess it depends on if we still need it set to specific values. The values it's being set to in the spreadsheet aren't really UUID values. Originally, I let the database generate the ID/UUID values since it's an auto-generated field and the initial data sheets didn't have the values. Then @ethanstrominger said he needed to set the values for testing purposes, so we did that for some of the tables. But I don't think it's being used in tests right now? We should bring this up at the meeting and ask if we still need to set this. |
2e5c13c
to
dbe8ef8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dmartin4820 ,
Thanks for your contribution! Nice work on this, it looks great to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this! I looked at this more closely and found a couple more things to improve.
app/core/models.py
Outdated
@@ -137,7 +149,9 @@ class Project(AbstractBaseModel): | |||
"Authorization: token [gh_PAT]" \ | |||
https://api.github.com/repos/[org]/[repo]', | |||
) | |||
# current_status_id = models.ForeignKey("status", on_delete=models.PROTECT) | |||
current_status_id = models.ForeignKey( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be current_status
.
The old code was written before we realized Django convention is to drop the _id
ending for foreign key relations.
Closed,Closed, possibly not completed (usually does not show up on the website). Unlikely to be reopened. | ||
Deleted,Holds for 90 days before final removal (used for test project entries, or mistakes that do not need to be remembered) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, can you add back the double quotes?
I think the double quotes are actually necessary for the convert.py script to work. They're likely added by google to help any csv parser read it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added back. It was definitely needed otherwise the csv parser would not run.
b940f36
to
586dd86
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes. They look great!
I'm sorry, I just noticed another little thing.
The admin site adds an "s" at the end when displaying the plural form of the model. It doesn't know to use "project statuses".
In models.py
you can search for "verbose_name_plural" and use that as an example to add the plural for it. I think you should make it all lowercase and let Django deal with the capitalization. I see the existing code is doing something different.
Fixes #46
What changes did you make?
Why did you make the changes (we will use this info to test)?
N/A