aboutsummaryrefslogtreecommitdiffstats
path: root/manage.py (unfollow)
Commit message (Collapse)AuthorLines
2021-02-24Simplify nominations viewsetGravatar ks129-48/+3
After moving entries to nomination serializer we can get rid from GET request handlers and let DRF handle this. Also PATCH and POST handlers got some simplification by removing manual entries setting.
2021-02-24Add entries field to Nomination serializerGravatar ks129-1/+3
After setting related_name in NominationEntry model nomination field, we can just provide serializer and DRF automatically fetch all related entries.
2021-02-24Merge nomination migrationsGravatar ks129-18/+3
This doesn't make sense to have 3 small migrations for one PR, so I merged 2 existing migrations and 1 new, ordering and related_name adding migrations to one.
2021-02-24Set default ordering of NominationEntry to inserted_at decreasingGravatar ks129-0/+4
Set it here so we don't have to set it every place where we fetch entries.
2021-02-24Set related_name option of nomination field of NominationEntryGravatar ks129-1/+2
In order to use entries in serializer without manually setting entries key we have to use related_name option to automatically fetch all related entries.
2021-02-22Update nomination-related tests to cover recent table-splitting changesGravatar ks129-21/+139
2021-02-22Small improvements in nomination viewsetGravatar ks129-31/+31
2021-02-22Change NominationEntry import location in serializersGravatar ks129-1/+1
2021-02-22Import NominationEntry to models __init__.pyGravatar ks129-1/+2
2021-02-22Wrap validation errors to []Gravatar ks129-5/+5
2021-02-22Add rollback to nominations table split migrationGravatar ks129-1/+14
2021-02-22Disable creating multiple nomination entries of one nomination for one actorGravatar ks129-0/+10
2021-02-22Migrate PATCH request for 2-table nominations systemGravatar ks129-10/+60
2021-02-22Add reviewed field to nomination serializerGravatar ks129-1/+1
2021-02-22Update nominations viewset GET and POST to make this working with 2-table systemGravatar ks129-23/+96
2021-02-22Change nominations serializer and add nomination entry serializerGravatar ks129-2/+18
2021-02-22Change nominations admin interface and add nomination entries interfaceGravatar ks129-13/+67
2021-02-22Split nomination model to 2 tables and create migrationsGravatar ks129-12/+112
2021-02-18Update helper countGravatar Matteo Bertucci-1/+1
2021-02-10Don't change the name of the host for subdomainsGravatar Joe Banks-1/+1
The host is used to build reverse URLs during tests, changing it causes it to fail.
2021-02-10Update hosts.pyGravatar Joe Banks-1/+4
2021-02-10Update ALLOWED_HOSTSGravatar Joe Banks-5/+1
Add internal domain for API routing and remove legacy routes for pydis.com domains (which are now redirected at the edge)
2021-01-22Update the README badgesGravatar Matteo Bertucci-3/+4
2021-01-04Use wildcard for ALLOWED_HOSTS in debug modeGravatar Mark-15/+1
2021-01-02Changed Python language hook to system.Gravatar xithrius-1/+1
2020-12-26Improve the RepositoryMetadata cleanup code.Gravatar Leon Sandøy-3/+1
Co-authored-by: Dennis Pham <[email protected]>
2020-12-21relax coverage requirement in home routeGravatar Joe Banks-0/+1
2020-12-22Make last_updated field automatically update.Gravatar Leon Sandøy-8/+25
Previously, we were operating under a bad assumption that we would be updating the last_updated field in the RepositoryMetadata objects whenever we updated the objects with new data from the GitHub API. Upon closer inspection, this is not at all what we're doing, and some of those repository objects had not been updated in over a year! This introduces `auto_now` to the field, which will ensure that it is automatically updated whenever the object is updated.
2020-12-21Change pydis-site to site in Sentry SDK initializationGravatar ks129-1/+1
2020-12-21Change pydis-site to site in workflowGravatar ks129-1/+1
2020-12-20Fix Git SHA getting in workflowGravatar ks129-1/+1
2020-12-20Don't include .git in Docker containerGravatar ks129-0/+1
2020-12-20Remove GitPython dependencyGravatar ks129-27/+2
2020-12-20Get Git SHA from environement instead of GitPython packageGravatar ks129-4/+2
2020-12-20Set Git SHA during build workflowGravatar ks129-0/+2
2020-12-20Add Git SHA consuming and putting to environment in DockerfileGravatar ks129-1/+5
2020-12-20Bump Sentry SDK version from 0.14 to 0.19Gravatar ks129-154/+167
2020-12-19Update verified_at fields to joined_at fieldsGravatar Joe Banks-7/+7
2020-12-19Swap verified_at for joined_atGravatar Joe Banks-1/+2
2020-12-16Add codeowner entires for ks129Gravatar ks129-1/+4
2020-12-13Increase per_page to 100 for GitHub API call.Gravatar Leon Sandøy-1/+1
Snekbox was being banished to page 2 and we were not iterating pages, so it was not appearing in the data we got from our call to /repos. This commit changes the request to use `per_page=100`, which will work at least until we have >100 repos in our organisation.
2020-12-13Clean up stale metadata when HomeView starts.Gravatar Leon Sandøy-0/+40
We don't want to keep lots of old metadata for repos we no longer need to track on the frontpage. Previously, whenever we changed the frontpage line-up, we'd be left with useless, stale data in the database. This fixes that, and adds tests.
2020-12-13Remove pointless try/except.Gravatar Leon Sandøy-24/+7
I don't think we need to check for TypeError here, so that saves us the trouble of testing these lines to appease coverage.
2020-12-13Add a test repo with bad types.Gravatar Leon Sandøy-1/+8
This should restore 100% coverage.
2020-12-13Fix test for HomeView.Gravatar Leon Sandøy-7/+1
Instead of building "fake repos", we're now just omitting them, so this test needs to be updated.
2020-12-13Add even more sanity for the HomeView.Gravatar Leon Sandøy-72/+81
This rewrite will ensure we always return whichever repositories we're able to resolve, and none of the others. It also shortens the code, shrinks all the try/excepts, and generally makes things a little more readable.
2020-12-13Completely remove Projects section if no data.Gravatar Leon Sandøy-48/+50
Instead of showing an empty Projects section, we'll just omit it if we can't resolve any of our projects. Otherwise, we'll show the projects we can resolve.
2020-12-13Add some sanity to frontpage projects.Gravatar Leon Sandøy-16/+22
If no API data is available, the front page shouldn't crash and burn. This commit will ensure the front page will just render without the projects it can't get API data for instead of crashing the whole thing.
2020-12-12Fix incorrectly specified environment variableGravatar Sebastiaan Zeeff-1/+1
When I changed the name of SITE_SENTRY_DSN to SITE_DSN, I accidentally left an old reference in place.
2020-12-12Change env var from SITE_SENTRY_DSN to SITE_DSNGravatar Sebastiaan Zeeff-1/+1
The name of the environment variable was shortened during our refactor of the Sentry secrets. Changed `settings.py` to reflect that change.