This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # init django | |
| import os | |
| import sys | |
| sys.path.append(os.path.join(os.path.dirname(__file__), 'apps')) | |
| is_production = os.path.isfile('.production') | |
| if is_production: | |
| os.environ.setdefault("DJANGO_SETTINGS_MODULE", "conf.settings.production") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://stackoverflow.com/questions/1596552/django-urls-without-a-trailing-slash-do-not-redirect | |
| # https://stackoverflow.com/questions/35964409/django-url-without-trailing-slash-not-working | |
| # https://www.reddit.com/r/django/comments/5nlsv6/urls_without_a_trailing_slash_working_incorrectly/ | |
| ''' | |
| This problem is /<slug> dependent. | |
| You should update your urls to fix it, check example below. | |
| ''' | |