From 63e914267fcc521c2897ec0edf73c95e5bfb792a Mon Sep 17 00:00:00 2001
From: Daniel Roy Greenfeld <62857+pydanny@users.noreply.github.com>
Date: Mon, 30 Oct 2023 18:24:33 +0000
Subject: [PATCH 1/2] Use includes so the README matches the docs index
---
.readthedocs.yml | 5 +----
README.md | 6 ++++--
docs/index.md | 39 +++++----------------------------------
docs/requirements.txt | 2 --
mkdocs.yml | 4 +++-
pyproject.toml | 4 +++-
6 files changed, 16 insertions(+), 44 deletions(-)
delete mode 100644 docs/requirements.txt
diff --git a/.readthedocs.yml b/.readthedocs.yml
index 788f699..3405a18 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -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:
diff --git a/README.md b/README.md
index 858691d..e524890 100644
--- a/README.md
+++ b/README.md
@@ -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
@@ -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
diff --git a/docs/index.md b/docs/index.md
index 26a8734..61edb01 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -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()
-```
-
-```
-, ]>
-```
-
-!!! tip "Full Usage"
-
- Learn how to use all the awesome features of dj-notebook in the [usage page](./usage)!
-
-
+{%
+ include-markdown "../README.md"
+ start=""
+ end=""
+%}
diff --git a/docs/requirements.txt b/docs/requirements.txt
deleted file mode 100644
index bd53c87..0000000
--- a/docs/requirements.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-mkdocs-material
-mkdocs-jupyter
\ No newline at end of file
diff --git a/mkdocs.yml b/mkdocs.yml
index 5bb18a5..64c6c19 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -22,10 +22,12 @@ plugins:
remove_tag_config:
remove_input_tags:
- hide_code
+ - include-markdown:
+ start:
+ end:
- search
- social
-
nav:
- Introduction: index.md
- Installation:
diff --git a/pyproject.toml b/pyproject.toml
index abf5d65..aadd5cc 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -54,7 +54,9 @@ test = [
]
docs = [
"mkdocs-material",
- "mkdocs-jupyter"
+ "mkdocs-jupyter",
+ "mkdocs-material[imaging]",
+ "mkdocs-include-markdown-plugin"
]
[project.urls]
From b402622deafdeffce92b8dfab0c6376915290094 Mon Sep 17 00:00:00 2001
From: Daniel Roy Greenfeld <62857+pydanny@users.noreply.github.com>
Date: Mon, 30 Oct 2023 20:23:45 +0000
Subject: [PATCH 2/2] List more features in the readme
---
README.md | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index e524890..942389d 100644
--- a/README.md
+++ b/README.md
@@ -16,12 +16,14 @@ Full documentation available at [dj-notebook](https://dj-notebook.readthedocs.io
The ever-growing list of features:
-- Easy ipython notebooks with Django
-- Built-in integration with the imported objects from django-extensions
+- Easy Jupyter notebooks with Django
+- Built-in integration with the imported objects from django-extensions `shell_plus`
+- Saves the state between sessions so you don't need to remember what you did
- Inheritance diagrams on any object, including ORM models
- Converts any Django QuerySet to Pandas Dataframe
-- Handy function for displaying mermaid charts in
+- Handy function for displaying MermaidJS charts
- Generates visual maps of model relations
+- Works in the browser, VSCode, PyCharm, Emacs, Vim, and more!
## Installation
@@ -85,8 +87,18 @@ Generates this image
+Here's another useful diagram:
+
+```python
+plus.model_graph(plus.User)
+```
+
+
+
## QuerySet to Dataframe
+Want to convert a Django query to a Pandas Dataframe? We got you covered.
+
```python
plus.read_frame(plus.User.objects.all())
```