Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thurloat/django-dojo-toolkit
Dojo forms toolkit for django forms
https://github.com/thurloat/django-dojo-toolkit
Last synced: 9 days ago
JSON representation
Dojo forms toolkit for django forms
- Host: GitHub
- URL: https://github.com/thurloat/django-dojo-toolkit
- Owner: thurloat
- Created: 2010-09-09T14:17:40.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2010-09-09T14:19:45.000Z (about 14 years ago)
- Last Synced: 2024-04-13T20:02:23.213Z (7 months ago)
- Language: Python
- Homepage:
- Size: 155 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# Django Dojo Toolkit #
This is our implementation of Various Dojo Dijit Widgets and Dojo Forms.
# Sample Usage #
in forms.py:
from django import forms
from dojotoolkit.forms import DojoForm
from dojotoolkit.widgets import DojoDateWidget, DojoValidatingTextWidget, DojoSelectWidget
class FooForm(DojoForm):
name = forms.CharField(widget = DojoValidatingTextWidget("[a-zA-Z ]+", required=True, invalid_message="don't use numbers"))
def save(self):
#save your model using self.cleaned_data
return instance
in your template:{% extends "base.html" %}
{% block preload_js %}
{{ form.get_dojo_js }}
{% endblock %}
{% block content %}
{{ form.as_table }}
{{ form.get_submit_button }}
{% endblock %}
# Additional Notes #- Call Adam or Sam!