how to make https work in django REST framework on runserver port

42 views
Skip to first unread message

Rupam Hazra

unread,
Aug 29, 2018, 7:16:15 AM8/29/18
to Django users

Hi, i am working django rest service using runserver on different port on http but i want to use the https service.

Please help.

Jason

unread,
Aug 29, 2018, 7:39:34 AM8/29/18
to Django users
for local development, why do you need https?  for staging and production, you should be using apache with mod_wsgi or nginx with uwsgi/gunicorn

Rupam Hazra

unread,
Aug 29, 2018, 11:44:36 AM8/29/18
to Django users
@jason,

I want to do on production but how .
could you elaborate me because i am new in python

Kasper Laudrup

unread,
Aug 29, 2018, 4:47:42 PM8/29/18
to django...@googlegroups.com
Hi Rupam,

On 29/08/2018 17.44, Rupam Hazra wrote:
> I want to do on production but how .
> could you elaborate me because i am new in python
>

You shouldn't be using the development server in production. That is
quite clearly stated in the documentation for good reasons.

You could set up a web server that forwards HTTPS requests to the Django
development server, but that would require pretty much the same amount
of work as doing it the proper way and set up your Django app as WSGI
application as explained here:

https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/

Please just follow that guide instead.

Kind regards,

Kasper Laudrup
Reply all
Reply to author
Forward
0 new messages