| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
| |
For string fields NULL as default is not suggested, so use empty string instead.
|
| |
|
|
| |
Entries isn't handled manually anymore so these tests have no point.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
After setting related_name in NominationEntry model nomination field,
we can just provide serializer and DRF automatically fetch
all related entries.
|
| |
|
|
|
| |
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.
|
| |
|
|
|
| |
Set it here so we don't have to set it every place where we
fetch entries.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
| |
The host is used to build reverse URLs during tests, changing it causes it to fail.
|
| | |
|
| |
|
| |
Add internal domain for API routing and remove legacy routes for pydis.com domains (which are now redirected at the edge)
|
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |\ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | | |
|
| | | |
| | |
| | | |
Added this mixin and documented this in doctoring.
|
| | | |
| | |
| | | |
Co-authored-by: Dennis Pham <[email protected]>
|
| | |/
|/|
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
I don't think we need to check for TypeError here, so that saves us the
trouble of testing these lines to appease coverage.
|
| | |
| |
| |
| | |
This should restore 100% coverage.
|
| | |
| |
| |
| |
| | |
Instead of building "fake repos", we're now just omitting them, so this
test needs to be updated.
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| | |
When I changed the name of SITE_SENTRY_DSN to
SITE_DSN, I accidentally left an old reference in place.
|
| |/
|
|
|
| |
The name of the environment variable was shortened during our
refactor of the Sentry secrets. Changed `settings.py` to reflect
that change.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|