codalab-competitions icon indicating copy to clipboard operation
codalab-competitions copied to clipboard

dynamic news additions

Open bbearce opened this issue 3 years ago • 2 comments

@ mention of reviewers

@Didayolo

A brief description of the purpose of the changes contained in this PR.

Add ability for addition of news through django admin panel

Known issues to be addressed in a separate PR

None

A checklist for hand testing

  • [X] deploy codalab
  • [X] create user and make superuser and staff
  • [X] navigate to http://some-codalab-instance.com/admin
  • [X] find new web db called NewsPost: image
  • [X] Make new news post: image
  • [X] View at http://some-codalab-instance.com/highlights in the news section (bottom-right).

Any relevant files for testing

There is a live demo below and if you log in with provided user you can access the admin area to see the database. Live demo: https://codalab-python3-test.eastus.cloudapp.azure.com/highlights

user: challenge-organizer; pass: testtest

Misc. comments

a) Old News posts that are currently on git are left as is statically on page. I did consider and started making a fixture to pre-load the database with (we can still do) , but I kind of thought where possible we should just have the functionality rather than data hard coded. Plus that news may not last forever and may not always be shown.

b) My migration addition for the NewsPost table also added alterations for the storage in the competitions table. I noticed past commits on git do this if migrations are added. One concern is that my Azure storage account key is checked in with the code in the migration file. This is a testing environment so it doesn't matter to me as I will delete soon anyways. However I'm wondering if this means I did something wrong or not. Anyways I think it's fine.

Checklist

  • [X] Code review by me
  • [X] Hand tested by me
  • [X] I'm proud of my work
  • [ ] Code review by reviewer
  • [ ] Hand tested by reviewer
  • [ ] Ready to merge

bbearce avatar Apr 10 '22 03:04 bbearce

@bbearce Was Tyler's review taken into account? Do you think this is ready to merge?

Didayolo avatar Oct 13 '22 09:10 Didayolo

If I'm being honest, not yet. This would need a tiny bit of attention I think. Something about the @deconstructible decorator needs to be addressed. There is also a question about using the newsletter app versus the web app. I kind of dropped the ball on this when switching to codabench. I can revisit.

bbearce avatar Oct 16 '22 18:10 bbearce