Giter VIP home page Giter VIP logo

angular-django-example's Introduction

Angular 6 / Django Rest Framework / JSON Web Token demo app

This is a demo app showing how to make API calls with Angular 6 and Django Rest Framework, including how to send authentication headers so API calls will function when logged in.

What this repo contains

The following files are interesting:

  • angular_django_cors - The Django project and main settings file
  • microblog - An app within the project, containing the Django Rest Framework views and URL routing
  • static/ng-demo - The Angular app source code lives here
  • static/dist - The compiled Angular app is here

Requirements

You need the following to run this app:

  • Python 3.5 or higher (Python 2.x is not supported by Django 2.x)
  • Pipenv
  • Node v8.x or higher
  • NPM v5.x or higher

Setup

Open a terminal at the repo root, and run the following:

pipenv install
pipenv shell
cd microblog/front-end
npm install
ng build
cd ../..
python manage.py runserver

Your app will be available at http://127.0.0.1:8000.

Database

This project uses a SQLite database, which lives in the file db.sqlite3. SQLite3 support should be available out of the box on most modern operating systems.

Logging into the app

The database included in this repository contains two users. The following are their usernames and passwords, which you may use for testing:

  • admin / admin123
  • user1 / example123

Questions?

If you spot an error when trying to run the demo app, please file a bug in the GitHub issue tracker.

Please do not create issues or email me asking for support for your own projects. I cannot provide support for your custom applications. Forking for Acme Corp

angular-django-example's People

Contributors

kdechant avatar dependabot[bot] avatar clamey avatar

Forkers

dh-demo-org

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.