Skip to main content

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

  1. Install the package

    pip install django-front-data

  2. Add into yours settings INSTALLED_APPS

    front_data',

  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-front-data-1.2.0.tar.gz (7.2 kB view hashes)

Uploaded Source

Built Distribution

django_front_data-1.2.0-py3-none-any.whl (9.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page