Skip to main content

django-angular

Let Django play well with AngularJS

Build Status PyPI version Python versions Software license Twitter Follow

Deprecation Warning: AngularJS is dead

Since AngularJS is deprecated now, this library shall not be used for new projects anymore. Instead please proceed with my follow-up project django-formset. All the useful features for Django Form validation have been reimplemented in django-formset, this time in vanilla TypeScript and without depending on any third party package.

What does it offer?

Add AngularJS directives to Django Forms. This allows to handle client side form validation using the constraints provided by the server side Form declaration.

For more information, please visit the demo site.

How to run

git clone https://github.com/jrief/django-angular.git django-angular.git
cd django-angular.git
docker build -t django-angular.git .
docker run -d -it -p 9002:9002 django-angular.git

Open the application at http://{docker-host's-ip}:9002/

Backward Incompatibility

To be compliant with other libraries such as djangorestframework, server-side responses on rejected forms use error code 422, rather than 200. If you use your own form controllers, adopt them accordingly. The JSON format used to communicate errors downstream has changed slightly.

New Features

For a smoother transition path, django-angular added two directives in version 2.0:

<form djng-endpoint="/path/to/endpoint">...</form>, which can be used to upload form data to the server. It also populates the error fields, in case the server rejected some data.

<djng-forms-set endpoint="/path/to/endpoint"><form ...>...</form>...</djng-forms-set> Similar to the above directive, but rather than validating one single form, it validates a set of forms using one shared endpoint.

A promise chain has been introduced. Buttons used to submit form data and then proceed with something else, now can be written as:

<button ng-click="do(update()).then(redirectTo('/path/to/other/page'))">Label</button>

Documentation

Detailed documentation on ReadTheDocs.

Demo on how to combine Django with Angular's form validation.

Please drop me a line, if and where you use this project.

Features

  • Seamless integration of Django forms with AngularJS controllers.
  • Client side form validation for Django forms using AngularJS.
  • Let an AngularJS controller call methods in a Django view - kind of Javascript RPCs.
  • Manage Django URLs for static controller files.
  • Three way data binding to connect AngularJS models with a server side message queue.
  • Perform basic CRUD operations.

Examples

License

Copyright © 2019

MIT licensed

Release files for django-angular 2.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-angular 2.3.1
File Size Uploaded
django-angular-2.3.1.tar.gz 164.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-angular 2.3.1
File Interpreter ABI Platform
django_angular-2.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 357.3 kB

Release files / django-angular-2.3.1.tar.gz

Download URL django-angular-2.3.1.tar.gz
Size 164.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b9c97de2b4658d30f6e3a4f9d5515a479914ac5976a3cb46a609faae0bd95852
BLAKE2b-256 checksum
How to use checksums
102f150b761f96b0e64b6a77c313b958e9177bc6cebaa4f713b8875b169b6b96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / django_angular-2.3.1-py3-none-any.whl

Download URL django_angular-2.3.1-py3-none-any.whl
Size 192.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4841cb6e8e3323300e7ffff44d8a7c54bc474974e76d7b47145c0010de79913b
BLAKE2b-256 checksum
How to use checksums
5c3d789136a2ab3ecc251f7d27a4a9193e6e9cd2d434e6ae9bba87527ec38ac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

2.3.1 This release

2 release files

2.3

1 release file

2.2.4

1 release file

2.2.3

1 release file

2.2.2

1 release file

2.2.1

1 release file

2.2

1 release file

2.1

1 release file

2.0.3

1 release file

2.0.2

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.1.4

1 release file

1.1.3

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.8.6

1 release file

0.8.5

1 release file

0.8.4

1 release file

0.8.3

1 release file

0.8.2

1 release file

0.8.1

1 release file

0.8.0

1 release file

0.7.16

1 release file

0.7.15

1 release file

0.7.14

1 release file

0.7.13

1 release file

0.7.12

1 release file

0.7.11

1 release file

0.7.10

1 release file

0.7.9

1 release file

0.7.8

1 release file

0.7.7

1 release file

0.7.6

1 release file

0.7.5

1 release file

0.7.4

1 release file

0.7.3

1 release file

0.7.2

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6.0

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.4

1 release file

0.1.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page