Run Django with URL prefix (“subdirectory”) - App works, but URLs broken?

后端 未结 2 941
后悔当初
后悔当初 2020-12-16 02:03

Below are the relevant configuration files, also at http://dpaste.com/97213/ .

The apache config is currently working, because accessing \'example.com/\' shows me th

2条回答
  •  不思量自难忘°
    2020-12-16 02:19

    This is a possible duplicate of Django Apache Redirect Problem, as that answer solved this problem.

    I only eventually stumbled on that answer by opening almost all of the 'related questions' here, just out of desperation. From my perspective, I think my question has some valuable "search friendly" words.

    EDIT: The answer: (via alex vasi)

    Things to try:

    1. Change current domain to "yourdomain.tld/cflow" in the "sites" framework. It's easy to do using django admin or dumpdata/loaddata manage.py commands.
    2. Looks like your site is using login_required decorator. In that particular case you can add to settings.py:

      LOGIN_URL = '/[prefix]/accounts/login/'

提交回复
热议问题