Skip to content

Commit

Permalink
Merge pull request #1021 from jlucas91/jlucas91-cleanup-doc-warnings
Browse files Browse the repository at this point in the history
Cleanup documentation warnings
  • Loading branch information
vitalik authored Jan 8, 2024
2 parents 5a7c7cd + 4639707 commit efbc835
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 23 deletions.
7 changes: 2 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,8 @@ make test
Now you are ready to make your contribution


When you done:

Please make sure you made tests to cover your functionality

and finally check the resulting coverage of your contribution did not suffer
When you're done please make sure you to test your functionality
and check the coverage of your contribution.

```
pytest --cov=ninja --cov-report term-missing tests
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/guides/input/form-params.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ username: Form[str]

## Using a Schema

In a similar manner to [Body](../body/#declare-it-as-a-parameter), you can use
In a similar manner to [Body](body.md#declare-it-as-a-parameter), you can use
a Schema to organize your parameters.

```python hl_lines="12"
Expand All @@ -36,7 +36,7 @@ a Schema to organize your parameters.

## Request form + path + query parameters

In a similar manner to [Body](../body/#request-body-path-query-parameters), you can use
In a similar manner to [Body](body.md#request-body-path-query-parameters), you can use
Form data in combination with other parameter sources.

You can declare query **and** path **and** form field, **and** etc... parameters at the same time.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/response/config-pydantic.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ results:

## Custom Config from Django Model

When using [`create_schema`](../django-pydantic-create-schema/#create_schema), the resulting
When using [`create_schema`](django-pydantic-create-schema.md#create_schema), the resulting
schema can be used to build another class with a custom config like:

```python hl_lines="10"
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/response/django-pydantic-create-schema.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Using create_schema

Under the hood, [`ModelSchema`](../django-pydantic/#modelschema) uses the `create_schema` function.
Under the hood, [`ModelSchema`](django-pydantic.md#modelschema) uses the `create_schema` function.
This is a more advanced (and less safe) method - please use it carefully.

## `create_schema`
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/guides/response/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def tasks(request):
return Task.objects.all()
```

See the [async support](../async-support#using-orm) guide for more information.
See the [async support](../async-support.md#using-orm) guide for more information.


## FileField and ImageField
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/motivation.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Some companies are already looking for developers with django ninja experience.

#### Main Features

1) Since you can have multiple Django Ninja API instances - you can run [multiple API versions](/guides/versioning/) inside one Django project.
1) Since you can have multiple Django Ninja API instances - you can run [multiple API versions](guides/versioning.md) inside one Django project.

```python
api_v1 = NinjaAPI(version='1.0', auth=token_auth)
Expand All @@ -75,7 +75,7 @@ urlpatterns = [
]
```

2) The Django Ninja 'Schema' class is integrated with the ORM, so you can [serialize querysets](/guides/response/#returning-querysets) or ORM objects:
2) The Django Ninja 'Schema' class is integrated with the ORM, so you can [serialize querysets](guides/response/index.md#returning-querysets) or ORM objects:

```python
@api.get("/tasks", response=List[TaskSchema])
Expand All @@ -88,6 +88,6 @@ def tasks_details(request):
task = Task.objects.first()
return task
```
3) [Create Schema's from Django Models](/guides/response/django-pydantic/).
3) [Create Schema's from Django Models](guides/response/django-pydantic.md).

4) Instead of dependency arguments, **Django Ninja** uses `request` instance attributes (in the same way as regular Django views) - more detail at [Authentication](/guides/authentication/).
4) Instead of dependency arguments, **Django Ninja** uses `request` instance attributes (in the same way as regular Django views) - more detail at [Authentication](guides/authentication.md).
2 changes: 1 addition & 1 deletion docs/docs/proposals/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ You can create a proposal by making a pull request with a new page under [`docs/

Please see the current proposals:

- [Class Based Operations](cbv)
- [Class Based Operations](cbv.md)
8 changes: 0 additions & 8 deletions docs/docs/whatsnew_v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,9 @@ def test_view(request):
`paginate_queryset` method now takes `request` object




#### Backwards incompatible stuff
- resolve_xxx(self, ...) - support resolve with (self) is dropped in favor of pydantic build-in functionality
- pydantic v1 is no longer supported
- python 3.6 is no longer supported

BTW - if you like this project and still did not give it a github start - please do so ![github star](img/github-star.png)

[button]




1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ nav:
- Intro: proposals/index.md
- proposals/cbv.md
- proposals/v1.md
- What's new in V1: whatsnew_v1.md
markdown_extensions:
- markdown_include.include
- markdown.extensions.codehilite:
Expand Down

0 comments on commit efbc835

Please sign in to comment.