last day (15 days later) » 

1:16 PM
0
Q: why getting not found error on django application?

SollosaI'm running pre-built django app in a container with Dockerfile FROM python ENV PYTHONUNBUFFERED 1 ENV C_FORCE_ROOT true RUN apt-get update -yqq RUN apt-get install gdal-bin python-gdal python3-gdal -yqq ADD ./requirements.pip /requirements.pip RUN pip install --upgrade pip RUN pip install -r r...

 
@SergeyPugach how to & where to put it Amigo?
 
@Sollosa he means show us your urls.py file
 
@SergeyPugach added both Dockerfile and urls.py
 
what's 'api.router'? and show us "api/jwt/urls.py"
 
@dirkgroten not sure about api.router tho, am devops only.
@dirkgroten file added dirk
 
1:16 PM
There isn't a url path defined for the empty url. If you try /docs/ you should see something, which will probably show you documentation for a list of urls starting with /api/ that you can try. Other urls that might work are /products/, /activities/, ... . Probably the idea is that you setup the web server (nginx or apache) to redirect / to something that exists.
 
@dirkgroten this is running project on digitalocean actually, and I copied it's development branch from its source library
 
there's nothing wrong with the project, except it doesn't define any behavior for the / url. We can't help you. It seems intentional. It's probably not supposed to be used as a website but only as an api, so all calls should start with /activities or /users? We don't know, talk to your business owner what this should do.
 
@dirkgroten could this be db issue? Cause I'm only running django + gunicorn on same container
 
as I said there's no issue. What you see is a 404 page not found for the url "/". If you try other urls, your app will probably work.
 
good to see you again Dirk
 
1:18 PM
also when you deploy, you should not see this, you should just see "Page not found" message. This is because you still have `DEBUG=True" in settings.py. It should be set to False if this app is going to be public.
 
ahan thx
I'm trying to link this app with docker-compose with other containers like gunicorn and nginx
still no luck
 
anyway, you probably know better than i do what this app is supposed to do. I looks like mostly an API (for a mobile app?) and therefore maybe it intentionally does not have a response for "/".
 

last day (15 days later) »