Server complete html Static App without apache server and without modifying html code

18 views
Skip to first unread message

archit mehta

unread,
Jul 23, 2018, 5:21:53 PM7/23/18
to Django users

Hi,

I have oraclejet frontend application and want to server that using django, I did it with flask but don't know how to do with django.

Here is complete description of my problem Please go through it and suggest some solution.

https://stackoverflow.com/questions/51484839/how-to-serve-complete-htmlapp-with-django-server-using-views-py




Regards,
Archit

mottaz hejaze

unread,
Jul 24, 2018, 12:20:15 AM7/24/18
to django...@googlegroups.com
i dont understand .. why you need backend anyway ?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/231f5a83-c3cf-4a3e-87c2-ecc378b08b97%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kasper Laudrup

unread,
Jul 24, 2018, 5:32:35 AM7/24/18
to django...@googlegroups.com
Hi Archit,
You could most likely achieve that by using the "staticfiles" app and
make that serve the files from the URL root in your urls.py file.

As others have pointed out though, the big question is, why on earth
would you want to do that?

Djangos builtin web server is not meant to be used for production as is
stated clearly in the documentation, so it should only be used for
development purposes and then I cannot see any reasons at all why you
want to make things more complicated by using Django if you're not gonna
use any of the features Django provides.

If you don't want to set up a web server, you can use the web server
from Pythons standard library:

https://docs.python.org/3/library/http.server.html

I have used that myself when I just needed to test out some basic
HTML/CSS/Javascript stuff and it worked just fine for that purpose.

Kind regards,

Kasper Laudrup
Reply all
Reply to author
Forward
0 new messages