Re: Issue with serving angular with django

2020-06-03 Thread Andréas Kühne
Hi again, How are you serving the django application? As far as I know the only way to get django to serve your staticfiles (which you are describing) is to set DEBUG to true and also use the runserver command. How do you get the paths to the static files? What I would do is the following: 1.

Re: Issue with serving angular with django

2020-06-02 Thread Sunday Iyanu Ajayi
Hi Andréas , It actually followed the digital oceans setup in setting up the nginx server *AJAYI Sunday * (+234) 806 771 5394 *sunnexaj...@gmail.com * On Mon, Jun 1, 2020 at 6:24 PM Andréas Kühne wrote: > Hi Sunday, > > No - you don't. What collectstatic does is it collects all of the

Re: Issue with serving angular with django

2020-06-01 Thread Andréas Kühne
Hi Sunday, No - you don't. What collectstatic does is it collects all of the static files to the path where they should be stored. This should be a directory that should be served from nginx or apache or any other webserver. When you run manage.py runserver - you run a development server that

Re: Issue with serving angular with django

2020-06-01 Thread Sunday Iyanu Ajayi
Hi Kasper, Thanks for the response. I serve my static file by running python manage.py collectstatic on the built file I get from the frontend angular guy *AJAYI Sunday * (+234) 806 771 5394 *sunnexaj...@gmail.com * On Mon, Jun 1, 2020 at 2:55 PM Kasper Laudrup wrote: > Hi Sunday, > > On

Re: Issue with serving angular with django

2020-06-01 Thread Chetan Ganji
You should use nginx to serve angular n static files and gunicorn for python Below tuts might help you. https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04 Look for a tutorial without docker.

Re: Issue with serving angular with django

2020-06-01 Thread Kasper Laudrup
Hi Sunday, On 01/06/2020 15.48, Sunday Iyanu Ajayi wrote: Please What am I doing wrong? Or are there better ways of serving angular build files on django? You haven't described how you are currently serving static files with Django. I suggest you start by reading this:

Issue with serving angular with django

2020-06-01 Thread Sunday Iyanu Ajayi
Hi guys, I am working on a project which is made up of an angular and a django part. - The frontend dev develops the frontend, makes a build and forwards to me - I get the build and serve it using python manage.py collectstatic But my challenge is that 1. It only works when debug is set to