A modern, single-page-app admin for Django.
Project description
A modern, single-page-app admin for Django.
Installation
/!\ Note: This is a pre-alpha project. Most of the things don't work. However, if you're curious, you can still try it out.
1. Install using pip
$ pip install django-candy
2. Modify your settings
# settings.py
INSTALLED_APPS = [
# ...
'django_candy',
]
3. Modify your project's urls.py
# urls.py
urlpatterns = [
# ...
path('candy/', include('django_candy.urls')),
]
Usage
After installation, you can visit http://127.0.0.1:8000/candy/
to see the
admin interface in action.
1. Register your models
The API is pretty similar to that of Django's default admin:
# admin.py
from django_candy import admin
from myapp.models import MyModel
admin.site.register(MyModel)
Reload the admin page and you should see your registered model there.
Currently, the add/edit pages don't work. You can add some objects to your model from django shell and you'll see them listed on list page.
2. ModelAdmin
class
There's also a ModelAdmin
class for better control over the admin ui:
# admin.py
from django_candy import admin
from myapp.models import MyModel
class MyModelAdmin(admin.ModelAdmin):
list_display = ['field_1', 'field_2', 'etc']
admin.site.register(MyModel, MyModelAdmin)
Full docs coming in due time.
Frontend
Frontend is written in React. You can find the source at https://github.com/bhch/candy-frontend.
License
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
Hashes for django_candy-0.7.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3419c4205b513b20963f91f9872f3a76caaf30603bfeb46545ab8d9c1317ab7 |
|
MD5 | 8e3aaaf6e7170f52173c10c6ced4cafd |
|
BLAKE2b-256 | e17a280557d79fba42406e8149224438f140cb4d368baa5a0ee0791f53e9388b |