Getting Started

This documentation will show you how you can powerfully use Djangular.

The idea was to build an easy framework to start with an interactive app. This app will be written in Javascript (AngularJS) with a REST api (Django) as a backend and data source.

Djangular also provides some ready to use apps, or what you might call modules. A module can be an authentication module with login, sign up.. or a blog module as well.

If you are already familiar with virtualenv go to Djangular Setup.

Download

Clone the GitHub Repository https://github.com/ukramer/djangular.git

Using virtualenv

virtualenv provides a virtual environment for python projects, where you can install python apps.

We recomment to set up the virtualenv as following:

$ mkdir tools && cd tools $ virtualenv env $ source ./tools/env/bin/activate $ pip install django==1.7.5 $ pip install django-tastypie

Note

To use the virtual environment, run $ source ./tools/env/bin/activate ; to deactivate run $ deactivate

Djangular Setup

Djangular has two parts.

  • AngularJS
  • Django

The AngularJS part is located in /web/ folder. The Django part is located under /api/.

Add a new app

To add a new app, you have to copy all files into the correct directory.

  • AngularJS part into /web/apps/
  • Django part into /api/

After that, you have to activate and tell Django to load these apps.

The following changes have to be made:

  • in /web/app.js add a new entry to the variable installed_apps with the name of the app
  • in /api/api/settings.py add the app name to the configuration variable INSTALLED_APPS
  • in /api/api/urls.py add the url configuration described in the installation instruction of the app