Skip to content

serudda/angular-typescript-django-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Angular-Typescript-Django-Rest

##Overview

It's a base structure (Full Stack Single Page Application) for the starter who want to start a web application. This repository has 2 separate modules: Client module and Server module.

###Client

Client side contains the following technologies:

###Server

Server side was made with the following technologies:

Getting Started

You have to install previously:

  • Python 3.5
  • NodeJS (npm)
  • Bower
  • Gulp
  • Typescript
  • Tsd
  • Gem (Ruby)
  • Sass
  • Virtualenv (optional)

You have to git clone this repository:

git clone https://github.com/sergioruizdavila/angular-typescript-django-rest

Installation for Client Side

Open a terminal (on root project/client):

  • npm install
  • bower install
  • sudo tsd reinstall —save —overwrite if you want to update each typing definition: tsd update -so

Installation for REST API Server Side

Open a terminal (on root project/server):

  1. virtualenv venv
  2. source venv/bin/activate
  3. pip install -r requirements.txt if you have error with 'docutils' package, you can uninstall it: pip uninstall docutils
  4. make migrations (next topic)
  5. create a superusers ('create superuser' topic)

Make migrations

On Django when you create a new model of data (example: posts model, authentication model, etc) you have to create a specific migration for each model.

In this case, we have djangoapps/authentication model and djangoapps/posts model (the latter, I leave it as an example for when you need to create a new app in the future).

In order to create migrations for each models (in this case 'authentication' and 'posts') you have to: python manage.py makemigrations <app_label> in our case would be python manage.py makemigrations authentication and python manage.py makemigrations posts

In order to see If you create each migrations well you can use the following command: python manage.py showmigrations You should see the migrations list, including 'authentication' and 'posts' models (with X).

To run each migrations:

  • python manage.py migrate

Create Superuser

In order to test that all it's right, you should create a superuser in order to LogIn on Django Rest Admin Page:

  • python manage.py createsuperuser

Usage for REST API Server

Here if everything is OK, you should run server and go to localhost on browser, you should be able to see Django Rest Admin Page.

  • python manage.py runserver

Reference: https://github.com/shalomeir/snippod-starter-demo-app-server

About

It's a base structure with a client: Angular 1 + Typescript and server (restAPI): Django Rest Framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors