Git Product home page Git Product logo

django-forms-builder's Introduction

image

django-forms-builder

Created by Stephen McDonald

A Django reusable app providing the ability for admin users to create their own forms within the admin interface, drawing from a range of field widgets such as regular text fields, drop-down lists and file uploads. Options are also provided for controlling who gets sent email notifications when a form is submitted. All form entries are made available in the admin via filterable reporting with CSV/XLS export.

Form builder:

image

Data reporting:

image

HTML5 Features

The following HTML5 form features are supported.

  • placeholder attributes
  • required attributes
  • email fields
  • date fields
  • datetime fields
  • number fields
  • url fields

Installation

The easiest way to install django-forms-builder is directly from PyPi using pip by running the command below:

$ pip install -U django-forms-builder

Otherwise you can download django-forms-builder and install it directly from source:

$ python setup.py install

Once installed you can configure your project to use django-forms-builder with the following steps.

Add forms_builder.forms to INSTALLED_APPS in your project's settings module:

INSTALLED_APPS = (
    # other apps
    'forms_builder.forms',
)

If you haven't already, ensure django.core.context_processors.request is in the TEMPLATE_CONTEXT_PROCESSORS setting in your project's settings module:

TEMPLATE_CONTEXT_PROCESSORS = (
    # other context processors
    "django.core.context_processors.request",
    # Django 1.6 also needs:
    'django.contrib.auth.context_processors.auth',
)

Then add forms_builder.forms.urls to your project's urls module:

from django.conf.urls.defaults import patterns, include, url
import forms_builder.forms.urls # add this import

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # other urlpatterns
    url(r'^admin/', include(admin.site.urls)),
    url(r'^forms/', include(forms_builder.forms.urls)),
)

Finally, sync your database:

$ python manage.py syncdb

As of version 0.5, django-forms-builder provides South migrations. If you use south in your project, you'll also need to run migrations:

$ python manage.py migrate forms

Usage

Once installed and configured for your project just go to the admin page for your project and you will see a new Forms section. In this you can create and edit forms. Forms are then each viewable with their own URLs. A template tag render_built_form is also available for displaying forms outside of the main form view provided. It will display a form when given an argument in one of the following formats, where form_instance is an instance of the Form model:

{% load forms_builder_tags %}

{% render_built_form form_instance %}
{% render_built_form form=form_instance %}
{% render_built_form id=form_instance.id %}
{% render_built_form slug=form_instance.slug %}

This allows forms to be displayed without having a form instance, using a form's slug or ID, which could be hard-coded in a template, or stored in another model instance.

File Uploads

It's possible for admin users to create forms that allow file uploads which can be accessed via a download URL for each file that is provided in the CSV export. By default these uploaded files are stored in an obscured location under your project's MEDIA_ROOT directory but ideally the should be stored somewhere inaccessible to the public. To set the location where files are stored to be somewhere outside of your project's MEDIA_ROOT directory you just need to define the FORMS_BUILDER_UPLOAD_ROOT setting in your project's settings module. Its value should be an absolute path on the web server that isn't accessible to the public.

Configuration

The following settings can be defined in your project's settings module.

  • FORMS_BUILDER_FIELD_MAX_LENGTH - Maximum allowed length for field values. Defaults to 2000
  • FORMS_BUILDER_LABEL_MAX_LENGTH - Maximum allowed length for field labels. Defaults to 20
  • FORMS_BUILDER_EXTRA_FIELDS - Sequence of custom fields that will be added to the form field types. Defaults to ()
  • FORMS_BUILDER_UPLOAD_ROOT - The absolute path where files will be uploaded to. Defaults to None
  • FORMS_BUILDER_USE_HTML5 - Boolean controlling whether HTML5 form fields are used. Defaults to True
  • FORMS_BUILDER_USE_SITES - Boolean controlling whether forms are associated to Django's Sites framework. Defaults to "django.contrib.sites" in settings.INSTALLED_APPS
  • FORMS_BUILDER_EDITABLE_SLUGS - Boolean controlling whether form slugs are editable in the admin. Defaults to False
  • FORMS_BUILDER_CHOICES_QUOTE - Char to start a quoted choice with. Defaults to the backtick char: `
  • FORMS_BUILDER_CHOICES_UNQUOTE - Char to end a quoted choice with. Defaults to the backtick char: `
  • FORMS_BUILDER_CSV_DELIMITER - Char to use as a field delimiter when exporting form responses as CSV. Defaults to a comma: ,
  • FORMS_BUILDER_EMAIL_FAIL_SILENTLY - Bool used for Django's fail_silently argument when sending email. Defaults to settings.DEBUG.

Custom Fields and Widgets

You can also add your own custom fields or widgets to the choices of fields available for a form. Simply define a sequence for the FORMS_BUILDER_EXTRA_FIELDS setting in your project's settings module, where each item in the sequence is a custom field that will be available.

Each field in the sequence should be a three-item sequence containing an ID, a dotted import path for the field class, and a field name, for each custom field type. The ID is simply a numeric constant for the field, but cannot be a value already used, so choose a high number such as 100 or greater to avoid conflicts:

FORMS_BUILDER_EXTRA_FIELDS = (
    (100, "django.forms.BooleanField", "My cool checkbox"),
    (101, "my_module.MyCustomField", "Another field"),
)

You can also define custom widget classes for any of the existing or custom form fields via the FORMS_BUILDER_EXTRA_WIDGETS setting. Each field in the sequence should be a two-item sequence containing the same ID referred to above for the form field class, and a dotted import path for the widget class:

FORMS_BUILDER_EXTRA_WIDGETS = (
    (100, "my_module.MyCoolWidget"),
    (101, "my_other_module.AnotherWidget"),
)

Note that using the FORMS_BUILDER_EXTRA_WIDGETS setting to define custom widgets for field classes of your own is somewhat redundant, since you could simply define the widgets on the field classes directly in their code.

Email Templates

The django-email-extras package is used to send multipart email notifications using Django's templating system for constructing the emails, to users submitting forms, and any recipients specified when creating a form via Django's admin.

Templates for HTML and text versions of the email can be found in the templates/email_extras directory. This allows you to customize the look and feel of emails that are sent to form submitters. Along with each of the form_response email templates which are used to email the form submitter, you'll also find corresponding form_response_copies templates, that extend the former set - these are used as the templates for emailing any extra recipients specified for the form in the admin interface. By default they simply extend the form_response templates, but you can modify them should you need to customize the emails sent to any extra recipients.

Note

With django-email-extras installed, it's also possible to configure PGP encrypted emails to be send to staff members, allowing forms to be built for capturing sensitive information. Consult the django-email-extras documentation for more info.

Signals

Two signals are provided for hooking into different states of the form submission process.

  • form_invalid(sender=request, form=form) - Sent when the form is submitted with invalid data.
  • form_valid(sender=request, form=form, entry=entry) - Sent when the form is submitted with valid data.

For each signal the sender argument is the current request. Both signals receive a form argument is given which is the FormForForm instance, a ModelForm for the FormEntry model. The form_valid signal also receives a entry argument, which is the FormEntry model instance created.

Some examples of using the signals would be to monitor how users are causing validation errors with the form, or a pipeline of events to occur on successful form submissions. Suppose we wanted to store a logged in user's username against each form when submitted, given a form containing a field with the label Username with its field_type set to Hidden:

from django.dispatch import receiver
from forms_builder.forms.signals import form_valid

@receiver(form_valid)
def set_username(sender=None, form=None, entry=None, **kwargs):
    request = sender
    if request.user.is_authenticated():
        field = entry.form.fields.get(label="Username")
        field_entry, _ = entry.fields.get_or_create(field_id=field.id)
        field_entry.value = request.user.username
        field_entry.save()

Dynamic Field Defaults

As of version 0.6, you can use Django template code for default field values. For example you could enter {{ request.user.username }} and the field will be pre-populated with a user's username if they're authenticated.

XLS Export

By default, django-forms-builder provides export of form entries via CSV file. You can also enable export via XLS file (Microsoft Excel) by installing the xlwt package:

$ pip install xlwt

django-forms-builder's People

Contributors

anweshadas avatar barsch avatar barseghyanartur avatar bashu avatar bentimms avatar bmihelac avatar changesomecode avatar cmheisel avatar cnborn avatar diegueus9 avatar fabrixxm avatar jaap3 avatar jasuca avatar johnraz avatar kdebowski avatar metteludwig avatar mihi-tr avatar mikbe avatar mrmachine avatar myhro avatar pijuli avatar sbobrovsky avatar sindresorhus avatar sjdines avatar smacker avatar spiccinini avatar splatte avatar stephenmcd avatar thongly avatar zbohm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-forms-builder's Issues

Not able to prepopulate an existing form entry

There are cases when I want to edit an existing form entry. But looks like FormForForm(form, instance = entry) isn't able to populate the form entry with its field entry values. When I use FormForForm, it's always like a new entry.

I think the problem is in its init function, it always set the initial to be a field's default value. I think init function should be smarter. It should fetch every field entry of the form entry and populate the FormForForm's initial field if instance parameter is set.

Hint field for Field

I monkeypatched this in for my client: a 'hint' field in the Field model, that adds the value for 'hint' to the title attribute of the HTML widget.

In my case, I convert this title attribute to an inner label/example/hint inside my input[type=text] and textarea with JavaScript.

Don't know if it's something you could use in general. Could you add 'hint' option and output to title attr of field widget?

error 500 on form show when FORMS_BUILDER_USE_HTML5 = False

When I tried look at form, I had saw this

Environment:


Request Method: GET
Request URL: http://localhost:8000/formbuilder/test/

Django Version: 1.3
Python Version: 2.6.6
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.markup',
 'django.contrib.messages',
 'rosetta',
 'sorl.thumbnail',
 'staging',
 'utils',
 'registration',
 'captcha',
 'tagging',
 'filebrowser',
 'chunks',
 'haystack',
 'forms_builder.forms',
 'comments',
 'contests',
 'content',
 'menu',
 'news',
 'faq',
 'blog',
 'imagegallery',
 'imageconf',
 'events',
 'videogallery',
 'profiles',
 'downloads',
 'products',
 'south',
 'bannertop',
 'myevents',
 'headline']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'content.middleware.FlatpageFallbackMiddleware',
 'middleware.MobileDetectionMiddleware')


Traceback:
File "/home/sr/pydev/scms-proj/scms/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/home/sr/pydev/scms-proj/scms/../lib/forms_builder/forms/views.py" in form_detail
  28.     form_for_form = FormForForm(*args)
File "/home/sr/pydev/scms-proj/scms/../lib/forms_builder/forms/forms.py" in __init__
  99.                 if (settings.FORMS_USE_HTML5 and

Exception Type: AttributeError at /formbuilder/test/
Exception Value: 'module' object has no attribute 'FORMS_USE_HTML5'
#project/settings.py
FORMS_BUILDER_USE_HTML5 = False

In your forms_builder/forms/settings.py FORMS_USE_HTML5 is absent, there is only USE_HTML5

Deleting field breaks View Entries view

When field is removed from the form, that already have some entries, View Entries admin view will be broken.

Caught KeyError while rendering: 'field_2_filter'

Emailing + file uploading does not work

The files are already closed at the time the the emailing happens.

Traceback:
File "/home/serveruser/.virtualenvs/sifco/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response

    response = callback(request, *callback_args, **callback_kwargs) File "/home/serveruser/.virtualenvs/sifco/lib/python2.6/site-packages/forms_builder/forms/views.py" in form_detail
    f.seek(0)

Exception Type: ValueError at /forms/sifco-forge-rfq/
Exception Value: I/O operation on closed file

Modify e-mail text per form

Can you add 2 fields to your Form model:

  1. email_subject
  2. email_text

and use these in the e-mails sent to the persons who entered the form. Text can be placed above the current field output.

This won't be needed for the 'copies to' functionality, I think.

Breadcrumb in Export Entries

In the Forms list the breadcrumb is:
Home > Forms > Forms

But in Export Entries the breadcrumb is:
Home > Export Entries

While it should be:
Home > Forms > Formname > Export Entries

Sometimes I forget which form I'm on, since I have a couple of tabs with the export view open to view new entries, so it would be useful so have the name of the form in the breadcrumb bar.

Entries column

Have a column where you show how many entries a form has.

Feature request: Formsets

Hello Stephen,

Nice product!

I have a feature request, which would in my opinion make it even more usable.

I want to be able to add formsets. If would be good, if those formsets would be a tiny bit configurable (I want to be able to assign a CSS class to them, provide max number of formsets, initial number of formsets, etc.)

Best regards,

Artur

Feature: make it easier to override models

I like idea that base models are implemented as abstract models allowing subclassing.

However, overriding is not so easy, because:

  • concrete classes are defined in same module as abstract models (polluting db schema in case of subclassing, views use concrete classes, etc)
  • some things included in abstract models, should be part of default concrete implementation instead (ie: button text, required login, publish attributes, ...)

I like IoC ideas discussed in this (question)[http://stackoverflow.com/q/9175244/238628], especially with defining concrete models in settings.py.

What do you think?

File upload working, but not with e-mail copy

If I don't specify e-mail addresses to copy the form entry to, then file upload works without problem. But if you do, then the form entry and file are saved, but sending the e-mail copies will throw the following:

File "/home/www/test.artis.nl/django/django-forms-builder/forms_builder/forms/views.py", line 45, in form_detail
f.seek(0)

ValueError: I/O operation on closed file

Can you validate this error?

Documentation typo

README says to use the tag {% render_build_form %} but the tag is actually {% render_built_form %}.

contact form url

i am newbie
please help
how to add 'forms_builder.forms.urls to your url conf' in practice
just add this line to urls.py?
and where from should appear (url of the page) after i add it?
many thanks

Using Bootstrap

Hello! I was playing around with forms-builder. Now, I'm trying to integrate Twitter Bootstrap, so that the form elements are styled using Bootstrap. Now for instance, there are multiple CSS classes provided by Bootstrap; creating a button tag, and giving it a particular class attribute then styles the button accordingly. Is there any way one could do that with forms-builder? Specify HTML tag attributes through the admin interface, something of that sort?

Thanks!

KeyError for 'request' in forms_builder_tags.py

On a clean install of Django, both 1.3 and 1.4, I ran into a KeyError for 'request'. The stack trace led me to the following:

forms_builder/forms/templatetags/forms_builder_tags.py in render line 20:

        request = context["request"] 

Request wasn't being included into the context but after a little bit of searching I found that I added 'django.core.context_processors.request' to settings.TEMPLATE_CONTEXT_PROCESSORS
request was available in all templates. By default, `'django.core.context_processors.request' is not included.
https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATE_CONTEXT_PROCESSORS

So now my TEMPLATE_CONTEXT_PROCESSORS is as follows:

TEMPLATE_CONTEXT_PROCESSORS = (
"django.contrib.auth.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
"django.core.context_processors.media",
"django.core.context_processors.static",
"django.core.context_processors.tz",
"django.contrib.messages.context_processors.messages",
'django.core.context_processors.request',  # added for django-formsbuilder
)

Perhaps this small change to settings.py should be added to the README. I'd be happy to do this in a Pull request if you would like.

Thanks

Add information of how to migrate to latest version

Since you've added database migration to django-forms-builder, I suggest that it's better to add a section of how to migrate to the latest version if users installed earlier version before in README.

In Project Configuration section, you write:

sync your database

$ python manage.py syncdb

It's better to change it to more details based on following scenarios:

If you've never installed django-forms-builder and don't have South, sync your database

$ python manage.py syncdb

If you've never installed django-forms-builder and have South installed, run the following command:

$ python manage.py migrate forms_builder.forms

If you installed django-forms-builder before and is going to update to the latest version, run the following commands:

$ python manage.py migrate forms_builder.forms 0001 --fake
$ python manage.py migrate forms_builder.forms

IntegerField

Can you add the formset IntegerField as a field?

Would be useful when you want to make sure the user can only submit a number.

File uploads cannot be optional

When "File upload" field is added to the form and marked as not required submitting form without file would raise an exception:

Caught Warning while rendering: Column 'value' cannot be null

This is because FileField cleans empty upload to None value which current model schema does not allow. This is tested with mysql.

Solution for this is to allow null fields in value field of FieldEntry.

value = models.CharField(max_length=settings.FIELD_MAX_LENGTH, null=True)

CSV in Excel unicode problem

There is still and issue with opening the csv file in Excel gives gibberish for norwegian chars. Same with both Excel 2003 win and 2011 mac.

This æøå becomes æøå

This seems to be a common problem, and a solution seems to be to encode the chars as utf-16.

I've also managed to get it to work by opening the CSV file in Notepad++ and converting it to "utf-8 with BOM". So it might be that it's missing the BOM.

Option to save username if authenticated

I use it in an environment where everyone using it is logged in to Django. On some forms we like to save username. Right now the user have to manually the username.

Can we have an option to save the username, like it already does with the date.

UnicodeEncodeError, in file upload non English (Korean file name)

Ubuntu 12.04.3, apache2, mysql, python 2.7.3, mod_wsgi. Uploading files in Korean language products UnicodeEncodeError, but files in English are all okay. What could be look into ?

UnicodeEncodeError at /forms/go/
'ascii' codec can't encode characters in position 72-75: ordinal not in range(128)
Request Method: POST
Request URL: http://testing.domain.com/forms/go/
Django Version: 1.6.1
Exception Type: UnicodeEncodeError
Exception Value:
'ascii' codec can't encode characters in position 72-75: ordinal not in range(128)
Exception Location: /usr/lib/python2.7/genericpath.py in exists, line 18
Python Executable: /usr/bin/python
Python Version: 2.7.3

Unicode error hint

The string that could not be encoded/decoded was: 56ae/최종수정(펼침).

Signal for "form submitted"

There is no way to hook into a form once it has been submitted. If you hook to FormEntry. post_save it will get fired before the fields are saved.

One way that this could be rectified would be by firing a new signal on FormForForm.save() just before it returns.

A best example

Hi,
Where I can find some example with views.py and more front-end usage?

How can I choose the action of the created form?

Thx!

rebase or delete norwegian-translation branch

The norwegian-translation branch forks at the initial commit and introduces many redundant commits, cluttering the git history.

$ git log --oneline --graph --all --date-order
...
| * b70e2d0 Cleaned up imports as per PEP 8
* | 19f1630 Cleaned up imports as per PEP 8
| * b5bfb09 Made the default for the status field on BuiltForm use the STATUS_PUBLIC constant rather than the actual value of it.
* | 57ac848 Made the default for the status field on BuiltForm use the STATUS_PUBLIC constant rather than the actual value of it.
| * 687c3d1 --HG-- extra : convert_revision : svn%3A75ee960e-7cdb-11de-a253-d3d9d9688d98/trunk%402
* | 039e539 --HG-- extra : convert_revision : svn%3A75ee960e-7cdb-11de-a253-d3d9d9688d98/trunk%402
|/  
* 26bbd72 Initial directory structure.

I recommend a rebase

git checkout norwegian-translation; git rebase 70115d9; git push -f

Or removing the norwegian-translation branch if you don't need to do development on it anymore.

git push origin :norwegian-translation

Export unicode CSV

It seems that there isn't support for exporting unicode strings to CSV.

I tried exporting a form with unicode fields (example: Jørn), and got an error.

Traceback:

Environment:


Request Method: POST
Request URL: http://kolwb0060.mil.no:8000/admin/forms/form/export/3/

Django Version: 1.3
Python Version: 2.6.6
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'activitycalendar',
 'reversion',
 'forms_builder.forms',
 'intranet_comments']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.auth.middleware.RemoteUserMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "C:\Python26\lib\site-packages\django\utils\decorators.py" in _wrapped_view
  93.                     response = view_func(request, *args, **kwargs)
File "C:\Python26\lib\site-packages\django\views\decorators\cache.py" in _wrapped_view_func
  79.         response = view_func(request, *args, **kwargs)
File "C:\Python26\lib\site-packages\django\contrib\admin\sites.py" in inner
  197.             return view(request, *args, **kwargs)
File "c:\inetpub\intranett\forms_builder\forms\admin.py" in export_view
  95.                     csv.writerow(rows)

Exception Type: UnicodeEncodeError at /admin/forms/form/export/3/
Exception Value: 'ascii' codec can't encode character u'\xf8' in position 1: ordinal not in range(128)

Migration error in South

I'm using South to migrate the database. But encountered the following error:

SouthFieldClass(default=[<Site: localhost:8000>], to=orm['sites.Site'], symmetrical=False)
                         ^

SyntaxError: invalid syntax

I think the cause is the following definition:

def default_sites():
    return [Site.objects.get_current()]
sites_field = models.ManyToManyField(Site, default=default_sites)

It somehow generates
{'default': '[<Site: local host:8000>]', 'to': "orm['sites.Site']", 'symmetrical': 'False'}
in migration file.

Enhancement: add slug to Field

Enhacement proposal: add slug to Field and use it for field names in FormForForm instead of id.

This would allow referencing fields by slug in e-mail response or other processing.

What do you think?

Supporting Korean (double byte) in radio, checkox, filename

Hello Stephen,

I had help of a good django experter and installed the forms builder and upon testing, I found below.

Environment : Ubuntu10.10, default apache, mysql with Firefox and Outlook 2003 version as desktop client

After I submit forms from the browser, I see below. First column is Korean (label) and value looks like below. Any clue as to how I can fix this to support Korean ? The field types with issues are "multiselect, checkboxes". In addition, for file name uploding Korean filename encounters error "'ascii' codec can't encode characters in position 88-91: ordinal not in range(128)" Any clue as to what to check for ?

관심사: [u'\uc0db']
산업분류: [u'\uc0b0\uc5c5\ud558\ub098', u'\uc0b0\uc5c5\uc14b']

Thanks for the great program.
SunJoo

Could not parse the remainder: ':form_entries' from 'admin:form_entries'

Hi there,

after installation I tried to add a new form and hit the following error on a Win7 x64/Py 2.7/Django 1.4 system:

TemplateSyntaxError at /admin/forms/form/add/

Could not parse the remainder: ':form_entries' from 'admin:form_entries'

Request Method:     GET
Request URL:    http://127.0.0.1:8000/admin/forms/form/add/
Django Version:     1.4
Exception Type:     TemplateSyntaxError
Exception Value:    

Could not parse the remainder: ':form_entries' from 'admin:form_entries'

Exception Location:     D:\Python\django\lib\site-packages\django-1.4-py2.7.egg\django\template\base.py in __init__, line 563
Python Executable:  D:\Python\django\Scripts\python.exe
Python Version:     2.7.2
Python Path:    

['D:\\Workspace\\egu\\src',
 'D:\\Python\\django\\lib\\site-packages\\django-1.4-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\pyscss-1.1.3-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\django_pagination-1.0.7-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\django_simple_captcha-0.3.4-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\pip-1.1-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\ipython-0.12.1-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\distribute-0.6.26-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\django_constance-0.3-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\vobject-0.8.1c-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\six-1.1.0-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\django_cal-0.1dev-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\python_dateutil-1.5-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\django_forms_builder-0.7.3-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\django_email_extras-0.1.8-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\sphinx_me-0.1.2-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\python_gnupg-0.3.0-py2.7.egg',
 'D:\\Workspace\\egu\\src',
 'D:\\Python\\django\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\pip-1.0.2-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\django_watson-1.1.0-py2.7.egg',
 'D:\\Python\\django\\lib\\site-packages\\django-1.3-py2.7.egg',
 'D:\\Python\\django\\DLLs',
 'D:\\Python\\django\\lib',
 'D:\\Python\\django\\lib\\plat-win',
 'D:\\Python\\django\\lib\\lib-tk',
 'D:\\Python\\django\\Scripts',
 'C:\\Program Files\\Python27\\Lib',
 'C:\\Program Files\\Python27\\DLLs',
 'C:\\Program Files\\Python27\\Lib\\lib-tk',
 'D:\\Python\\django',
 'D:\\Python\\django\\lib\\site-packages',
 'C:\\Program Files\\Python27\\lib\\site-packages\\distribute-0.6.19-py2.7.egg',
 'C:\\Program Files\\Python27\\lib\\site-packages\\ipython-0.11-py2.7.egg',
 'C:\\Program Files\\Python27\\lib\\site-packages\\ipdb-0.5-py2.7.egg',
 'C:\\Program Files\\Python27\\lib\\site-packages\\pyreadline-1.7-py2.7-win-amd64.egg',
 'C:\\Program Files\\Python27\\lib\\site-packages\\virtualenv-1.7-py2.7.egg',
 'C:\\Program Files\\Python27',
 'C:\\Program Files\\Python27\\lib\\site-packages',
 'C:\\Program Files\\Python27\\lib\\site-packages\\win32',
 'C:\\Program Files\\Python27\\lib\\site-packages\\win32\\lib',
 'C:\\Program Files\\Python27\\lib\\site-packages\\Pythonwin',
 'C:\\Program Files\\Python27\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg-info',
 'C:\\Windows\\system32\\python27.zip',
 'D:\\Python\\django\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg-info',
 'C:\\Program Files\\Python27\\lib\\site-packages\\PIL',
 'C:\\Program Files\\Python27\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg-info']

Server time:    Tue, 22 May 2012 08:51:37 +0200

Error during template rendering

In template D:\Python\django\lib\site-packages\django_forms_builder-0.7.3-py2.7.egg\forms_builder\forms\templates\admin\forms\change_form.html, error at line 9

Could not parse the remainder: ':form_entries' from 'admin:form_entries'

Any idea?

Cheers,
Robert

Add hooks for form CSS

It would be useful to be able to:

  • Add a reference to the CSS file for forms in my app's settings
  • Have a template CSS file with classes for each form field type

I will probably add this for my project, but think it would be of general usefulness. This can also be expanded to allow a choice of "themes" from the Admin panel.

Action column

"Export entries" and "View on site" should be in a column called "Actions", right now it's using up too much vertical space.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.