Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/django-inplaceedit/django-inplaceedit-bootstrap
Integration of django-inplaceedit with bootstrap 3
https://github.com/django-inplaceedit/django-inplaceedit-bootstrap
Last synced: 30 days ago
JSON representation
Integration of django-inplaceedit with bootstrap 3
- Host: GitHub
- URL: https://github.com/django-inplaceedit/django-inplaceedit-bootstrap
- Owner: django-inplaceedit
- License: lgpl-3.0
- Created: 2013-09-06T07:44:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-30T16:41:30.000Z (over 9 years ago)
- Last Synced: 2024-04-23T09:10:05.958Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 577 KB
- Stars: 14
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: COPYING.LGPLv3
Awesome Lists containing this project
README
.. contents::
============================
django-inplaceedit-bootstrap
============================Information
===========.. image:: https://badge.fury.io/py/django-inplaceedit-bootstrap.png
:target: https://badge.fury.io/py/django-inplaceedit-bootstrapIntegration of `django-inplaceedit `_ with `bootstrap 3 `_
It is distributed under the terms of the `GNU Lesser General Public
License `_.This egg would not have been possible without the help of `Tyrdall `_
Requirements
============* `django-inplaceedit `_ (== 1.4.1)
* `Bootstrap `_ (== 3.3.5)
* `django-inplace-edit-extra-fields `_ (== 0.6.1, optional but recommended)
* `django-bootstrap3-datetimepicker `_ (== 2.2.3, optional but recommended)Demo (this video use a very old version of django-inplaceedit and django-inplaceedit-extra-fields)
==================================================================================================Video Demo, of `django-inplaceedit `_, `django-inplaceedit-extra-fields `_ and `django-inlinetrans `_ (Set full screen mode to view it correctly)
.. image:: https://github.com/django-inplaceedit/django-inplaceedit/raw/master/video-frame.png
:target: http://www.youtube.com/watch?v=_EjisXtMy_Y?t=34s**Attention**: This demo is not a demo of this package, in this video there are not any inegration with bootstrap. Please to see a demo use the `testing django project `_.
Installation
============After installing `django-inplaceedit egg`_ (1.4.1)
.. _`django-inplaceedit egg`: https://django-inplaceedit.readthedocs.org/en/latest/install.html
After installing `django-inplaceedit-extra-fields egg`_ (0.6.1, this is optional but recommended)
.. _`django-inplaceedit-extra-fields egg`: https://pypi.python.org/pypi/django-inplaceedit-extra-fields#installation
And after installing `django-bootstrap3-datetimepicker egg`_ (2.2.3, this is optional but recommended)
.. _`django-bootstrap3-datetimepicker egg`: https://pypi.python.org/pypi/django-bootstrap3-datetimepicker
In your settings.py
-------------------::
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
#.....................#
'inplaceeditform_bootstrap', # it is very important that this app is before that inplaceeditform and inplaceeditform_extra_fields
'inplaceeditform',
'inplaceeditform_extra_fields', # this is optional but recommended
'bootstrap3_datetime', # this is optional but recommended
)...
# Optional, but recommendedADAPTOR_INPLACEEDIT = {}
if 'inplaceeditform_extra_fields' in INSTALLED_APPS:
ADAPTOR_INPLACEEDIT['tiny'] = 'inplaceeditform_extra_fields.fields.AdaptorTinyMCEField'
# You can add the other adaptors of inplaceeditform_extra_fields
# https://pypi.python.org/pypi/django-inplaceedit-extra-fields#installation
if 'bootstrap3_datetime' in INSTALLED_APPS:
ADAPTOR_INPLACEEDIT['date'] = 'inplaceeditform_bootstrap.fields.AdaptorDateBootStrapField'
ADAPTOR_INPLACEEDIT['datetime'] = 'inplaceeditform_bootstrap.fields.AdaptorDateTimeBootStrapField'INPLACEEDIT_EDIT_TOOLTIP_TEXT = 'Please doubleclick to edit'
If you want, you can register these fields in your settings with different keys:
::
...
if 'bootstrap3_datetime' in INSTALLED_APPS:
ADAPTOR_INPLACEEDIT['date_bootstrap'] = 'inplaceeditform_bootstrap.fields.AdaptorDateBootStrapField'
ADAPTOR_INPLACEEDIT['datetime_bootstrap'] = 'inplaceeditform_bootstrap.fields.AdaptorDateTimeBootStrapField'And after that, to want use a specific adaptor you can pass it to the templatetag, e.g.:
::
{% inplace_edit "content.field_name" adaptor="date_bootstrap" %}
{% inplace_edit "content.field_name" adaptor="datetime_bootstrap" %}Why this code is not in django-inplaceedit?
===========================================* This code depends on the bootstrap
* This is a specific solutionTesting
=======Exists a `testing django project `_. This project can use as demo project.
This project overwrites the default options of `django-inplaceedit `_ and a default option of django-inplaceedit-bootstrap
::
INPLACEEDIT_AUTO_SAVE = True
INPLACEEDIT_EVENT = 'click'
INPLACEEDIT_EDIT_TOOLTIP_TEXT = 'Click to edit' # This option is of django-inplaceedit-bootstrapDevelopment
===========You can get the bleeding edge version of django-inplaceedit-bootstrap by doing a clone
of its git repository::git clone [email protected]:django-inplaceedit/django-inplaceedit-bootstrap.git