1

I am a newbee to Django, I keep seeing in some posts Run Django app under a subdirectory. What does it mean? Is it like you are running a django project with various django apps in various folders? Or else is it like a new django project inside a django project, so that you can have a subdomain?

The posts I came across are http://askbot.org/en/question/2904/how-to-run-askbot-under-a-subdirectory/ Run Django with URL prefix ("subdirectory") - App works, but URLs broken? Running a django project in a subdirectory of a site already running Drupal

Community
  • 1
  • 1

1 Answers1

1

I understand this: imagine you have a website which runs in PHP/JAVA/whatever at the address http://www.example.net

The meaning of "run Django in a subdirectory" is to have access to your Django project through http://www.example.net/myDjangoWebsite without altering http://www.example.net. In that case "myDjangoWebsite/" will prefix every URL of your django project.

Maxime Lorant
  • 34,607
  • 19
  • 87
  • 97
  • Can we run a separate django projects from a subdirectory of existing django project? I think hosting and integrating users of child and parent websites might be major issues. Are there any I should be thinking off? – user2654932 Aug 06 '13 at 19:41
  • Yes you can. You just have to tuning your web server (apache, nginx...) to redirect request to the right Django WSGI application. – Maxime Lorant Aug 06 '13 at 19:45
  • How about user authentication? Can a user authenticated by parent website can access the child website? – user2654932 Aug 06 '13 at 19:48
  • Each Django Application instance would have separation sessions, so unless you make a system (through a middleware for example) to connect projects between them, there will no sessions sharing between them. – Maxime Lorant Aug 06 '13 at 19:49