Install django-angular. The latest stable release can be found on PyPI
pip install django-angular
Change to the root directory of your project and install Node dependencies:
npm init npm install angular --save
django-angular has no dependencies to any other Django app, except
Pillow if using the image upload feature. AngularJS may be installed through other then
pip isn’t valid in any case.
'djng' to the list of
INSTALLED_APPS in your project’s
INSTALLED_APPS = [ ... 'djng', 'easy_thumbnails', # optional, if ImageField is used ... ]
Don’t forget to define your
and CSS files directly from our Node dependencies, add that directory to the static files search
STATICFILES_DIRS = [ ('node_modules', os.path.join(BASE_DIR, 'node_modules')), ]
From the project’s templates, you may refer the AngularJS files as:
Django, since version 1.11, is shipped with an exchangeable widget rendering engine. This is a
great improvement for django-angular, since it doensn’t have to override the widgets and its
renderers. Instead, your projects
settings.py, please use this configuration directive:
FORM_RENDERER = 'djng.forms.renderers.DjangoAngularBootstrap3Templates'
if templates shall be rendered with a Bootstrap3 grid, otherwise use:
FORM_RENDERER = 'djng.forms.renderers.DjangoAngularTemplates'
django-angular does not define any database models. It can therefore easily be installed without any database synchronization.