{"id":16411671,"url":"https://github.com/trco/django-funky-sheets","last_synced_at":"2025-05-10T23:04:00.110Z","repository":{"id":57420203,"uuid":"171065126","full_name":"trco/django-funky-sheets","owner":"trco","description":"Django implementation of Handsontable spreadsheets for CRUD actions.","archived":false,"fork":false,"pushed_at":"2023-08-03T09:40:06.000Z","size":372,"stargazers_count":107,"open_issues_count":8,"forks_count":22,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-10T23:03:54.497Z","etag":null,"topics":["django","excel","handsontable","spreadsheets"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trco.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-02-17T00:04:46.000Z","updated_at":"2025-03-03T13:45:30.000Z","dependencies_parsed_at":"2022-09-03T21:13:01.065Z","dependency_job_id":"51856c30-c94a-4dcd-a939-67cc8c145080","html_url":"https://github.com/trco/django-funky-sheets","commit_stats":{"total_commits":24,"total_committers":2,"mean_commits":12.0,"dds":0.04166666666666663,"last_synced_commit":"4f3304191b3085d9d1f986f757a5b5d0567f3c32"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trco%2Fdjango-funky-sheets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trco%2Fdjango-funky-sheets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trco%2Fdjango-funky-sheets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trco%2Fdjango-funky-sheets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trco","download_url":"https://codeload.github.com/trco/django-funky-sheets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253492709,"owners_count":21916972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","excel","handsontable","spreadsheets"],"created_at":"2024-10-11T06:46:09.980Z","updated_at":"2025-05-10T23:04:00.091Z","avatar_url":"https://github.com/trco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===================\nDjango Funky Sheets\n===================\n\nDjango implementation of Handsontable spreadsheets for CRUD actions.\n\n.. contents:: **Table of Contents**\n   :depth: 2\n   :local:\n   :backlinks: none\n\nTest and experiment on your machine\n===================================\n\n``Dockerfile`` and ``docker-compose.yml`` files for easy setup and testing on your machine are coming soon.\n\nInstallation\n============\n\nInstall ``django-funky-sheets``::\n\n  $ pip install django-funky-sheets\n\nAdd ``funky_sheets`` to your INSTALLED_APPS::\n\n  # settings.py\n\n  INSTALLED_APPS = [\n      ...\n      'funky_sheets',\n      ...\n  ]\n\nQuick Start\n===========\n\nURL\n---\n\nDefine URLs for Create and Update views.\n\n.. code-block:: python\n\n  # urls.py\n\n  from django.urls import path\n  from . import views\n\n  urlpatterns = [\n    path('', views.index, name='index'),\n    path('create/', views.CreateMovieView.as_view(), name='create'),\n    path('update/', views.UpdateMovieView.as_view(), name='update')\n  ]\n\nView\n----\n\nDefine Create and Update views which inherit from ``HotView`` and render the Handsontable spreadsheet based on selected model fields.\n\n.. code-block:: python\n\n  # views.py\n\n  from django.forms import CheckboxSelectMultiple, CheckboxInput, DateInput\n  from django.urls import reverse_lazy\n\n  from funky_sheets.formsets import HotView\n\n  from .models import Movie\n\n  class CreateMovieView(HotView):\n      # Define model to be used by the view\n      model = Movie\n      # Define template\n      template_name = 'examples/create.html'\n      # Define custom characters/strings for checked/unchecked checkboxes\n      checkbox_checked = 'yes' # default: true\n      checkbox_unchecked = 'no' # default: false\n      # Define prefix for the formset which is constructed from Handsontable spreadsheet on submission\n      prefix = 'table'\n      # Define success URL\n      success_url = reverse_lazy('update')\n      # Define fields to be included as columns into the Handsontable spreadsheet\n      fields = (\n          'id',\n          'title',\n          'director',\n          'release_date',\n          'parents_guide',\n          'imdb_rating',\n          'genre',\n          'imdb_link',\n      )\n      # Define extra formset factory kwargs\n      factory_kwargs = {\n          'widgets': {\n              'release_date': DateInput(attrs={'type': 'date'}),\n              'genre': CheckboxSelectMultiple(),\n              'parents_guide': CheckboxInput(),\n          }\n      }\n      # Define Handsontable settings as defined in Handsontable docs\n      hot_settings = {\n          'contextMenu': 'true',\n          'autoWrapRow': 'true',\n          'rowHeaders': 'true',\n          'contextMenu': 'true',\n          'search': 'true',\n          # When value is dictionary don't wrap it in quotes\n          'headerTooltips': {\n              'rows': 'false',\n              'columns': 'true'\n          },\n          # When value is list don't wrap it in quotes\n          'dropdownMenu': [\n              'remove_col',\n              '---------',\n              'make_read_only',\n              '---------',\n              'alignment'\n          ]\n      }\n\n  class UpdateMovieView(CreateMovieView):\n    template_name = 'examples/update.html'\n    # Define 'update' action\n    action = 'update'\n    # Define 'update' button\n    button_text = 'Update'\n\nTemplate\n--------\n\n``hot_template`` uses ``jQuery 3.3.1`` and ``Handsontable 7.0.0.``\n\nIf you would like to use different versions of ``jQuery`` and ``Handsontable`` you should create your own ``hot_template`` by copying default ``hot_template`` in funky_sheets/templates/hot/hot.html and loading selected versions of ``jQuery``, ``Handsontable JavaScript and CSS``. Note that the compatibility with different versions is not guaranteed. You should than include your custom ``hot_template`` when creating templates like ``create.html`` and ``update.html`` in the examples.\n\nDefine templates which include ``hot_template`` in place where you want to render Handsontable spreadsheet.\n\n.. code-block:: html+django\n\n  examples/create.html\n\n  ...\n  {% include hot_template %}\n  ...\n\n  examples/update.html\n\n  ...\n  {% include hot_template %}\n  ...\n\nGeneral information\n===================\n\nOpening an issue\n----------------\nWhen reporting an issue for ``django-funky-sheets`` package, please prepare a publicly available repository having the issue you are reporting. The clear reproduce is the optimal way towards resolution.\n\nContribute\n----------\nThis is an Open Source project and any contribution is highly appreciated.\n\nLicense\n=======\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrco%2Fdjango-funky-sheets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrco%2Fdjango-funky-sheets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrco%2Fdjango-funky-sheets/lists"}