Create django front-end data apps
Project description
Django Front Data
A reusable dependency free django front data apps
Sometimes we need to fetch unstructured data from back-end to front-end such as navbar. But this is boring task as you have to design database for every type of data. We can avoid this by using a good JSON editor. This package contains a good JSON editor for admin panel. Also this package has built-in serializers and django rest api support.
Installation
-
Install the package
pip install django-front-data
-
Add into yours settings INSTALLED_APPS
front_data',
- If you have django rest framework installed you can add package urls to your
URL config
path('front-data/', include('front_data.urls'))
You can only use front_data.urls if you have djangorestframework installed
Settings
DEFAULT_SITE_DATA
You can use this setting to automatically add template. examples:
DEFAULT_SITE_DATA = [ { "name": "nav-bar", "data": [], "templates": [ { "text": "Navbar", "value": { "text": "", "link": "" } } ] } ]
Above example will create front data instance named navbar
when you start
your server. It will skip if there is already navbar
instance in
database. This will also create a template named navBar
. See
template section about what you can do with template.
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_front_data-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35a28d7afec0ef78069300ffd44e97c182faa63fb759204c006bb7c3fa75ea98 |
|
MD5 | eaa3a4cbf8b200ffe305a540742d3c16 |
|
BLAKE2b-256 | 6a68a8944e2e0bb03217a912307cf519f067e665cbda9789bd5854df2bc824ce |