Forums

Angular 2 w/Django Rest Framework help

Hello, I am not new to restful website development, but I am new to Django and am trying to branch out with developing my own personal site. I am trying to run an Angular 2 client that will communicate with a Djangorestframework server. My problem is that when I go to my domain, I only see the rest framework api browser, instead of the Angular 2 client being loaded. I realize this is probably a pretty noob question but any help is appreciated. Thanks.

PS It does run correctly locally by using cmd python manage.py runserver for backend and npm start for client. I am not opposed to having to rebuild my site on pythonanywhere again because I can just clone the project from github.

File structure I want is like this:

/mysite
  /client
    /app
      /components
      /services
      /modules
      /templates
      main.ts
      ...etc
    index.html
  /server
    /config
      settings.py
      urls.py
      wsgi.py
    /mysite
      admin.py
      apps.py
      models.py
      views.py
      ...etc
  requirements.txt

May be a noob answer but in Flask you set up a route to some URL and do a send_file of your static template (that can have js) of your angular single page app. Then the angular SPA has its own routers with the #etc partials. I assume Django would be similar. Sorry if this answer is way too basic and you are asking something else.