| Commit message (Collapse) | Author | Age | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The timeline app is introduced, moved from the home app.
- Add a basic README.md to illustrate the overall code breakdown of the
app as it is in the current stage.
- Two entries are added for now.
- Add ability to link headers using the slug portion of the filename.
- The way markdown files are fetched is similar to that of the resources
app - using the AppConfig ready() function, all resources are ensured
to be only fetched once when the app is first laoded.
I debated whether to introduce the new functionality in the home app
instead, without creating a new app. Eventually I decided extracting it
to a standalone app now is better as it allows easier extension of
functionality in the future. The home app can remain as it is to only
server the `/` homepage.
The timeline CSS is kept the same, as with the structure of the timeline
HTML template.
Once the CSS rewrite PR is merged, it's relatively easy to fix conflicts
here (again, since timeline is now its own app, with the CSS file and
HTML template moved - extra advantage).
References to `home:timeline` are updated to use `timeline:index`
throughout the codebase, as far as my ripgrep search could go.
The format of the markdown + YAML entries are still up for debate, so
I've only added the first two entries for now. They can be completely
overwritten in the future once the formats are decided by using a script
to convert all the data from my JSON file into individual markdown
files:
http://0x0.st/Xr78.txt
This link should last for at least a few months. (Originally saved on
https://paste.pythondiscord.com/KPJA, but it expires on 12th April 2024.)
|
| |
|
|
|
|
|
|
|
|
|
| |
This fixes a problem where running the unit tests successively a lot
would result in 403 ratelimit exceeded errors being thrown due to the
GitHub API being called by the app.
Fixes #918
Co-authored-by: wookie184 <[email protected]>
|
|
|
|
|
|
|
|
| |
This commit also moves the nested structures for models and views in the
home app into a single module, as they were not split up as part of the
subpackage, with the goal of making this a bit more overseeable.
Part of #674.
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Signed-off-by: Hassan Abouelela <[email protected]>
# Conflicts:
# poetry.lock
# pydis_site/settings.py
# pyproject.toml
|
| |
| |
| |
| | |
Signed-off-by: Hassan Abouelela <[email protected]>
|
|/
|
|
|
|
|
| |
Adds an explicit setting for static builds instead of relying on the
environment variable.
Signed-off-by: Hassan Abouelela <[email protected]>
|
|
|
|
|
|
|
|
| |
The requests library has been replaced by httpx. It's a drop-in
replacement, but provides a better interface for certain things,
such as client sessions, and sync/async support.
Signed-off-by: Hassan Abouelela <[email protected]>
|
| |
|
| |
|
|
|
|
| |
The constants module more or less did what belongs to the settings.
|
|
|
|
|
| |
Adds configuration which specifies how routes should be handled when
building a static preview.
|
|\ |
|
| |
| |
| |
| | |
Fixes breaking tests
|
| |
| |
| | |
In accordance with a poll in #dev-contrib, King Arthur becomes the 6th repository featured on the Python Discord homepage.
|
| |\ |
|
| | |
| | |
| | |
| | | |
Not having this timeout could cause a worker to hang indefinitely
|
| |/ |
|
|\| |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These changes mainly aim to prevent multiple concurrent requests from
deadlocking the table due to the lazy evaluation imposed by `objects.all()`,
and introduce some quality of life changes whilst doing so.
To prevent unwanted locks, the following is done:
- Instead of evaluating the first item of `objects.all()` only in order to
determine when the table was most recently updated, we query for the least
recent updated entry and use that instead. As we use `.first()`, the model
instance is loaded directly.
The following quality of life changes are introduced:
- Instead of manual "update or create" logic for repositories retrieved from
the API, use Django's `update_or_create` instead.
- Instead of manual bulk creation of entries on initial data retrieve, Django's
`bulk_create` method is used instead.
- To allow for local testing of this endpoint without having to manually set up
GitHub REST authorization, anonymous GitHub access is used when no
`GITHUB_TOKEN` is configured.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
In more detail:
- Use Django URL namespaces (e.g. `api:bot:infractions`) instead of
`django_hosts` host argument.
- Update the hosts file setup documentation to remove subdomain entries.
- Update the hosts file setup documentation to mention that the entry of
`pythondiscord.local` is not required and mainly for convenience.
- Rename the `APISubdomainTestCase` to the more fitting
`AuthenticatedAPITestCase`, as authentication is all that is left that the
class is doing.
- Drop dependency to `django_hosts`.
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Articles was a good name, but we want an `articles` category in
the future. `/pages/guides/` and `/pages/articles/` are clearer in name
than `/articles/guides/` and `/articles/articles/`.
|
| |\ |
|
| | |\ |
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | |/
| | |/| |
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As this system will be used for more than just guides,
I had to do some refactoring to match this system with plans.
Basically now there isn't guides, but articles instead.
|
| | | | | |
|
| | | | | |
|
| |_|/ /
|/| | | |
|
|\ \ \ \
| |_|_|/
|/| | | |
Dewikification - Create app for resources + index page of resources
|
| | | |
| | | |
| | | | |
Co-authored-by: Jeremiah Boby <[email protected]>
|
| |\ \ \
| | | |/
| | |/| |
|
| | |/
| |/| |
|
| | | |
|
| |/
|/| |
|
| | |
|