{
"info": {
"author": "Keith Hostetler",
"author_email": "khostetl@nd.edu",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "[](https://pypi.python.org/pypi/django-maced)\r\n[](https://pypi.python.org/pypi/django-maced)\r\n[](https://pypi.python.org/pypi/django-maced)\r\n[](https://pypi.python.org/pypi/django-maced)\r\n\r\n
\r\n\r\nDjango app designed to help with easy database record manipulation/creation through a frontend interface. It is called \r\nMACED for Merge Add Clone Edit Delete. If you want to report any bugs, you can use the github issue tracker. If you \r\nhave comments, please email me at khostetl@nd.edu.\r\n\r\n# Requirements\r\n\r\n* Python 2.7 only.\r\n* Django >=? (I am using 1.8.6 and 1.9.1))\r\n* django-bootstrap3 >= ? (I am using 6.2.2)\r\n* jQuery >= ? (I am using 1.12.0)\r\n\r\n# Notes\r\n\r\nThis django app adds font-awesome 4.4.0 when using maced items. If you are using a different version of font-awesome,\r\ndo one of the following:\r\n\r\n* Use 4.4.0\r\n* Change your local copy of django-maced to use your version (replace in modal.html and container.html)\r\n* Don't do anything. This may not actually cause any problems for you depending on the situation.\r\n\r\nI do plan on fixing this situation at some point, but considering the rarity of the problem, it is pretty low priority.\r\n\r\n# Recommendations\r\n\r\nUse bootstrap3 theme for bolder buttons. Just include this on your page:\r\n```html\r\n\r\n```\r\n\r\n# Installation\r\n\r\nInstall the latest release using pip:\r\n\r\n`pip install django-maced`\r\n\r\nDevelopment version can installed using `pip install git+https://github.com/Macainian/Django-Maced.git`, though be\r\nwarned that I don't guarantee anything about the development version. Sometimes it is completely broken because I am\r\nin the middle of major code changes and swapping from one machine to another.\r\n\r\n# Usage example\r\n\r\nMust be used with a class based view. There is probably a workaround for function based views though.\r\nThe following example assumes there exists a django app named example_app with urls for this maced object (more on this \r\nlater). There should also be a model called Example with fields of name and description. The example also assumes there \r\nis a url named login that goes to the login page.\r\n\r\nIn the view do:\r\n```python\r\nfrom maced.utils.maced_creator import add_item_to_context, finalize_context_for_items\r\nfrom website.apps.example_app.models import Example\r\n\r\n\r\nclass SomeView(TemplateView):\r\n template_name = \"blah/something.html\"\r\n \r\n def get_context_data(self, **kwargs):\r\n context = super(self.__class__, self).get_context_data(**kwargs)\r\n \r\n example_field_list = [\r\n {\"name\": \"name\"},\r\n {\"name\": \"description\"},\r\n ]\r\n \r\n add_item_to_context(\r\n context=context, item_name=\"example\", item_html_name=\"Example\", item_model=Example,\r\n item_name_field_name=\"name\", field_list=example_field_list, name_of_app_with_url=\"example_app\"\r\n current_item_id=0\r\n )\r\n \r\n finalize_context_for_items(context, login_url=reverse(\"login\"))\r\n \r\n return context\r\n```\r\n\r\nIn the urls for example_app:\r\n```python\r\nfrom django.conf.urls import url\r\n\r\nfrom maced.views.function_based.maced_view import maced_view\r\n\r\nfrom website.apps.example_app.models import Example\r\n\r\nurlpatterns = [\r\n url(r\"^maced_example/$\", maced_view, name=\"example_app.maced_example\",\r\n kwargs={\"item_model\": Example}),\r\n]\r\n```\r\n\r\nIn the template for \"something.html\" at the top:\r\n```html\r\n\r\n\r\n\r\n```\r\n\r\nIn the template where you want the maced object to appear:\r\n```html\r\n