REST API plugin for django-admin-deux - Auto-generated RESTful endpoints for all ModelAdmins
Project description
django-admin-deux-rest2
REST API plugin for django-admin-deux.
Automatically adds RESTful API endpoints to all registered ModelAdmins, providing full CRUD operations via JSON.
📚 Documentation
See the full documentation for:
- Installation instructions
- Configuration options
- API endpoint reference
- JavaScript examples with CSRF handling
- Testing with BaseCRUDTestCase
- Advanced usage
🚀 Quick Start
pip install django-admin-deux-rest2
# settings.py
from djadmin import djadmin_apps
INSTALLED_APPS = [
# ... Django apps
'myapp',
*djadmin_apps(), # Auto-discovers and registers djadmin-rest2
]
# myapp/djadmin.py
from djadmin import ModelAdmin, register
from djadmin.plugins.permissions import AllowAny
@register(Task)
class TaskAdmin(ModelAdmin):
fields = ['title', 'description', 'status']
permission_class = AllowAny() # Public API
That's it! Your model now has REST API endpoints at:
GET/POST /djadmin/api/myapp_task/GET/PUT/DELETE /djadmin/api/myapp_task/<pk>/
🎨 Demo Application
This repository includes a complete demo:
cd djadmin-rest2
python manage.py runserver
- JavaScript Todo App: http://localhost:8000/
- Admin Interface: http://localhost:8000/djadmin/todo/item/
- REST API: http://localhost:8000/djadmin/api/todo_item/
📦 Development
See DEVELOPMENT.md for development setup and testing instructions.
🤝 Contributing
Contributions are welcome! This is part of the django-admin-deux plugin ecosystem.
📄 License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_admin_deux_rest2-0.1.0.tar.gz.
File metadata
- Download URL: django_admin_deux_rest2-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10093d450d34639e2092cba6d0bc13f781f8202ce65a1a31bbf09e5cbf836849
|
|
| MD5 |
4360cf627b016773be284d383c8a8faf
|
|
| BLAKE2b-256 |
98ba31d5da411d054c05950ead642a08f991ae9f8c3ccb773eb0272a590a8436
|
File details
Details for the file django_admin_deux_rest2-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_admin_deux_rest2-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2c70dac15ded26acfef851bdac085c72eff49aa6d59fd39f8facbae2e1d6344
|
|
| MD5 |
7e1ce60738e4e7c7e30d3fe8cb58e9c4
|
|
| BLAKE2b-256 |
3a8ef863dc1d30831b2ccfed3bf54ce5d58bcfae8471650083eb1a2679e6a996
|