I'm converting my Django projects front end from using jquery to angularjs with Django Rest Framework in order to help make it a single page application. I've gotten most of my trickier pages converted over with angular and now comes the battle with Django's admin page.
I love the built in admin feature of Django and my users use it daily so I want to replicate it as close as possible. I haven't found any packages that relate to this so I was going to bite the bullet and just start making it from scratch. Before I start the tedious process I wanted to see if anyone else has had a similar task and what they did to accomplish it. Maybe someone knows the best practice way of going about it?
My plan is to make a reusable controller based upon the model that is shown in the URL (admin/app/model
) to show the change_list
and change_form
views of django-admin. I'm new to angularjs so I may not be fully be aware of the best way to do this.
Once I build this out I'll post it up on githhub.
UPDATE I have created a github repository after working on this for a little while now. It is still very raw and does not work 100%. If you're interested in it or want to help out, here you go: https://github.com/austinhuminski/angular-django-admin
Yes, creating API's using Django/DRF is sufficient to communicate with an Angular app. Below is an illustration of a basic architecture of a Django Angular application. API endpoints in Django will be served via the urls.py files using the DRF (Django Rest Framework.
Angular vs Django: well, this depends upon the project you are working on. But the web development trends of 2022 indicate that Django and Angular both are going to be popular. Frankly, there will be no Django vs Angular. Both can be used together or separately if they fulfill the website or application requirements.
ng-admin is a pure Angular.js implementation of an admin interface based on a RESTful webservice. In addition to basic CRUD, it supports relationships, search, a dashobard, and custom field types.
https://github.com/marmelab/ng-admin
It doesn't replicate the Django admin, but tries to build up on Bootstrap and Angular.js for a rich client-side admin experience.
Disclaimer: we wrote it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With