Skip to content

Commit

Permalink
Use includes so the README matches the docs index
Browse files Browse the repository at this point in the history
  • Loading branch information
pydanny committed Oct 30, 2023
1 parent 071032e commit 63e9142
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 44 deletions.
5 changes: 1 addition & 4 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ build:
python: "3.10"
jobs:
pre_build:
# Generate the Sphinx configuration for this Jupyter Book so it builds.
- "pip install -r docs/requirements.txt"
- "pip install ."
- pip install "mkdocs-material[imaging]"
- "pip install '.[docs]'"
- "mkdocs build"

mkdocs:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Full documentation available at [dj-notebook](https://dj-notebook.readthedocs.io

## Features

The ever-growing list of features:

- Easy ipython notebooks with Django
- Built-in integration with the imported objects from django-extensions
- Inheritance diagrams on any object, including ORM models
Expand Down Expand Up @@ -89,12 +91,12 @@ Generates this image
plus.read_frame(plus.User.objects.all())
```

## Check out the official documentation for more things you can do!
## More things you can do!

[dj-notebook official documentation](https://dj-notebook.readthedocs.io/)


# Contributors
## Contributors

<!-- readme: contributors -start -->
<table>
Expand Down
39 changes: 5 additions & 34 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,7 @@
# Home

![dj-notebook logo](img/dj-notebook-logo.png)

_Django + shell_plus + Jupyter notebooks made easy_

A Jupyter notebook with access to objects from the Django ORM is a powerful tool to introspect data and run ad-hoc queries.

## Features

The ever-growing list of features:

- Easy ipython notebooks with Django
- Built-in integration with the imported objects from django-extensions
- Inheritance diagrams on any object, including ORM models
- Converts any Django QuerySet to Pandas Dataframe
- Handy function for displaying mermaid charts in
- Generates visual maps of model relations

## Examples

```python
from dj_notebook import activate
plus = activate()
plus.User.objects.all()
```

```
<QuerySet [<User: Audrey>, <User: Daniel>]>
```

!!! tip "Full Usage"

Learn how to use all the awesome features of dj-notebook in the [usage page](./usage)!


{%
include-markdown "../README.md"
start="<!--intro-start-->"
end="<!--intro-end-->"
%}
2 changes: 0 additions & 2 deletions docs/requirements.txt

This file was deleted.

4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ plugins:
remove_tag_config:
remove_input_tags:
- hide_code
- include-markdown:
start: <!--start-->
end: <!--end-->
- search
- social


nav:
- Introduction: index.md
- Installation:
Expand Down
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ test = [
]
docs = [
"mkdocs-material",
"mkdocs-jupyter"
"mkdocs-jupyter",
"mkdocs-material[imaging]",
"mkdocs-include-markdown-plugin"
]

[project.urls]
Expand Down

0 comments on commit 63e9142

Please sign in to comment.