django-api-admin 1.1.6__tar.gz → 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. django_api_admin-1.2.0/PKG-INFO +369 -0
  2. django_api_admin-1.2.0/README.md +329 -0
  3. django_api_admin-1.2.0/django_api_admin.egg-info/PKG-INFO +369 -0
  4. django_api_admin-1.2.0/django_api_admin.egg-info/SOURCES.txt +8 -0
  5. django_api_admin-1.2.0/django_api_admin.egg-info/requires.txt +7 -0
  6. django_api_admin-1.2.0/django_api_admin.egg-info/top_level.txt +1 -0
  7. django_api_admin-1.2.0/pyproject.toml +42 -0
  8. django-api-admin-1.1.6/MANIFEST.in +0 -4
  9. django-api-admin-1.1.6/PKG-INFO +0 -123
  10. django-api-admin-1.1.6/README.md +0 -105
  11. django-api-admin-1.1.6/django_api_admin/__init__.py +0 -0
  12. django-api-admin-1.1.6/django_api_admin/actions.py +0 -50
  13. django-api-admin-1.1.6/django_api_admin/apps.py +0 -6
  14. django-api-admin-1.1.6/django_api_admin/declarations/__init__.py +0 -0
  15. django-api-admin-1.1.6/django_api_admin/declarations/classes.py +0 -50
  16. django-api-admin-1.1.6/django_api_admin/declarations/functions.py +0 -305
  17. django-api-admin-1.1.6/django_api_admin/field_attributes.py +0 -82
  18. django-api-admin-1.1.6/django_api_admin/options.py +0 -287
  19. django-api-admin-1.1.6/django_api_admin/pagination.py +0 -20
  20. django-api-admin-1.1.6/django_api_admin/permissions.py +0 -10
  21. django-api-admin-1.1.6/django_api_admin/serializers.py +0 -136
  22. django-api-admin-1.1.6/django_api_admin/sites.py +0 -331
  23. django-api-admin-1.1.6/django_api_admin/views/__init__.py +0 -0
  24. django-api-admin-1.1.6/django_api_admin/views/admin_views.py +0 -677
  25. django-api-admin-1.1.6/django_api_admin/views/site_views.py +0 -251
  26. django-api-admin-1.1.6/django_api_admin.egg-info/PKG-INFO +0 -123
  27. django-api-admin-1.1.6/django_api_admin.egg-info/SOURCES.txt +0 -24
  28. django-api-admin-1.1.6/django_api_admin.egg-info/requires.txt +0 -2
  29. django-api-admin-1.1.6/django_api_admin.egg-info/top_level.txt +0 -1
  30. django-api-admin-1.1.6/setup.py +0 -34
  31. {django-api-admin-1.1.6 → django_api_admin-1.2.0}/LICENSE +0 -0
  32. {django-api-admin-1.1.6 → django_api_admin-1.2.0}/django_api_admin.egg-info/dependency_links.txt +0 -0
  33. {django-api-admin-1.1.6 → django_api_admin-1.2.0}/setup.cfg +0 -0
@@ -0,0 +1,369 @@
1
+ Metadata-Version: 2.2
2
+ Name: django-api-admin
3
+ Version: 1.2.0
4
+ Summary: A RESTful API implementation of django.contrib.admin, designed for writing custom frontends.
5
+ Author-email: Muhammad Salah <msbizzacc0unt@outlook.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2021 Muhammad Salah
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Github, https://github.com/demon-bixia/django-api-admin
29
+ Classifier: Programming Language :: Python :: 3
30
+ Classifier: License :: OSI Approved :: MIT License
31
+ Classifier: Operating System :: OS Independent
32
+ Description-Content-Type: text/markdown
33
+ License-File: LICENSE
34
+ Requires-Dist: django
35
+ Requires-Dist: djangorestframework
36
+ Requires-Dist: djangorestframework-simplejwt
37
+ Requires-Dist: drf-spectacular
38
+ Provides-Extra: dev
39
+ Requires-Dist: django-cors-headers; extra == "dev"
40
+
41
+ <a id="readme-top"></a>
42
+
43
+
44
+
45
+ <!-- PROJECT SHIELDS -->
46
+ [![Contributors][contributors-shield]][contributors-url]
47
+ [![Forks][forks-shield]][forks-url]
48
+ [![Stargazers][stars-shield]][stars-url]
49
+ [![Issues][issues-shield]][issues-url]
50
+ [![Unlicense License][license-shield]][license-url]
51
+ [![LinkedIn][linkedin-shield]][linkedin-url]
52
+
53
+
54
+
55
+ <!-- PROJECT LOGO -->
56
+ <br />
57
+ <div align="center">
58
+ <a href="https://github.com/demon-bixia/django-api-admin">
59
+ <img src="assets/images/logo.png" alt="Logo" width="300" height="300">
60
+ </a>
61
+
62
+ <h3 align="center">Django API Admin</h3>
63
+
64
+ <p align="center">
65
+ A RESTful API implementation of django.contrib.admin, designed for writing custom frontends.
66
+ <br />
67
+ <!-- <a href="https://github.com/othneildrew/Best-README-Template"><strong>Explore the docs »</strong></a> -->
68
+ <!-- <br /> -->
69
+ <!-- <br /> -->
70
+ <!-- <a href="https://github.com/othneildrew/Best-README-Template">View Demo</a>
71
+ &middot; -->
72
+ <a href="https://github.com/othneildrew/Best-README-Template/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
73
+ &middot;
74
+ <a href="https://github.com/othneildrew/Best-README-Template/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
75
+ </p>
76
+ </div>
77
+
78
+
79
+
80
+ <!-- TABLE OF CONTENTS -->
81
+ <details>
82
+ <summary>Table of Contents</summary>
83
+ <ol>
84
+ <li>
85
+ <a href="#about-the-project">About The Project</a>
86
+ <ul>
87
+ <li><a href="#built-with">Built With</a></li>
88
+ </ul>
89
+ </li>
90
+ <li>
91
+ <a href="#getting-started">Getting Started</a>
92
+ <ul>
93
+ <li><a href="#prerequisites">Prerequisites</a></li>
94
+ <li><a href="#installation">Installation</a></li>
95
+ </ul>
96
+ </li>
97
+ <li><a href="#usage">Usage</a></li>
98
+ <li><a href="#roadmap">Roadmap</a></li>
99
+ <li><a href="#contributing">Contributing</a></li>
100
+ <li><a href="#license">License</a></li>
101
+ <li><a href="#contact">Contact</a></li>
102
+ <li><a href="#acknowledgments">Acknowledgments</a></li>
103
+ </ol>
104
+ </details>
105
+
106
+
107
+
108
+ <!-- ABOUT THE PROJECT -->
109
+ ## About The Project
110
+
111
+ [![Product Name Screen Shot][product-screenshot]](https://example.com)
112
+
113
+ The Django API Admin project is a RESTful API implementation of the `django.contrib.admin` module, designed to facilitate the creation of custom frontends. This project aims to provide developers with a robust and flexible API that mirrors the functionality of Django's built-in admin interface, allowing for seamless integration with modern web applications.
114
+
115
+ ### Key Features:
116
+ - **RESTful API**: Offers a comprehensive API for managing Django models, enabling developers to build custom administrative interfaces.
117
+ - **Custom Frontends**: Designed to support the development of tailored frontends that meet specific project requirements.
118
+ - **Extensible and Modular**: Build with the same django.contrib.admin API, allowing for easy customization and integration with existing Django projects.
119
+
120
+ The project is continuously evolving, with new features and improvements being added regularly. Contributions from the community are highly encouraged to help expand and enhance the capabilities of this tool.
121
+
122
+ To get started, follow the installation and usage instructions provided in this README. Whether you're building a new project or integrating with an existing one, Django API Admin offers the flexibility and power you need to manage your application's data effectively.
123
+
124
+
125
+
126
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
127
+
128
+
129
+
130
+ ### Built With
131
+
132
+ This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
133
+
134
+ * [![Django][Django]][Django-url]
135
+ * [![DRF][Django REST framework]][DRF-url]
136
+
137
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
138
+
139
+
140
+
141
+ <!-- GETTING STARTED -->
142
+ ## Getting Started
143
+
144
+ To set up the project locally, follow these steps:
145
+
146
+ ### Prerequisites
147
+
148
+ Before you begin, ensure you have met the following requirements:
149
+
150
+ - **Python 3.8+**: Make sure Python is installed on your machine. You can download it from [python.org](https://www.python.org/downloads/).
151
+
152
+ - **pip**: Ensure you have pip installed for managing Python packages. It usually comes with Python installations.
153
+
154
+ - **Virtual Environment**: It's recommended to use a virtual environment to manage dependencies. You can create one using `venv` or `virtualenv`.
155
+
156
+ - **rest_framework**
157
+ ```sh
158
+ pip install djangorestframework
159
+ ```
160
+ - **drf-spectacular**
161
+ ```sh
162
+ pip install drf-spectacular
163
+ ```
164
+ - **djangorestframework-simplejwt**
165
+ ```sh
166
+ pip install djangorestframework-simplejwt
167
+ ```
168
+ - **django-cors-headers**
169
+ ```sh
170
+ pip install django-cors-headers
171
+ ```
172
+
173
+ ### Installation
174
+
175
+ This guide will walk you through the steps to integrate `django-api-admin` into your Django project. Follow these instructions to get started.
176
+
177
+ 1. **Install the Package**
178
+ ```sh
179
+ pip install django-api-admin
180
+ ```
181
+ 2. **Add to Installed Apps** Add django_api_admin and it's requirements to the INSTALLED_APPS list in your Django project's settings.py file (the order doesn't matter):
182
+ ```py
183
+ # settings.py
184
+ INSTALLED_APPS = [
185
+ 'corsheaders',
186
+ 'drf_spectacular',
187
+ 'rest_framework',
188
+ 'django_api_admin'
189
+ ]
190
+ ```
191
+ 3. In your Django settings file, add or update the `REST_FRAMEWORK` dictionary to include the drf spectacular as the DEFAULT_SCHEMA_CLASS:
192
+ ```py
193
+ # settings.py
194
+ REST_FRAMEWORK = {
195
+ 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
196
+ }
197
+ ```
198
+ 4. Add the urls of your client side applications to the `CORS_ORIGIN_WHITELIST`
199
+ ```py
200
+ # settings.py
201
+ CORS_ORIGIN_WHITELIST = (
202
+ 'http://localhost', # jest-dom test server
203
+ 'http://localhost:3000', # react developement server
204
+ )
205
+ CORS_ALLOW_CREDENTIALS = True
206
+ ```
207
+
208
+ Thats it you are now ready to register your models and implement your django admin frontend!
209
+
210
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
211
+
212
+
213
+
214
+ <!-- USAGE EXAMPLES -->
215
+ ## Usage
216
+
217
+ This section provides a simple example on how to use django-api-admin. If you're setting up for the first time, follow the example below to get started.
218
+
219
+ 1. **Create some models**
220
+ ```py
221
+ # models.py
222
+ from django.db import models
223
+
224
+ class Author(models.Model):
225
+ name = models.CharField(max_length=100)
226
+
227
+ def __str__(self):
228
+ return self.name
229
+
230
+ class Book(models.Model):
231
+ title = models.CharField(max_length=100)
232
+ author = models.ForeignKey(Author, on_delete=models.CASCADE)
233
+
234
+ def __str__(self):
235
+ return self.title
236
+ ```
237
+ 2. **Register them using the admin site**
238
+ ```py
239
+ # admin.py
240
+ from django_api_admin.sites import site
241
+ from .models import Author, Book
242
+
243
+ site.register(Author)
244
+ site.register(Book)
245
+ ```
246
+ 3. **Include URLs** Include the django-api-admin URLs in your
247
+ ```py
248
+ # urls.py
249
+ from django.urls import path
250
+ from django_api_admin.sites import site
251
+
252
+ urlpatterns = [
253
+ path('api_admin/', site.urls),
254
+ ]
255
+ ```
256
+
257
+
258
+ <!-- _For more examples, please refer to the [Documentation](https://example.com)_ -->
259
+
260
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
261
+
262
+
263
+
264
+ <!-- ROADMAP -->
265
+ ## Roadmap
266
+
267
+ - [x] Rewrite django.contrib.admin as an API
268
+ - [x] Add support for Bulk Actions
269
+ - [x] Add OpenAPI documentation
270
+ - [ ] Add a customizable dashboard
271
+ - [ ] Oauth support
272
+ - [ ] Multi-language Support
273
+ - [ ] Arabic
274
+ - [ ] Spanish
275
+
276
+ See the [open issues](https://github.com/demon-bixia/django-api-admin/issues) for a full list of proposed features (and known issues).
277
+
278
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
279
+
280
+
281
+
282
+ <!-- CONTRIBUTING -->
283
+ ## Contributing
284
+
285
+ Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
286
+
287
+ If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
288
+ Don't forget to give the project a star! Thanks again!
289
+
290
+ 1. Fork the Project
291
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
292
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
293
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
294
+ 5. Open a Pull Request
295
+
296
+ ### Top Contributors
297
+
298
+ <a href="https://github.com/demon-bixia/django-api-admin/graphs/contributors">
299
+ <img src="https://contrib.rocks/image?repo=demon-bixia/django-api-admin" />
300
+ </a>
301
+
302
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
303
+
304
+
305
+
306
+ <!-- LICENSE -->
307
+ ## License
308
+
309
+ Distributed under the MIT License. See the `LICENSE` file for more information.
310
+
311
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
312
+
313
+
314
+
315
+ <!-- CONTACT -->
316
+ ## Contact
317
+
318
+ Muhammad Salah - [@demobixia](https://t.me/demonbixia) - msbizzaccount@outlook.com
319
+
320
+ Project Link: [https://github.com/demon-bixia/django-api-admin](https://github.com/demon-bixia/django-api-admin)
321
+
322
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
323
+
324
+
325
+
326
+ <!-- ACKNOWLEDGMENTS -->
327
+ ## Acknowledgments
328
+
329
+ This section is dedicated to recognizing the valuable resources and contributions that have supported this project. Below are some of the key references and inspirations that have been instrumental in the project's development journey.
330
+
331
+ * [Django Web Framework](https://www.djangoproject.com/)
332
+ * [Django Rest Framework](https://www.django-rest-framework.org/)
333
+ * [Simple JWT](https://github.com/jazzband/djangorestframework-simplejwt/tree/master)
334
+ * [Django Cors Headers](https://github.com/adamchainz/django-cors-headers)
335
+ * [DRF Spectacular](https://github.com/tfranzel/drf-spectacular)
336
+ * [Best README Template](https://github.com/othneildrew/Best-README-Template)
337
+ * [QODO AI](https://www.qodo.ai/)
338
+
339
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
340
+
341
+
342
+
343
+ <!-- MARKDOWN LINKS & IMAGES -->
344
+ <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
345
+ [contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=for-the-badge
346
+ [contributors-url]: https://github.com/demon-bixia/django-api-admin/graphs/contributors
347
+
348
+ [forks-shield]: https://img.shields.io/github/forks/demon-bixia/django-api-admin.svg?style=for-the-badge
349
+ [forks-url]: https://github.com/demon-bixia/django-api-admin/network/members
350
+
351
+ [stars-shield]: https://img.shields.io/github/stars/demon-bixia/django-api-admin.svg?style=for-the-badge
352
+ [stars-url]: https://github.com/demon-bixia/django-api-admin/stargazers
353
+
354
+ [issues-shield]: https://img.shields.io/github/issues/demon-bixia/django-api-admin?style=for-the-badge
355
+ [issues-url]: https://github.com/demon-bixia/django-api-admin/issues
356
+
357
+ [license-shield]: https://img.shields.io/badge/license-MIT-blue?style=for-the-badge
358
+ [license-url]: https://github.com/demon-bixia/django-api-admin/blob/main/LICENSE
359
+
360
+ [linkedin-shield]: https://img.shields.io/badge/%40-Linkedin-blue?style=for-the-badge
361
+ [linkedin-url]: https://www.linkedin.com/in/demon-bixia/
362
+
363
+ [Django-url]: https://djangoproject.com/
364
+ [Django]: https://img.shields.io/badge/Django-092E20?style=for-the-badge&logo=django&logoColor=green
365
+
366
+ [DRF-url]: https://www.django-rest-framework.org/
367
+ [Django REST framework]: https://img.shields.io/badge/django--rest--framework-3.12.4-green?style=for-the-badge&labelColor=333333&logo=django&logoColor=white&color=green
368
+
369
+ [product-screenshot]: assets/images/screenshot.png
@@ -0,0 +1,329 @@
1
+ <a id="readme-top"></a>
2
+
3
+
4
+
5
+ <!-- PROJECT SHIELDS -->
6
+ [![Contributors][contributors-shield]][contributors-url]
7
+ [![Forks][forks-shield]][forks-url]
8
+ [![Stargazers][stars-shield]][stars-url]
9
+ [![Issues][issues-shield]][issues-url]
10
+ [![Unlicense License][license-shield]][license-url]
11
+ [![LinkedIn][linkedin-shield]][linkedin-url]
12
+
13
+
14
+
15
+ <!-- PROJECT LOGO -->
16
+ <br />
17
+ <div align="center">
18
+ <a href="https://github.com/demon-bixia/django-api-admin">
19
+ <img src="assets/images/logo.png" alt="Logo" width="300" height="300">
20
+ </a>
21
+
22
+ <h3 align="center">Django API Admin</h3>
23
+
24
+ <p align="center">
25
+ A RESTful API implementation of django.contrib.admin, designed for writing custom frontends.
26
+ <br />
27
+ <!-- <a href="https://github.com/othneildrew/Best-README-Template"><strong>Explore the docs »</strong></a> -->
28
+ <!-- <br /> -->
29
+ <!-- <br /> -->
30
+ <!-- <a href="https://github.com/othneildrew/Best-README-Template">View Demo</a>
31
+ &middot; -->
32
+ <a href="https://github.com/othneildrew/Best-README-Template/issues/new?labels=bug&template=bug-report---.md">Report Bug</a>
33
+ &middot;
34
+ <a href="https://github.com/othneildrew/Best-README-Template/issues/new?labels=enhancement&template=feature-request---.md">Request Feature</a>
35
+ </p>
36
+ </div>
37
+
38
+
39
+
40
+ <!-- TABLE OF CONTENTS -->
41
+ <details>
42
+ <summary>Table of Contents</summary>
43
+ <ol>
44
+ <li>
45
+ <a href="#about-the-project">About The Project</a>
46
+ <ul>
47
+ <li><a href="#built-with">Built With</a></li>
48
+ </ul>
49
+ </li>
50
+ <li>
51
+ <a href="#getting-started">Getting Started</a>
52
+ <ul>
53
+ <li><a href="#prerequisites">Prerequisites</a></li>
54
+ <li><a href="#installation">Installation</a></li>
55
+ </ul>
56
+ </li>
57
+ <li><a href="#usage">Usage</a></li>
58
+ <li><a href="#roadmap">Roadmap</a></li>
59
+ <li><a href="#contributing">Contributing</a></li>
60
+ <li><a href="#license">License</a></li>
61
+ <li><a href="#contact">Contact</a></li>
62
+ <li><a href="#acknowledgments">Acknowledgments</a></li>
63
+ </ol>
64
+ </details>
65
+
66
+
67
+
68
+ <!-- ABOUT THE PROJECT -->
69
+ ## About The Project
70
+
71
+ [![Product Name Screen Shot][product-screenshot]](https://example.com)
72
+
73
+ The Django API Admin project is a RESTful API implementation of the `django.contrib.admin` module, designed to facilitate the creation of custom frontends. This project aims to provide developers with a robust and flexible API that mirrors the functionality of Django's built-in admin interface, allowing for seamless integration with modern web applications.
74
+
75
+ ### Key Features:
76
+ - **RESTful API**: Offers a comprehensive API for managing Django models, enabling developers to build custom administrative interfaces.
77
+ - **Custom Frontends**: Designed to support the development of tailored frontends that meet specific project requirements.
78
+ - **Extensible and Modular**: Build with the same django.contrib.admin API, allowing for easy customization and integration with existing Django projects.
79
+
80
+ The project is continuously evolving, with new features and improvements being added regularly. Contributions from the community are highly encouraged to help expand and enhance the capabilities of this tool.
81
+
82
+ To get started, follow the installation and usage instructions provided in this README. Whether you're building a new project or integrating with an existing one, Django API Admin offers the flexibility and power you need to manage your application's data effectively.
83
+
84
+
85
+
86
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
87
+
88
+
89
+
90
+ ### Built With
91
+
92
+ This section should list any major frameworks/libraries used to bootstrap your project. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
93
+
94
+ * [![Django][Django]][Django-url]
95
+ * [![DRF][Django REST framework]][DRF-url]
96
+
97
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
98
+
99
+
100
+
101
+ <!-- GETTING STARTED -->
102
+ ## Getting Started
103
+
104
+ To set up the project locally, follow these steps:
105
+
106
+ ### Prerequisites
107
+
108
+ Before you begin, ensure you have met the following requirements:
109
+
110
+ - **Python 3.8+**: Make sure Python is installed on your machine. You can download it from [python.org](https://www.python.org/downloads/).
111
+
112
+ - **pip**: Ensure you have pip installed for managing Python packages. It usually comes with Python installations.
113
+
114
+ - **Virtual Environment**: It's recommended to use a virtual environment to manage dependencies. You can create one using `venv` or `virtualenv`.
115
+
116
+ - **rest_framework**
117
+ ```sh
118
+ pip install djangorestframework
119
+ ```
120
+ - **drf-spectacular**
121
+ ```sh
122
+ pip install drf-spectacular
123
+ ```
124
+ - **djangorestframework-simplejwt**
125
+ ```sh
126
+ pip install djangorestframework-simplejwt
127
+ ```
128
+ - **django-cors-headers**
129
+ ```sh
130
+ pip install django-cors-headers
131
+ ```
132
+
133
+ ### Installation
134
+
135
+ This guide will walk you through the steps to integrate `django-api-admin` into your Django project. Follow these instructions to get started.
136
+
137
+ 1. **Install the Package**
138
+ ```sh
139
+ pip install django-api-admin
140
+ ```
141
+ 2. **Add to Installed Apps** Add django_api_admin and it's requirements to the INSTALLED_APPS list in your Django project's settings.py file (the order doesn't matter):
142
+ ```py
143
+ # settings.py
144
+ INSTALLED_APPS = [
145
+ 'corsheaders',
146
+ 'drf_spectacular',
147
+ 'rest_framework',
148
+ 'django_api_admin'
149
+ ]
150
+ ```
151
+ 3. In your Django settings file, add or update the `REST_FRAMEWORK` dictionary to include the drf spectacular as the DEFAULT_SCHEMA_CLASS:
152
+ ```py
153
+ # settings.py
154
+ REST_FRAMEWORK = {
155
+ 'DEFAULT_SCHEMA_CLASS': 'drf_spectacular.openapi.AutoSchema',
156
+ }
157
+ ```
158
+ 4. Add the urls of your client side applications to the `CORS_ORIGIN_WHITELIST`
159
+ ```py
160
+ # settings.py
161
+ CORS_ORIGIN_WHITELIST = (
162
+ 'http://localhost', # jest-dom test server
163
+ 'http://localhost:3000', # react developement server
164
+ )
165
+ CORS_ALLOW_CREDENTIALS = True
166
+ ```
167
+
168
+ Thats it you are now ready to register your models and implement your django admin frontend!
169
+
170
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
171
+
172
+
173
+
174
+ <!-- USAGE EXAMPLES -->
175
+ ## Usage
176
+
177
+ This section provides a simple example on how to use django-api-admin. If you're setting up for the first time, follow the example below to get started.
178
+
179
+ 1. **Create some models**
180
+ ```py
181
+ # models.py
182
+ from django.db import models
183
+
184
+ class Author(models.Model):
185
+ name = models.CharField(max_length=100)
186
+
187
+ def __str__(self):
188
+ return self.name
189
+
190
+ class Book(models.Model):
191
+ title = models.CharField(max_length=100)
192
+ author = models.ForeignKey(Author, on_delete=models.CASCADE)
193
+
194
+ def __str__(self):
195
+ return self.title
196
+ ```
197
+ 2. **Register them using the admin site**
198
+ ```py
199
+ # admin.py
200
+ from django_api_admin.sites import site
201
+ from .models import Author, Book
202
+
203
+ site.register(Author)
204
+ site.register(Book)
205
+ ```
206
+ 3. **Include URLs** Include the django-api-admin URLs in your
207
+ ```py
208
+ # urls.py
209
+ from django.urls import path
210
+ from django_api_admin.sites import site
211
+
212
+ urlpatterns = [
213
+ path('api_admin/', site.urls),
214
+ ]
215
+ ```
216
+
217
+
218
+ <!-- _For more examples, please refer to the [Documentation](https://example.com)_ -->
219
+
220
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
221
+
222
+
223
+
224
+ <!-- ROADMAP -->
225
+ ## Roadmap
226
+
227
+ - [x] Rewrite django.contrib.admin as an API
228
+ - [x] Add support for Bulk Actions
229
+ - [x] Add OpenAPI documentation
230
+ - [ ] Add a customizable dashboard
231
+ - [ ] Oauth support
232
+ - [ ] Multi-language Support
233
+ - [ ] Arabic
234
+ - [ ] Spanish
235
+
236
+ See the [open issues](https://github.com/demon-bixia/django-api-admin/issues) for a full list of proposed features (and known issues).
237
+
238
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
239
+
240
+
241
+
242
+ <!-- CONTRIBUTING -->
243
+ ## Contributing
244
+
245
+ Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
246
+
247
+ If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
248
+ Don't forget to give the project a star! Thanks again!
249
+
250
+ 1. Fork the Project
251
+ 2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
252
+ 3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
253
+ 4. Push to the Branch (`git push origin feature/AmazingFeature`)
254
+ 5. Open a Pull Request
255
+
256
+ ### Top Contributors
257
+
258
+ <a href="https://github.com/demon-bixia/django-api-admin/graphs/contributors">
259
+ <img src="https://contrib.rocks/image?repo=demon-bixia/django-api-admin" />
260
+ </a>
261
+
262
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
263
+
264
+
265
+
266
+ <!-- LICENSE -->
267
+ ## License
268
+
269
+ Distributed under the MIT License. See the `LICENSE` file for more information.
270
+
271
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
272
+
273
+
274
+
275
+ <!-- CONTACT -->
276
+ ## Contact
277
+
278
+ Muhammad Salah - [@demobixia](https://t.me/demonbixia) - msbizzaccount@outlook.com
279
+
280
+ Project Link: [https://github.com/demon-bixia/django-api-admin](https://github.com/demon-bixia/django-api-admin)
281
+
282
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
283
+
284
+
285
+
286
+ <!-- ACKNOWLEDGMENTS -->
287
+ ## Acknowledgments
288
+
289
+ This section is dedicated to recognizing the valuable resources and contributions that have supported this project. Below are some of the key references and inspirations that have been instrumental in the project's development journey.
290
+
291
+ * [Django Web Framework](https://www.djangoproject.com/)
292
+ * [Django Rest Framework](https://www.django-rest-framework.org/)
293
+ * [Simple JWT](https://github.com/jazzband/djangorestframework-simplejwt/tree/master)
294
+ * [Django Cors Headers](https://github.com/adamchainz/django-cors-headers)
295
+ * [DRF Spectacular](https://github.com/tfranzel/drf-spectacular)
296
+ * [Best README Template](https://github.com/othneildrew/Best-README-Template)
297
+ * [QODO AI](https://www.qodo.ai/)
298
+
299
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
300
+
301
+
302
+
303
+ <!-- MARKDOWN LINKS & IMAGES -->
304
+ <!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
305
+ [contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=for-the-badge
306
+ [contributors-url]: https://github.com/demon-bixia/django-api-admin/graphs/contributors
307
+
308
+ [forks-shield]: https://img.shields.io/github/forks/demon-bixia/django-api-admin.svg?style=for-the-badge
309
+ [forks-url]: https://github.com/demon-bixia/django-api-admin/network/members
310
+
311
+ [stars-shield]: https://img.shields.io/github/stars/demon-bixia/django-api-admin.svg?style=for-the-badge
312
+ [stars-url]: https://github.com/demon-bixia/django-api-admin/stargazers
313
+
314
+ [issues-shield]: https://img.shields.io/github/issues/demon-bixia/django-api-admin?style=for-the-badge
315
+ [issues-url]: https://github.com/demon-bixia/django-api-admin/issues
316
+
317
+ [license-shield]: https://img.shields.io/badge/license-MIT-blue?style=for-the-badge
318
+ [license-url]: https://github.com/demon-bixia/django-api-admin/blob/main/LICENSE
319
+
320
+ [linkedin-shield]: https://img.shields.io/badge/%40-Linkedin-blue?style=for-the-badge
321
+ [linkedin-url]: https://www.linkedin.com/in/demon-bixia/
322
+
323
+ [Django-url]: https://djangoproject.com/
324
+ [Django]: https://img.shields.io/badge/Django-092E20?style=for-the-badge&logo=django&logoColor=green
325
+
326
+ [DRF-url]: https://www.django-rest-framework.org/
327
+ [Django REST framework]: https://img.shields.io/badge/django--rest--framework-3.12.4-green?style=for-the-badge&labelColor=333333&logo=django&logoColor=white&color=green
328
+
329
+ [product-screenshot]: assets/images/screenshot.png