django-flatqueries
Installing the app package from PyPI
If you already have a working Django 4+ project and you just want to install the app:
-
Get the package: pip install django-flatqueries
-
Add 'flatqueries' to your
INSTALLED_APPSin settings.py. -
Add this to your urls.py:
path("flatqueries/", include("flatqueries.urls"))
-
Create the database table required by this app:
python manage.py migrate
-
Make sure you have a template that can be resolved as
base.htmland contains acontentblock.
Getting the sample project
This project runs out-of-the box on Django 4.2.17 (Python 3.8.10 and 3.12.3).
- Grab the code. git clone https://github.com/guitarmanvt/django-flatqueries demo
- cd demo/sample
- Create the database and a superuser. python manage.py migrate python manage.py createsuperuser
- Load the demo data. *(Optional, but see deployment note) python manage.py loaddata demo_data.json
- Start the local development server. python manage.py runserver
- Login at http://127.0.0.1:8000/admin to play with flatqueries.
Usage
TO RUN A FLATQUERY
- On its view page, click the "view on site" button.
- Click the "Run" button.
DEPLOYMENT: VERY IMPORTANT
If you put this on another domain, you need to make sure your "site" values are correct. Otherwise, the "view on site" button will not work correctly!
SECURITY
For editing, the standard Django Admin permissions apply. Any superuser will be able to edit, as well as any staff person with the appropriate permissions.
For running queries, an additional permission is needed for staff users.
Assign flatqueries.can_run_query to grant this permission to users or groups.
Still, be careful not to let query URLs fall into the hands of users you don't want running them. If you ignore this warning, then any trouble that results is YOUR OWN FAULT. :P
Changelog
1.0.1
- Added changelog
- Included (missing) migrations in package
Metadata
Release files for django-flatqueries 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_flatqueries-1.0.2.tar.gz | 4.4 kB | Without provenance | Details for django_flatqueries-1.0.2.tar.gz |
Release files / django_flatqueries-1.0.2.tar.gz
| Download URL | django_flatqueries-1.0.2.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
171484fe70bf05cb9bba24eadfa968b3ea6dd4b09aa2f81ba690721a71183447
|
|
BLAKE2b-256 checksum How to use checksums |
b80ac2a1318c6c8d18e9ac97bb65c30b7215f0ef9357c8060ef423d2833d1a6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.8.10
|
Security for django-flatqueries 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.