{ "info": { "author": "MigueMLM", "author_email": "miguellm@lecrintech.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "Framework :: Django :: 1.11", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "DataTablesForm\n==============\n\nDataTablesForm is a simple Django app for connecting the datatables 1.10 js plugin with a standard django ModelForm.\n\nQuick start\n-----------\n\n1. Add \"datatablesform\" to your INSTALLED_APPS setting like this::\n\n INSTALLED_APPS = [\n ...\n 'datatablesform',\n ]\n\n2. Create a form inheriting from DataTablesForm::\n\n from datatablesform import forms \n ....\n class MyModelForm(forms.DataTablesForm):\n list_display = ['field1', 'field2', 'fk_field__field', 'class_method_with_allow_tags\"]\n \n class Meta:\n model = MyModel\n fields = '__all__'\n\n3. Use the previous form in any view::\n \n def my_form_view(request):\n ....\n form = MyModelForm()\n #_filters = {k,v for k,v in any_model_filter_wanted}\n #_exclude = {k,v for k,v in any_model_exclude_filter_wanted}\n script_table = form.factory_table() #form.factory_table(_filters, _exclude)\n table = 'MyModel'\n return render(request, \"my_form_template.html\", locals())\n\n\n4. Be aware of having the needed datatables static files in your \"my_form_template\", also you'll need to create a table element and include the script_table::\n \n \n ....\n
\n ....\n \n ....\n {{script_table|safe}}\n\n5. You can always make an ajax request to retrieve the script or use the code to your best.", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "django-datatablesform", "package_url": "https://pypi.org/project/django-datatablesform/", "platform": "", "project_url": "https://pypi.org/project/django-datatablesform/", "project_urls": null, "release_url": "https://pypi.org/project/django-datatablesform/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "A simple Django app for connecting the datatables 1.10 js plugin with a standard django ModelForm.", "version": "0.1.1" }, "last_serial": 5951689, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "863b3b2214ee849b2648ab0ffd5d0b78", "sha256": "09577e3c3a861f45e231c1dc03e5a1c6456f94242bf021701b2fd6dd94ba0feb" }, "downloads": -1, "filename": "django-datatablesform-0.1.tar.gz", "has_sig": false, "md5_digest": "863b3b2214ee849b2648ab0ffd5d0b78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5582, "upload_time": "2019-10-09T19:35:09", "url": "https://files.pythonhosted.org/packages/a0/e0/76269309889d0819c79b4373967eb0a5845e54bbf5a3a89794a7d3de5d7f/django-datatablesform-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "066aa810038a1c3dfb6e9cfd4e05e946", "sha256": "417bff2b78da0807f8d829922809e8e69b478296241b9eff5b9457a1b4c6e225" }, "downloads": -1, "filename": "django-datatablesform-0.1.1.tar.gz", "has_sig": false, "md5_digest": "066aa810038a1c3dfb6e9cfd4e05e946", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5504, "upload_time": "2019-10-09T19:49:42", "url": "https://files.pythonhosted.org/packages/3f/cc/7e3a783c9867064919b115532aa81338dde7607b461eebf95a91e121fb38/django-datatablesform-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "066aa810038a1c3dfb6e9cfd4e05e946", "sha256": "417bff2b78da0807f8d829922809e8e69b478296241b9eff5b9457a1b4c6e225" }, "downloads": -1, "filename": "django-datatablesform-0.1.1.tar.gz", "has_sig": false, "md5_digest": "066aa810038a1c3dfb6e9cfd4e05e946", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5504, "upload_time": "2019-10-09T19:49:42", "url": "https://files.pythonhosted.org/packages/3f/cc/7e3a783c9867064919b115532aa81338dde7607b461eebf95a91e121fb38/django-datatablesform-0.1.1.tar.gz" } ] }