Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashiqyousuf/sqlqm
Implemented custom decorator for checking your db queries in development mode
https://github.com/ashiqyousuf/sqlqm
django python3 sql
Last synced: 3 months ago
JSON representation
Implemented custom decorator for checking your db queries in development mode
- Host: GitHub
- URL: https://github.com/ashiqyousuf/sqlqm
- Owner: ashiqYousuf
- Created: 2024-09-14T07:05:26.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-16T16:33:44.000Z (3 months ago)
- Last Synced: 2024-09-30T12:21:04.784Z (3 months ago)
- Topics: django, python3, sql
- Language: Python
- Homepage:
- Size: 141 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Implemented a custom python decorator for examing your sql queries generated by Django
### You can check the following things from terminal logs:-
1. Number of Queries
2. Number of Duplicate Queries
3. Sql Query itself
4. Time taken to Query DB
### Cloning this repo? Follow as:-
1. git clone https://github.com/ashiqYousuf/sqlqm.git
2. Change directory to root dir (sqlqm)
3. Create virtualenv & activate it
4. Install requirements: pip install -r requirements.txt
5. Run migrations: python3 manage.py migrate
6. Populate dummy data for testing as:-
. activate virtualenv. python manage.py shell (and write following lines in shell)
. from sqlquery.factory import *
. ProductFactory.create_batch(100) # This will create 100 products in DB.7. Start server: python3 manage.py runserver
![alt text](image.png)
![alt text](image-1.png)
![alt text](image-2.png)