Skip to content

Commit 96852d1

Browse files
authored
Update README.md
1 parent 8fc9625 commit 96852d1

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[![Downloads](https://static.pepy.tech/personalized-badge/django-query-to-table?period=total&units=international_system&left_color=black&right_color=green&left_text=Downloads)](https://pepy.tech/project/django-query-to-table)
22

3-
### django-query-to-table (DjangoQtt) is an easy to use django package to generate html table from sql query.
3+
### django-query-to-table (DjangoQtt) is an easy to use django package to generate html table from django queryset or sql query.
44

55
You can read more about this package here : [django query to table package](https://mshaeri.com/blog/generate-html-table-report-from-sql-query-in-django/)
66

7-
The package contains two functions named:
7+
The package has two functions, named:
88
- **generate_from_sql**: Generate HTML table by given SQL query
99
- **generate_from_queryset**:Generate HTML table by given Django queryset
1010

11-
Parameters:
11+
Parameters and options:
1212

1313
* title : The title of the report that will be shown on top of table
1414
* sqltext/queryset : The sql select query to retrieve data / django queryset
@@ -60,10 +60,12 @@ def listOfPersons(request):
6060

6161
```
6262

63-
Since Django 4.0.4 introduced a security fix that disallows spaces in aliases, you can use double underscores (__) as a substitute in your aliases. The table generator will automatically display them as spaces in the output. Here's an example:
64-
6563
- Generate HTML table from querset:
6664

65+
> Since Django 4.0.4 introduced a security fix that disallows spaces in aliases, you can use double underscores (__) as a substitute in your aliases. The table generator will automatically display them as spaces in the output. Here's an example:
66+
67+
68+
6769
```python
6870
from django_query_to_table import DjangoQtt
6971
from django.http import HttpResponse
@@ -102,4 +104,7 @@ def listOfPersons(request):
102104

103105
The table will be look like this:
104106

105-
![table](docs/django_query_to_table.jpg)
107+
![table](docs/django_query_to_table.jpg)
108+
109+
110+
If you find this package useful, please consider giving it a star! ⭐ It helps support the project and lets others discover it.

0 commit comments

Comments
 (0)