All Projects → trco → django-funky-sheets

trco / django-funky-sheets

Licence: MIT license
Django implementation of Handsontable spreadsheets for CRUD actions.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to django-funky-sheets

Ce
Jspreadsheet is a lightweight vanilla javascript plugin to create amazing web-based interactive tables and spreadsheets compatible with other spreadsheet software.
Stars: ✭ 5,832 (+6308.79%)
Mutual labels:  excel, spreadsheets
i-sheet-you-not
Automagically turn Excel spreadsheets into Alfred 3 Workflows
Stars: ✭ 67 (-26.37%)
Mutual labels:  excel, spreadsheets
Androiddocumentviewer
Android 文档查看: word、excel、ppt、pdf,使用mupdf及tbs
Stars: ✭ 235 (+158.24%)
Mutual labels:  excel
fmtdate
MS Excel (TM) syntax for Go time/date
Stars: ✭ 95 (+4.4%)
Mutual labels:  excel
MPContribs
Platform for materials scientists to contribute and disseminate their materials data through Materials Project
Stars: ✭ 30 (-67.03%)
Mutual labels:  handsontable
Easyexcel Encapsulation
easyexcel 的方法封装,快速、简单地处理 Excel
Stars: ✭ 243 (+167.03%)
Mutual labels:  excel
xlstream
Turns XLSX into a readable stream.
Stars: ✭ 148 (+62.64%)
Mutual labels:  excel
Relaxtools Addin
RelaxTools Addin for Microsoft Excel 2010/2013/2016
Stars: ✭ 234 (+157.14%)
Mutual labels:  excel
freemarker-cli
Apache FreeMarker CLI (JDK)
Stars: ✭ 35 (-61.54%)
Mutual labels:  excel
vue-datagrid
Spreadsheet data grid component. Handles enormous data processing.
Stars: ✭ 171 (+87.91%)
Mutual labels:  excel
Excel-Timesheet
⏰ This Add-In is used to produce a timesheet file with functionality to import your Google Timeline. The standard timesheet has options for start and end dates, day of week and default start, end and break times. The Google timeline options are start and end dates, UTC selection, daylight savings time parameters and title filter for timeline ent…
Stars: ✭ 25 (-72.53%)
Mutual labels:  excel
Handsontable
JavaScript data grid with a spreadsheet look & feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡
Stars: ✭ 16,059 (+17547.25%)
Mutual labels:  excel
Zipcelx
Turns JSON data into `.xlsx` files in the browser
Stars: ✭ 246 (+170.33%)
Mutual labels:  excel
wxAutoExcel
wxAutoExcel is a wxWidgets library attempting to make Microsoft Excel automation with C++ a bit less painful.
Stars: ✭ 27 (-70.33%)
Mutual labels:  excel
Layui Excel
简单快捷的导出插件,导出仅需一句话
Stars: ✭ 239 (+162.64%)
Mutual labels:  excel
EPPlus.Core.Extensions
An extensions library for EPPlus package to generate and manipulate Excel files easily.
Stars: ✭ 66 (-27.47%)
Mutual labels:  excel
Kkfileviewofficeedit
文件在线预览及OFFICE(word,excel,ppt)的在线编辑
Stars: ✭ 234 (+157.14%)
Mutual labels:  excel
Styleframe
A library that wraps pandas and openpyxl and allows easy styling of dataframes in excel
Stars: ✭ 252 (+176.92%)
Mutual labels:  excel
Data-Science
Using Kaggle Data and Real World Data for Data Science and prediction in Python, R, Excel, Power BI, and Tableau.
Stars: ✭ 15 (-83.52%)
Mutual labels:  excel
excel-requests
Excel HTTP Requests for Humans
Stars: ✭ 55 (-39.56%)
Mutual labels:  excel

Django Funky Sheets

Django implementation of Handsontable spreadsheets for CRUD actions.

Live Demo

Demo

Installation

Install django-funky-sheets:

$ pip install django-funky-sheets

Add funky_sheets to your INSTALLED_APPS:

# settings.py

INSTALLED_APPS = [
    ...
    'funky_sheets',
    ...
]

Quick Start

URL

Define URLs for Create and Update views.

# urls.py

from django.urls import path
from . import views

urlpatterns = [
  path('', views.index, name='index'),
  path('create/', views.CreateMovieView.as_view(), name='create'),
  path('update/', views.UpdateMovieView.as_view(), name='update')
]

View

Define Create and Update views which inherit from HotView and render the Handsontable spreadsheet based on selected model fields.

# views.py

from django.forms import CheckboxSelectMultiple, CheckboxInput, DateInput
from django.urls import reverse_lazy

from funky_sheets.formsets import HotView

from .models import Movie

class CreateMovieView(HotView):
    # Define model to be used by the view
    model = Movie
    # Define template
    template_name = 'examples/create.html'
    # Define custom characters/strings for checked/unchecked checkboxes
    checkbox_checked = 'yes' # default: true
    checkbox_unchecked = 'no' # default: false
    # Define prefix for the formset which is constructed from Handsontable spreadsheet on submission
    prefix = 'table'
    # Define success URL
    success_url = reverse_lazy('update')
    # Define fields to be included as columns into the Handsontable spreadsheet
    fields = (
        'id',
        'title',
        'director',
        'release_date',
        'parents_guide',
        'imdb_rating',
        'genre',
        'imdb_link',
    )
    # Define extra formset factory kwargs
    factory_kwargs = {
        'widgets': {
            'release_date': DateInput(attrs={'type': 'date'}),
            'genre': CheckboxSelectMultiple(),
            'parents_guide': CheckboxInput(),
        }
    }
    # Define Handsontable settings as defined in Handsontable docs
    hot_settings = {
        'contextMenu': 'true',
        'autoWrapRow': 'true',
        'rowHeaders': 'true',
        'contextMenu': 'true',
        'search': 'true',
        # When value is dictionary don't wrap it in quotes
        'headerTooltips': {
            'rows': 'false',
            'columns': 'true'
        },
        # When value is list don't wrap it in quotes
        'dropdownMenu': [
            'remove_col',
            '---------',
            'make_read_only',
            '---------',
            'alignment'
        ]
    }

class UpdateMovieView(CreateMovieView):
  template_name = 'examples/update.html'
  # Define 'update' action
  action = 'update'
  # Define 'update' button
  button_text = 'Update'

Template

hot_template uses jQuery 3.3.1 and Handsontable 7.0.0.

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

Define templates which include hot_template in place where you want to render Handsontable spreadsheet.

examples/create.html

...
{% include hot_template %}
...

examples/update.html

...
{% include hot_template %}
...

Contribute

This is an Open Source project and any contribution is appreciated.

License

This project is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].