Package: django-admin-backend
==============django-backend==============|pypi-badge| |build-status|.. note::This module can be imported in python with the name ``django_backend``. ThePyPI package is called `django-admin-backend`_ though. We had to use adifferent name as ``django-backend`` was already registered on PyPI. It's alittle unfortunate this way, but a necessary workaround for now... _django-admin-backend: https://pypi.python.org/pypi/django-admin-backendInstallation============Add the following apps to your ``INSTALLED_APPS`` settings:.. code:: pythonINSTALLED_APPS = (...'django.contrib.auth','django.contrib.sites','django.contrib.staticfiles',...'django_backend','floppyforms',)Make sure ``SITE_ID`` is set:.. code:: pythonSITE_ID = 1Make sure ``LANGUAGE_CODE`` is valid:.. code:: pythonLANGUAGE_CODE = 'en'**Warning:** Django's default language code is *not* valid, as "en-us" is not included in settings.LANGUAGES.Add the following line to your ``urls.py``:.. code:: pythonurl(r'^backend/', include(django_backend.site.get_urls(), namespace='django_backend')),TODO: continue, propably not complete yetDevelopment===========Run tests---------.. code:: bash# Set everything up. You want to do this in a virtualenv.pip install -r tests/requirements.txtpython setup.py develop# Run the tests. Should be executed in the root of the project.py.test.. |build-status| image:: https://travis-ci.org/team23/django_backend.svg:target: https://travis-ci.org/team23/django_backend.. |pypi-badge| image:: https://img.shields.io/pypi/v/django-admin-backend.svg:target: https://pypi.python.org/pypi/django-admin-backendBuild static assets-------------------.. code:: bashnpm installgulp build# Use gulp watch to continuously build on source file changes.gulp watchOr to create a development build that includes source maps, execute the ``dev`` task first, like:.. code:: bashgulp dev build0.6.0------ Disable form buttons after submit so that user cannot double click a formsubmit button. That should prevent (most) doubled submits. Server sidevalidation still needs to be in place though.- Call the ``attachEventHandlers`` after ``prepareContent`` method in``PartialContentLoader``. That makes extending it easier.- Previously we found ourselve in confusing situation when multiple modalswhere open and in the top one you clicked the delete button. This opened thedelete confirmation. If the user then clicked "dismiss" in the confirmation,the modal was closed. This was confusing as it was not clear that the topmodal was closed but the now displaying underlying modal has different datain it. In this case a re-displaying the update view would make more sense.So we added a way for a modal to go the previous URL (like the browsers goback button). If the users triggers now a dismiss action, the modal will goone view back in most cases. If there is no previous URL recorded, the modalwill close. This happens for example if you deep link to the delete view witha modal.- Relation list items now will also have a drag handle and remove icon if therelation object cannot be displayed (for example if the content type id isnot valid). We need to have the remove icon visible, otherwise an object withian nvalid content type cannot be deleted by the user which makes itimpossible for the user to save the object with the invalid relation.0.5.0------ The widgets ``GenericRelationListWidget`` and ``M2MListWidget`` feature adrop down to add new elements. The list used to link to the relation's``create`` view. We found this to be not useful for all cases, since youmight want to select existing items.We changed the view to be now the ``select`` by default. In general you canadd new items from the select view then as well with the add button. If youdon't want to allow selecting new items for one specific backend, you canalways overwrite the ``select`` view and replace it with for example acreate view instance.- Close dropdown when clicking link in *add new* menu in relation listwidgets.0.4.3------ Improve styling of bootstrap row template. We integrated a ?-icon for thehelp text and removed whitespace between the label and the ":" after thefield name.0.4.2------ Validate selected elements in ``GenericRelationListField`` against theallowed content types. That makes sure no unwanted objects end up in thelist.- Allow name of generic foreign key field to be set explicitly in``GenericRelationListField``. You can use the ``generic_fk_name`` argumentfor this.- Adding or changing a new item in a ``GenericRelationListField`` will alsoupdate the edit link based on the update url in the JSON response.- JavaScript: The PageContext got the capability to watch the element thatrepresents the page context in the DOM. That allows us to close obsoletetooltips even if their original trigger got already removed from the page.- JavaScript: The pagecontext element gets the data-pagecontext attribute tomake it queryable.- JavaScript: Bootstrap tooltips are now attached to pagecontext elementsinstead of the body. That will better capsulate them into the pagecontext.0.4.1------ Make ``GenericRelationListField`` determine the names of the ``object_id``and ``content_type`` fields by inspecting the used ``GenericForeignKey``.That will raise errors about wrong usage earlier.- Fix JS for ``GenericRelationListField`` if used nested multiple levels deep.A click handler was called in every instance in the modal stack, so thebehaviour was different depending on the number of modals.0.4.0------ Fix ``GenericRelationListField``. It's internal API was not used correctlyand therfore just threw errors.- Allow ``SelectRelatedField`` to pick up inline backends, searching fromcurrently active backend. That makes it easier to use customized nestedinline backends.0.3.0-----* Adjusted multiple imports:- Forms, formfields and widgets should be now always imported from``django_backend.forms``. Example::# OLD import, will no longer workfrom django_backend.backend.base.formfields import SelectRelatedField# NEW importfrom django_backend.forms import SelectRelatedField* Add ``ManageRelatedField`` that can inline a list page of a related modelin the change view.* Add ``GenericRelationListField`` that can show a reorderable list relatedby a intermediary model with a generic foreign key.* Use Django's app config to make autoloading of backends predictable.* Ensuring support for Django 1.6 and 1.8.* Integrating bootstrap styles for floppyforms widgets.* Disable caching for backend views.* Allow subclasses of ``FilterForm`` to define ``filter_queryset_{field_name}``methods for easy extendability.0.1.0-----* Initial release.