CookieCutter template for Automated DRF Angular
JavaScript Python HTML Makefile CSS
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
{{cookiecutter.dir_name}} template bug Jul 5, 2017
LICENSE Added LICENSE Feb 7, 2017
README.md Update README.md Jul 5, 2017
cookiecutter.json JSON fix Oct 17, 2016

README.md

CICADA - CookIeCutter Automated DRF Angular

CICADA uses Cookiecutter and a custom script to automatically populate an AngularJS frontend that connects to your Django REST backend. This template makes some assumptions about your backend, namely that it is a Django DRF-based backend with JWT authentication. Such a template for a backend can be easily created with the cc-automated-drf-template.

Full tutorial with cc-automated-drf-template and CICADA coming soon!

Features

  • Webpack configured
  • backend communication with Restangular
  • creates list and detail controllers for all models
  • creates list and detail partials for all models
  • built-in JWT-based login/logout
  • uses angular-gravatar for user icons
  • support for multiple apps in the backend

Installation

Install Cookiecutter:

$ pip install cookiecutter

Give names for your directory, project, and app when prompted by Cookiecutter.

$ cookiecutter https://github.com/TAMU-CPT/CICADA.git
dir_name [frontend-test]:
description [Test frontend]:
author [TAMU-CPT]:
app_name [testApp]:

Run the script to populate template using the path to your backend app's models.py:

$ python script.py path/to/models.py

To install requirements and run, type:

$ make

That's it! By default, your server will be running on port 10000 and pointing at port 8000 for the backend.

Multiple app support

Some Django projects have multiple apps in addition to the base application. If you want to similarly generate files on your frontend for another app, all you have to do is run the script again using the path to that app's models.py.