<commit_before>mohawk-data-platform
====================

**mohawk-data-platform** is a Django app for editing and publishing arbitrary JSON data in a form-based environment.


Features
--------

- Define structured models, with custom fields and validation.
- Create, edit and update instances defined models using the Django admin interface.
- Group models into applications for bulk access.
- Access models, instances and applications via a simple JSON API.
- Cross-origin API requests via CORS and JSONP.


Installation
------------

1. Checkout the latest mohawk-data-platform release and copy or symlink the
   ``data`` directory into your ``PYTHONPATH``.  If using pip, run 
   ``pip install mohawk-data-platform``.
2. Add ``'data'`` to your ``INSTALLED_APPS`` setting.
3. Add ``url(r"^", include("data.urls", namespace="data")),`` to you ``urls.py`` file.
4. Install and active the Django admin site, if not already present.


Admin usage
-----------

The bulk of the functionality for mohawk-data-platform is found within the admin UI. The basic workflow is:

1. Create a ``Model``, defining at least one ``Field``.
2. Create an ``Instance`` of that model.
3. Optionally, create an ``Application``.
4. Edit the model, and add it to the application you created.

Any data you add to the system will be **pubically-available** via the API endpoints.


Model field configuration
-------------------------

Fields added to a model take a number of optional config parameters, suppled as JSON documents. The available fields, and their configuration options, are listed below.


Text
^^^^

A single-line of unicode text.
<commit_msg>Tweaking README<commit_after>mohawk-data-platform
====================

**mohawk-data-platform** is a Django app for editing and publishing arbitrary JSON data in a form-based environment.


Features
--------

- Define structured models, with custom fields and validation.
- Create, edit and update instances defined models using the Django admin interface.
- Group models into applications for bulk access.
- Access models, instances and applications via a simple JSON API.
- Cross-origin API requests via CORS and JSONP.


Installation
------------

1. Checkout the latest mohawk-data-platform release and copy or symlink the
   ``data`` directory into your ``PYTHONPATH``.  If using pip, run 
   ``pip install mohawk-data-platform``.
2. Add ``'data'`` to your ``INSTALLED_APPS`` setting.
3. Add ``url(r"^", include("data.urls", namespace="data")),`` to you ``urls.py`` file.
4. Install and active the Django admin site, if not already present.


Admin usage
-----------

The bulk of the functionality for mohawk-data-platform is found within the admin UI. The basic workflow is:

1. Create a ``Model``, defining at least one ``Field``.
2. Create an ``Instance`` of that model.
3. Optionally, create an ``Application``.
4. Edit the model, and add it to the application you created.

Any data you add to the system will be **pubically-available** via the API endpoints.


Model field reference
---------------------

Fields added to a model take a number of optional config parameters, suppled as JSON documents. The available fields, and their configuration options, are listed below.

Fields which take choices expect them to be supplied as a list of [value, label] options::

    {
        "choices": [
            ["#ff0000", "Red"],
            ["#0000ff", "Green"],
            ["#00ff00", "Blue"]
        ]
    }


Text
^^^^

A single-line of unicode text.

{'fraction_non_alphanumeric': 0.13135351227869788, 'fraction_numerical': 0.00799543118218161, 'mean_word_length': 3.3732833957553057, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5575339', 'n_tokens_mistral': 951, 'n_tokens_neox': 917, 'n_words': 454}