skip to navigation
skip to content

softwarefabrica.django.utils 1.0dev-BZR-r60-panta-elasticworld.org-20081216172358-5t5c0uj4vly6w5b8

Utility module for SoftwareFabrica django projects

Downloads ↓ | Package Documentation

Latest Version: 1.0dev-BZR-r115-panta-elasticworld.org-20100520155735-sf3yrsr0pvyvlm8m

softwarefabrica.django.utils library
====================================

This library provides many useful routines and abstractions for applications
developed with the `Django`_ web framework.

Don't forget to check also our other `Django`_ applications,
``softwarefabrica.django.forms``, and ``softwarefabrica.django.crud``.

.. _`Django`: http://www.djangoproject.com


*Marco Pantaleoni*

.. contents::

PRE-REQUISITES
--------------

This library depends on the ``sflib`` library from the same author.
If you use the EasyInstall_ outlined below, dependencies will be satisfied
automatically (the ``easy_install`` will take care of everything).

INSTALLATION
------------

You can download and install the most up-to-date version in one step
using EasyInstall_. For example, on a unix-like system:

::

  $ su
  # easy_install softwarefabrica.django.utils

If you are using Ubuntu, to install system-wide:

::

  $ sudo easy_install softwarefabrica.django.utils

Otherwise you can just download the source package (eg. from PyPI_),
extract it and run the usual ``setup.py`` commands:

::

  $ su
  # python setup.py install

Then you can use the library in any django project by simple including it in the
``INSTALLED_APPS`` settings variable, as outlined below.

.. _EasyInstall: http://peak.telecommunity.com/DevCenter/EasyInstall
.. _PyPI: http://pypi.python.org/pypi

DOWNLOAD
--------

If you don't want or cannot install using EasyInstall_, download the
package from Cheese Shop:

  http://cheeseshop.python.org/pypi/softwarefabrica.django.utils/

In a future, it will be possible to download also from:

  http://www.softwarefabrica.org/projects/softwarefabrica.django.utils/

Using the forms library in your applications
--------------------------------------------

Once you've installed the library and want to use it in your Django
applications, simply put ``'softwarefabrica.django.utils'`` in your
``INSTALLED_APPS`` setting.

Since there are no associated models, a ``manage.py syncdb`` command is not
necessary.

That's it!

DOCUMENTATION
-------------

Documentation is included in the form of *docstrings*, inside the library source
code.

CONTACTS
--------

It's possible to contact the author by e-mail at the following addresses:

  m.pantaleoni at softwarefabrica.org

  panta at elasticworld.org

  marco.pantaleoni at gmail.com


LICENSE
-------

This software is covered by the GNU General Public License version 2.
If you want to use this software in a closed source application, you
need to buy a commercial license from the author.

This open source version is:

    Copyright (C) 2007-2008  Marco Pantaleoni. All rights reserved.

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License version 2 as
    published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


CHANGES
-------

2008-12-16  Marco Pantaleoni  

        * Removed obsolete material.

2008-12-01  Marco Pantaleoni  

        * softwarefabrica/django/utils/templatetags/paginator.py: template
        is now 'utils/paginator.html'

        * softwarefabrica/django/utils/templates/utils/paginator.html:
        added.

2008-11-25  Marco Pantaleoni  

        * softwarefabrica/django/utils/templatetags/sitevars.py
        (SitevarsNode.render): made Django `Site` framework optional.

        * softwarefabrica/django/utils/viewshelpers.py (context_vars):
        made Django `Site` framework optional.

        * setup.py: set zip_safe to False (since we include templates and tests).

2008-11-24  Marco Pantaleoni  

        * Removed unused empty tests. Updated datetimewidget.py and
        relatedwidget.py

        * Changed references to 'newforms' into 'forms'.

        * README.txt: Updated.

        * Integrated setuptools and packages as
        'softwarefabrica.django.utils'

2008-11-02  Marco Pantaleoni  

        * templatetags/sitevars.py: added - {% sitevars %} template
        tag that populates the context with project variables.

2008-10-29  Marco Pantaleoni  

        * crud.py: added - Object-Oriented generic views and respective
        functional support adapters. Also present classes that add
        'fieldorder' support to ModelForms and templated forms.

2008-10-25  Marco Pantaleoni  

        * usearch.py: added - super-simple search support.

2008-10-19  Marco Pantaleoni  

        * UUIDField.py: added - UUID field.

2008-10-27  Marco Pantaleoni  

        * templatetags/paginator.py: modernized and added
        'template_object_name' parameter (defaults to 'object').

2008-09-04  Marco Pantaleoni  

        * viewshelpers.py: modernized, removed functional generic views.

2008-09-02  Marco Pantaleoni  

        * forms.py mlforms.py: modernized (adapted to support also django-1.0)

2008-05-30  Marco Pantaleoni  

        * added DateRangeWidget and DateRangeField.

2008-05-29  Marco Pantaleoni  

        * added white space in id field (edit form), to separate it when no
        value is present.

2008-05-27  Marco Pantaleoni  

        * added (non-editable) 'id' support to table forms.

2008-05-26  Marco Pantaleoni  

        * changed date format to 'dd/mm/yyyy'

        * removed '--' in empty FK also from detail view

2008-05-22  Marco Pantaleoni  

        * removed "--" from empty related widgets.

2008-05-21  Marco Pantaleoni  

        * added missing classes 'value' and 'label'.

        * fixed (commented) formfield_search_cb().

        * relatedwidget.py: improved. Added support for creation.

        * relatedwidget.py foreign.html: added support for textual representation
        of selected records.

        * tableforms.py: now uses the functions copied to erp.forms

2008-05-20  Marco Pantaleoni  

        * datetimewidget.py: added mark_safe() calls.

2008-05-15  Marco Pantaleoni  

        * tableforms.py: fixed bug ('coldwidth' -> 'colwidth', for FormRow).

2008-05-14  Marco Pantaleoni  

        * tableforms.py (FormField_operator_get_HTML_entity.Perform):
        removed TD in error list.

        * tableforms.py (FormField_operator_get_HTML_entity.Perform): adds
        'label' and 'value' to fields.

        * datetimewidget.py: switched from  to CSS.

        * tableforms.py
        (FormField_operator_get_view_HTML_entity.Perform): translated db
        choice in text form in detail view.

        * tableforms.py (FormField_operator_get_view_HTML_entity.Perform):
        return icon in detail view for boolean fields.

        * tableforms.py: defaulted to italian date format.

        * datetimewidget.py: defaulted to italian date format.

        * datetimewidget.py: added 'date' css attribute to widget.

2008-05-13  Marco Pantaleoni  

        * tableforms.py: adapted for split in DateTimeWidget and
        DateWidget.

        * forms.py: adapted for split in DateTimeWidget and DateWidget.

        * datetimewidget.py: split in DateTimeWidget and DateWidget.

        * templates/utils/widget/foreign.html: removed 'folder' icon
        (detail view).

        * tableforms.py (formfield_cb) relatedwidget.py: fixed required
        field bug for "ForeignKey"s.

        * viewshelpers.py: Added translation to messages.

2008-05-06  Marco Pantaleoni  

        * tableforms.py (build_query_from_form): fixed bug: now handles
        also missing fields in form_data and searches with related fields
        (RelatedField).

2008-04-28  Marco Pantaleoni  

        * relatedwidget.py (RelatedItemWidget.value_from_datadict): fixed
        validation bug.

        * tableforms.py: return link to detail view for foreign keys in detail
        view "form".

2008-04-27  Marco Pantaleoni  

        * tableforms.py: boolean fields are rendered with a 3-way select in
        search forms.

        * tableforms.py (FormField_operator_get_HTML_entity.Perform): fixed
        ForeignKey label extraction.

2008-04-26  Marco Pantaleoni  

        * added 'model' and 'meta' to delete_object() and edit_object() template
        context.

2008-04-26  Marco Pantaleoni  

        * tableforms.py: renamed getElementName() into getElementTypeName(), and
        getElementsByName() into getElementsByTypeName().
        Added getElementName() returning the passed 'name' parameter value, if
        present.
        Added getElementsByName() and getElementByName().
        Added 'name' paremeter query in getElements().

        * templates/utils/widget/foreign.html: added  and
        .

2008-04-25  Marco Pantaleoni  

        * tableforms.py: added some DOM navigation functions.
        Added fields (FormField, django field, db field) extraction functions.
        Now django forms are created with only the fields present in tableforms
        Form (passing 'fields').

2008-04-22  Marco Pantaleoni  

        * tableforms.py: now emits toggleFormGroup().

2008-04-22  Marco Pantaleoni  

        * tableforms.py (Form.make_formclass): moved formclass creation out of
        the constructor, so to allow late injection of a different form metaclass.

        * tableforms.py: added build_query_from_form() to Form class.
        Now it's also possible to pass the (newforms) form metaclass to the Form
        constructor. A SearchModelFormTable metaclass has been added to be used
        when making search forms (it keeps all fields as optional).

        * viewshelpers.py: updated object_list() generic view to match
        recent django.

2008-04-21  Marco Pantaleoni  

        * viewshelpers.py: fixed opts.verbose_name proxy string issue
        (forcing unicode).
        Made more uniform template search.
        Added object_detail() generic view.
        Improved comments.

        * tableforms.py: added get_view_HTML_entity operation for detail views.

        * relatedwidget.py: removed unused select_btn and new_btn strings.

2008-04-19  Marco Pantaleoni  

        * templates/: added.

        * tableforms.py: integrated support for foreign key fields
        (relatedwidget).

        * relatedwidget.py: added.

        * viewshelpers.py: added static_media_images_prefix() and
        static_media_js_prefix().

2008-04-06  Marco Pantaleoni  

        * tableforms.py: added multiple generation operation backends
        (get_HTML_entity, get_pages_HTML_entity, get_page_ids).
        Small improvements. Added support to form group javascript.

2008-04-05  Marco Pantaleoni  

        * templatetags/paginator.py templatetags/urlsave.py: added.

        * tableforms.py: implemented visitor pattern based generation of
        HTML content.

        * viewshelpers.py: added object_list() (based on django generic
        view).

2008-04-02  Marco Pantaleoni  

        * tableforms.py: Added.

2008-02-17  Marco Pantaleoni  

        * newforms_crud.py (create_object, update_object): added the
        possibility of passing initial values to forms in form_for_model()
        and form_for_instance().

        * viewshelpers.py: settings.STATIC_MEDIA_PREFIX is not strictly
        required anymore. The static_media_prefix() function tries to
        determine the correct value, with a sensible fallback.

2007-11-22  Marco Pantaleoni  

        * Created (with bits from portal, a lot of bits...)
 
File Type Py Version Uploaded on Size # downloads
softwarefabrica.django.utils-1.0dev-BZR-r60-panta-elasticworld.org-20081216172358-5t5c0uj4vly6w5b8.tar.gz (md5) Source 2008-12-16 29KB 355
softwarefabrica.django.utils-1.0dev_BZR_r60_panta_elasticworld.org_20081216172358_5t5c0uj4vly6w5b8-py2.4.egg (md5) Python Egg 2.4 2008-12-17 45KB 408
softwarefabrica.django.utils-1.0dev_BZR_r60_panta_elasticworld.org_20081216172358_5t5c0uj4vly6w5b8-py2.5.egg (md5) Python Egg 2.5 2008-12-16 45KB 375