crispy-forms-foundation-0.9.0/0000755000175000017500000000000014325107134016201 5ustar carstencarstencrispy-forms-foundation-0.9.0/docs/0000755000175000017500000000000014325107134017131 5ustar carstencarstencrispy-forms-foundation-0.9.0/docs/layout/0000755000175000017500000000000014325107134020446 5ustar carstencarstencrispy-forms-foundation-0.9.0/docs/layout/buttons.rst0000644000175000017500000000016514325107134022700 0ustar carstencarsten======= Buttons ======= .. automodule:: crispy_forms_foundation.layout.buttons :members: :show-inheritance: crispy-forms-foundation-0.9.0/docs/layout/containers.rst0000644000175000017500000000022014325107134023337 0ustar carstencarsten=============== Form containers =============== .. automodule:: crispy_forms_foundation.layout.containers :members: :show-inheritance: crispy-forms-foundation-0.9.0/docs/layout/base.rst0000644000175000017500000000020714325107134022111 0ustar carstencarsten============== Basic elements ============== .. automodule:: crispy_forms_foundation.layout.base :members: :show-inheritance: crispy-forms-foundation-0.9.0/docs/layout/fields.rst0000644000175000017500000000016114325107134022444 0ustar carstencarsten====== Fields ====== .. automodule:: crispy_forms_foundation.layout.fields :members: :show-inheritance: crispy-forms-foundation-0.9.0/docs/layout/grid.rst0000644000175000017500000000015114325107134022122 0ustar carstencarsten==== Grid ==== .. automodule:: crispy_forms_foundation.layout.grid :members: :show-inheritance: crispy-forms-foundation-0.9.0/docs/install.rst0000644000175000017500000000164414325107134021336 0ustar carstencarsten.. _django-crispy-forms: https://github.com/maraujop/django-crispy-forms .. _install-intro: ======= Install ======= Get it from PyPi: :: pip install crispy-forms-foundation Register required applications in your project settings: .. code-block:: python INSTALLED_APPS = ( ... "crispy_forms", "crispy_forms_foundation", ... ) Import default settings at the end of the settings file: .. code-block:: python from crispy_forms_foundation.settings import * Default template pack name used will be ``foundation-6``. All other `django-crispy-forms`_ settings option apply, see its documentation for more details. Finally you will need to install Foundation assets in your project. For novices, a quick way to start is to use last `Foundation compiled version from CDN links `_. crispy-forms-foundation-0.9.0/docs/_static/0000755000175000017500000000000014325107134020557 5ustar carstencarstencrispy-forms-foundation-0.9.0/docs/_static/.keep0000644000175000017500000000000014325107134021472 0ustar carstencarstencrispy-forms-foundation-0.9.0/docs/usage.rst0000644000175000017500000000303614325107134020771 0ustar carstencarsten============ Basic sample ============ Import **crispy-forms-foundation** then you can use the layout objects in your form : .. code-block:: python from crispy_forms_foundation.layout import Layout, Fieldset, SplitDateTimeField, Row, Column, ButtonHolder, Submit class YourForm(forms.ModelForm): def __init__(self, *args, **kwargs): self.helper = FormHelper() self.helper.form_action = '.' self.helper.layout = Layout( Fieldset( 'Content', 'title', 'content', ), Fieldset( 'Display settings', Row( Column('template', css_class='large-6'), Column('order', css_class='large-3'), Column('visible', css_class='large-3'), ), ), Fieldset( 'Publish settings', 'parent', Row( Column(SplitDateTimeField('published'), css_class='large-6'), Column('slug', css_class='large-6'), ), ), ButtonHolder( Submit('submit_and_continue', 'Save and continue'), Submit('submit', 'Save'), ), ) super(YourForm, self).__init__(*args, **kwargs) Embedded templates are in ``crispy_forms_foundation/templates/foundation-6``. crispy-forms-foundation-0.9.0/docs/conf.py0000644000175000017500000000521614325107134020434 0ustar carstencarsten# crispy-form-foundation documentation build configuration file, created by # sphinx-quickstart on Sat Nov 15 20:21:48 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys import os import sphinx_rtd_theme from crispy_forms_foundation import __version__ as crispy_forms_foundation_version # Push a dummy settings file required by Django that is imported in # "crispy_forms_foundation.layout" sys.path.append(os.path.join(os.path.dirname(__file__), '.')) os.environ['DJANGO_SETTINGS_MODULE'] = 'dummy_settings' from django.conf import settings # -- Project information ----------------------------------------------------- project = 'crispy-form-foundation' copyright = '2014, David THENON' author = 'David THENON' # The short X.Y version version = crispy_forms_foundation_version # The full version, including alpha/beta/rc tags release = crispy_forms_foundation_version # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # Use index.rst as root content doc file master_doc = 'index' # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. Default to builtin theme "alabaster" if sphinx rtd # is not available. # html_theme = "sphinx_rtd_theme" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] # -- Autodoc config---------- ------------------------------------------------- # Do not order autodoc contents by alphabetical, keep to the source order autodoc_member_order = "bysource" crispy-forms-foundation-0.9.0/docs/dummy_settings.py0000644000175000017500000000020214325107134022550 0ustar carstencarsten# Dummy Django settings file required to import # crispy-form-foundation when building the documentation SECRET_KEY = 'dummy-key'crispy-forms-foundation-0.9.0/docs/form_objects.rst0000644000175000017500000000052214325107134022336 0ustar carstencarsten============ Form objects ============ There is some forms you can use to quickly and automatically create a Foundation layout for your forms. This is mostly for fast integration or prototyping because it will probably never totally fit to your design. .. automodule:: crispy_forms_foundation.forms :members: :show-inheritance: crispy-forms-foundation-0.9.0/docs/settings.rst0000644000175000017500000000133514325107134021525 0ustar carstencarsten.. _django-crispy-forms: https://github.com/maraujop/django-crispy-forms ======== Settings ======== **crispy-forms-foundation** itself does not have its own settings but overrides some of `django-crispy-forms`_ settings: CRISPY_ALLOWED_TEMPLATE_PACKS To add ``foundation-6`` template pack names to allowed template packs. CRISPY_TEMPLATE_PACK To set default template pack to ``foundation-6``. CRISPY_CLASS_CONVERTERS To define some input class name converters required for ``foundation-6``. These settings are defined in ``crispy_forms_foundation.settings`` you should have imported (as seen in :ref:`install-intro` document). All other settings from `django-crispy-forms`_ still apply to change crispies behaviors. crispy-forms-foundation-0.9.0/docs/changelog.rst0000644000175000017500000002614614325107134021623 0ustar carstencarsten.. _crispy-forms-foundation-demo: https://github.com/sveetch/crispy-forms-foundation-demo ========= Changelog ========= Version 0.9.0 - 2022/10/22 ************************** **Major release to update supports** * **Dropped support for Python<3.8**; * **Dropped support for Django<3.2**; * **Added official support for Python 3.8, 3.9 and 3.10**. * **Added official support for Django 3.2 and 4.0**. * Updated tox configuration to fit to Python and Django supports; * Updated package configuration to split requirements in more extra requirements so Tox won't have to install Sphinx, flake, etc.. only the Pytest suite; * Removed code for old compatibility management from old unsupported Django versions; * Updated Flake8 configuration for ``max-line-length`` value to ``88``; * Fixed all quality issues raised by Flake8 from code and tests; * Updated makefile; * Updated documentation configuration; * Replaced ``sphinx-autobuild`` requirement by ``livereload``; * Fixed some invalid ``code-block`` in docstrings; Version 0.8.0 - 2020/05/20 ************************** **Major release to remove deprecated supports** * Drop Python2 support, minimal Python version support is 3.5; * Drop support for Django prior to 2.0; * Drop support for django-crispy-forms prior to 1.8.1; * Drop support for Foundation 5; * Ensure support for Django 2.2 and 3.0; * Ensure support for django-crispy-forms to 1.9.1; * Removed everything about Foundation 5; Version 0.7.1 - 2019/05/30 ************************** **Minor release to add support for Django 2.2** **This will be the last release to support Django<1.11, Python2 and Foundation5** * Updated tox configuration to cover Django 2.2; * Updated sandbox demo to work with Django 2.2; * Fixed changelog; * Fixed package manifest for supported Django versions; * Fixed README for supported Foundation versions; Version 0.7.0 - 2018/10/08 ************************** **Add support for Django 2.0 and 2.1** * Rewrite package to use ``setup.cfg``; * Add support for Django 2.0 and Django 2.1, close #36; * Django 1.11 support is the last one for Python2; * Change old demo project to more cleaner sandbox; * Included fix from django-crispy-forms#836 for ``FormHelper.field_template`` usage in uniform, close #39; Version 0.6.4 - 2017/07/29 ************************** * Fixed ``layout.buttons.ButtonGroup`` for deprecated ``Context()`` usage; * Fixed tests that performs comparison on html part using ``django.test.html.parse_html``; Version 0.6.3 - 2017/07/16 ************************** This release adds some bugfixes with Abide, new button objects that will replace the old ones a release and Foundation5 support will be removed for the next (non bugfix) release. * Removed ``is-visible`` class and added missing ``data-form-error-for`` attribute in Foundation6 field templates, close #33; * Added new field ``layout.fields.FakeField``; * Fixed tests to always compare rendered value to attempted value, so the test error output diffs are allways in the same order; * Updated documentation; * Adopted new settings structure in ``project/settings/``, removed ``db.sqlite3`` from repository; * Enabled ``django-debug-toolbar`` in development environment and settings for demo only (not for tests); * Moved ``layout.buttons.Hidden`` to ``layout.fields.Hidden``; * Added ``layout.buttons.ButtonElement``, ``layout.buttons.ButtonSubmit`` and ``layout.buttons.ButtonReset`` to button input as real ``