Skip to content

adrienbrunet/ngrest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngrest

Small demo app to build forms in angular from django modelSerializers with django-rest-framework.

Right now working on angular1.x, support for angular2 is coming...

Install

pip install -r requirements.txt

Back

Launch django on 127.0.0.1:8000

cd back
./manage.py migrate
./manage.py runserver

Front

Angular1.x --> front repository

Launch the angular1.x app on 127.0.0.1:8080 using ES6 and webpack

cd front
npm install
npm start

### Angular2 --> front2 repository Launch the angular1.x app on 127.0.0.1:3000 with webpack

cd front2
npm install
npm start

Sqlite3 limitation

With sqlite3 (by default with this repo), you may face problems with model field's validators. Example: a PositiveIntegerField, after being serializer, won't have min_value=0 as an attribute. It's because sqlite does not enforce any limits on its fields.

You might want to use another db. To use postgres, uncomment the requirements.txt line with postgres, pip install it, setup your postgres database and update the settings.py.


Creators: Xavier Ordoquy @xordoquy and Adrien Brunet @adrienbrunet

About

Drf + angular = generated form from models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •