1. sam_tools.utils, 2. Primary key based form navigation to explore next/prev records.
Project description
Installation
-
pip install sam-djtools
-
Add
sam_tools
in installed apps insettings.py
of django projectINSTALLED_APPS = [ 'sam_tools', # ... ] (at the top)
Description
It adds Next and Prev buttons to the top of each edit form of django admin site
for all the models of all the apps in your project, without need to do anything
except installing the module with pip plus adding to the top of INSTALLED_APPS
in settings.py
Instructions to run the sample usage
-
git clone https://github.com/humblesami/sam-djtools.git
-
cd sam-djtools/sample_usage
-
pip install -r requirements.txt
-
python manage.py initsql.py
5. This step will create db (sqlite) 6. will make makemigrations and migrate 7. create a super usersa
with password123
8. will also add three rows tosample_app.Model1
9. So u can directly test form navigation without doing setup -
python manage.py runsever
-
Open following url in your browser and login with given username
sa
and password123
http://127.0.0.1:8000/admin/ -
Go to http://127.0.0.1:8000/admin/sample_app/model1/1/change/
-
Add image to check preview
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sam_djtools-1.2.3.tar.gz
.
File metadata
- Download URL: sam_djtools-1.2.3.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad9ac9235fd36530523c2b523f071277432a0578d234da12963fa7f964d17bc6 |
|
MD5 | 2720b0b2a41adfe4734cef65c495dded |
|
BLAKE2b-256 | 5cb08bad59ea97ed2aeb32372e54bfae365e5ec6a3c63fef34cc9f2d88e8afed |
File details
Details for the file sam_djtools-1.2.3-py3-none-any.whl
.
File metadata
- Download URL: sam_djtools-1.2.3-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a29dabfe113c6cdb3c1b35e45dd46c5fce9b2aae714f62eeaaef0c159258087 |
|
MD5 | f217e64e5832bd609cdb5872677fd1d6 |
|
BLAKE2b-256 | 0dd8fa2384278ed2b8ba5ff84dc7c50a7c978a9853afe4087541d1fee046967f |