jonasgeiregat / django-ajax-forms Goto Github PK
View Code? Open in Web Editor NEWAjax Form Views that allows forms and their individual fields to be evaluated through Ajax calls
License: Other
Ajax Form Views that allows forms and their individual fields to be evaluated through Ajax calls
License: Other
I would like to save the form to appear:
Saved successfully!
<script type="text/javascript">
$(function() {
$('#email-register-password').validate('{% url "email_password_register" %}',
{
type: 'p',
fields: true,
event: 'focusout',
fieldSuccessCallback: function(field) {
if(field.next("span").length == 0) {
field.after("<span><img class='success-ok' src='{% static 'img/ok.png' %}' width='48' height='48'></span>");
}
},
formSuccessCallback: function(form) {
},
fieldInvalidCallback: function(field) {
if(field.next("span").length > 0) {
field.next("span").remove();
}
}
}
);
});
</script>
<form method="POST" id="email-register-password" class="form form-horizontal" accept-charset="UTF-8" >
{% csrf_token %}
{{ form }}
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Fechar</button>
</div>
</form>
Hi,
When you use Modelform and you have (auto_now_add=True)
you have this error:
TypeError: datetime.datetime(2013, 12, 4, 17, 23, 51, 893632, tzinfo=) is not JSON serializable
For correct this:
add :
from django.core.serializers.json import DjangoJSONEncoder
import json
and change in views.py:
def convert_context_to_json(self, context):
return json.dumps(context, cls=DjangoJSONEncoder)
also like that deprecated use of simplejson is corrected.
(source from http://stackoverflow.com/a/5781657)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.