refactor: change repo name and URL after org migration (#924)

This commit is contained in:
Juro Oravec 2025-01-22 16:02:46 +01:00 committed by GitHub
parent ace9194733
commit 92f5497c74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 134 additions and 119 deletions

View file

@ -64,7 +64,7 @@ that accept a list of items via a slot.
In the example below, each `tab_item` component will be rendered on a separate tab page, but they are all defined in the default slot of the `tabs` component.
[See here for how it was done](https://github.com/EmilStenstrom/django-components/discussions/540)
[See here for how it was done](https://github.com/django-components/django-components/discussions/540)
```django
{% component "tabs" %}

View file

@ -31,7 +31,7 @@ As the name suggest, using provide / inject consists of 2 steps
1. Providing data
2. Injecting provided data
For examples of advanced uses of provide / inject, [see this discussion](https://github.com/EmilStenstrom/django-components/pull/506#issuecomment-2132102584).
For examples of advanced uses of provide / inject, [see this discussion](https://github.com/django-components/django-components/pull/506#issuecomment-2132102584).
## Using `{% provide %}` tag

View file

@ -9,7 +9,7 @@ To configure logging for Django components, set the `django_components` logger i
[`LOGGING`](https://docs.djangoproject.com/en/5.1/ref/settings/#std-setting-LOGGING)
in `settings.py` (below).
Also see the [`settings.py` file in sampleproject](https://github.com/EmilStenstrom/django-components/blob/master/sampleproject/sampleproject/settings.py) for a real-life example.
Also see the [`settings.py` file in sampleproject](https://github.com/django-components/django-components/blob/master/sampleproject/sampleproject/settings.py) for a real-life example.
```py
import logging

View file

@ -4,7 +4,7 @@ This guide is for you if you're upgrating django_components to v0.100 or later
from older versions.
In version 0.100, we changed how components' static JS and CSS files are handled.
See more in the ["Static files" section](https://github.com/EmilStenstrom/django-components/tree/master/sampleproject).
See more in the ["Static files" section](https://github.com/django-components/django-components/tree/master/sampleproject).
Migration steps:

View file

@ -5,9 +5,9 @@ weight: 5
## Community questions
The best place to ask questions is in our [Github Discussion board](https://github.com/EmilStenstrom/django-components/discussions).
The best place to ask questions is in our [Github Discussion board](https://github.com/django-components/django-components/discussions).
Please, before opening a new discussion, [check if similar discussion wasn't opened already](https://github.com/EmilStenstrom/django-components/discussions?discussions_q=).
Please, before opening a new discussion, [check if similar discussion wasn't opened already](https://github.com/django-components/django-components/discussions?discussions_q=).
## Community examples

View file

@ -23,5 +23,5 @@ so come aboard!
## Sponsoring
Another way you can get involved is by [donating](https://github.com/sponsors/EmilStenstrom)
Another way you can get involved is by [donating](https://github.com/django-components/django-components)
to the development of django_components.

View file

@ -5,7 +5,7 @@ weight: 7
## Install locally and run the tests
Start by forking the project by clicking the **Fork button** up in the right corner in the [GitHub](https://github.com/EmilStenstrom/django-components).
Start by forking the project by clicking the **Fork button** up in the right corner in the [GitHub](https://github.com/django-components/django-components).
This makes a copy of the repository in your own name. Now you can clone this repository locally and start adding features:
```sh
@ -58,15 +58,15 @@ tox
How do you check that your changes to django-components project will work in an actual Django project?
Use the [sampleproject](https://github.com/EmilStenstrom/django-components/tree/master/sampleproject/) demo project to validate the changes:
Use the [sampleproject](https://github.com/django-components/django-components/tree/master/sampleproject/) demo project to validate the changes:
1. Navigate to [sampleproject](https://github.com/EmilStenstrom/django-components/tree/master/sampleproject/) directory:
1. Navigate to [sampleproject](https://github.com/django-components/django-components/tree/master/sampleproject/) directory:
```sh
cd sampleproject
```
2. Install dependencies from the [requirements.txt](https://github.com/EmilStenstrom/django-components/blob/master/sampleproject/requirements.txt) file:
2. Install dependencies from the [requirements.txt](https://github.com/django-components/django-components/blob/master/sampleproject/requirements.txt) file:
```sh
pip install -r requirements.txt
@ -138,7 +138,7 @@ To publish the package to PyPI, use `twine` ([See Python user guide](https://pac
twine upload --repository pypi dist/* -u __token__ -p <PyPI_TOKEN>
```
[See the full workflow here.](https://github.com/EmilStenstrom/django-components/discussions/557#discussioncomment-10179141)
[See the full workflow here.](https://github.com/django-components/django-components/discussions/557#discussioncomment-10179141)
## Development guides

View file

@ -7,6 +7,8 @@ _It is strongly recommended to read this section before using django-components
## Static files
**TL;DR: No action needed from v0.100 onwards. Before v0.100, use `safer_staticfiles` to avoid exposing backend logic.**
Components can be organized however you prefer.
That said, our prefered way is to keep the files of a component close together by bundling them in the same directory.
@ -68,6 +70,6 @@ python manage.py runserver
```
For a step-by-step guide on deploying production server with static files,
[see the demo project](https://github.com/EmilStenstrom/django-components/tree/master/sampleproject).
[see the demo project](https://github.com/django-components/django-components/tree/master/sampleproject).
See the older versions of the sampleproject for a setup with pre-v0.100 version.

View file

@ -3,9 +3,9 @@ title: Welcome to Django Components
weight: 1
---
<img src="https://raw.githubusercontent.com/EmilStenstrom/django-components/master/logo/logo-black-on-white.svg" alt="django-components" style="max-width: 100%; background: white; color: black;">
<img src="https://raw.githubusercontent.com/django-components/django-components/master/logo/logo-black-on-white.svg" alt="django-components" style="max-width: 100%; background: white; color: black;">
[![PyPI - Version](https://img.shields.io/pypi/v/django-components)](https://pypi.org/project/django-components/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-components)](https://pypi.org/project/django-components/) [![PyPI - License](https://img.shields.io/pypi/l/django-components)](https://github.com/EmilStenstrom/django-components/blob/master/LICENSE/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/django-components)](https://pypistats.org/packages/django-components) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/EmilStenstrom/django-components/tests.yml)](https://github.com/EmilStenstrom/django-components/actions/workflows/tests.yml)
[![PyPI - Version](https://img.shields.io/pypi/v/django-components)](https://pypi.org/project/django-components/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-components)](https://pypi.org/project/django-components/) [![PyPI - License](https://img.shields.io/pypi/l/django-components)](https://github.com/django-components/django-components/blob/master/LICENSE/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/django-components)](https://pypistats.org/packages/django-components) [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/django-components/django-components/tests.yml)](https://github.com/django-components/django-components/actions/workflows/tests.yml)
django-components introduces component-based architecture to Django's server-side rendering.
It combines Django's templating system with the modularity seen in modern frontend frameworks like Vue or React.
@ -133,7 +133,7 @@ And this is what gets rendered:
Read on to learn about all the exciting details and configuration possibilities!
(If you instead prefer to jump right into the code, [check out the example project](https://github.com/EmilStenstrom/django-components/tree/master/sampleproject))
(If you instead prefer to jump right into the code, [check out the example project](https://github.com/django-components/django-components/tree/master/sampleproject))
## Release notes

View file

@ -18,7 +18,7 @@ usage: manage.py startcomponent [-h] [--path PATH] [--js JS] [--css CSS] [--temp
<a href="https://github.com/EmilStenstrom/django-components/tree/master/src/django_components/management/commands/startcomponent.py#L8" target="_blank">See source code</a>
<a href="https://github.com/django-components/django-components/tree/master/src/django_components/management/commands/startcomponent.py#L8" target="_blank">See source code</a>
@ -132,7 +132,7 @@ usage: manage.py upgradecomponent [-h] [--path PATH] [--version] [-v {0,1,2,3}]
<a href="https://github.com/EmilStenstrom/django-components/tree/master/src/django_components/management/commands/upgradecomponent.py#L12" target="_blank">See source code</a>
<a href="https://github.com/django-components/django-components/tree/master/src/django_components/management/commands/upgradecomponent.py#L12" target="_blank">See source code</a>

View file

@ -21,7 +21,7 @@ Import as
<a href="https://github.com/EmilStenstrom/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
<a href="https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
@ -128,7 +128,7 @@ can access only the data that was explicitly passed to it:
<a href="https://github.com/EmilStenstrom/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
<a href="https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
@ -151,7 +151,7 @@ If you insert this tag multiple times, ALL CSS links will be duplicately inserte
<a href="https://github.com/EmilStenstrom/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
<a href="https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
@ -175,7 +175,7 @@ If you insert this tag multiple times, ALL JS scripts will be duplicately insert
<a href="https://github.com/EmilStenstrom/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
<a href="https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
@ -273,7 +273,7 @@ use `{% fill %}` with `name` set to `"default"`:
<a href="https://github.com/EmilStenstrom/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
<a href="https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
@ -336,7 +336,7 @@ renders
<a href="https://github.com/EmilStenstrom/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
<a href="https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
@ -416,7 +416,7 @@ user = self.inject("user_data")["user"]
<a href="https://github.com/EmilStenstrom/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>
<a href="https://github.com/django-components/django-components/tree/master/src/django_components/templatetags/component_tags.py#L117" target="_blank">See source code</a>

View file

@ -52,7 +52,7 @@ def _format_source_code_html(relative_filepath: Path, lineno: Optional[int]):
branch_path = f"tree/{SOURCE_CODE_GIT_BRANCH}"
lineno_hash = f"#L{lineno}" if lineno is not None else ""
# Generate URL pointing to the source file like
# https://github.com/EmilStenstrom/django-components/blob/master/src/django_components/components/dynamic.py#L8
# https://github.com/django-components/django-components/blob/master/src/django_components/components/dynamic.py#L8
url = f"{repo_url}/{branch_path}/{relative_filepath}{lineno_hash}"
# Open in new tab