syntax error: export DJANGO_DEBUG=False

90 views
Skip to first unread message

fishbite

unread,
Oct 11, 2019, 9:51:42 AM10/11/19
to Django users
Hi there,

My first post to this group!

I've built the locallibrary project following the MDN tutorial and I'm now preparing to deploy the site on Heroku as described in the same tutorial and have added these lines to my settings.py file:

import os
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'cg#p$g+j9tax!#a3cup@1$8obt2_+&k3q+pmu)5%asj6yjpkag')

export DJANGO_DEBUG=False

I get:
SyntaxError: invalid syntax

Has anyone else encountered this problem and / or know why it is occuring or how to resolve the issue?

Thanks in advance for any help you can provide.

wd

unread,
Oct 12, 2019, 12:16:43 AM10/12/19
to django...@googlegroups.com
hi,

export DJANGO_DEBUG=False
This is a shell command, you shouldn't add this to your settings.py.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/django-users/779d99cf-2445-4dcf-9c37-e1f7d9ab7bf0%40googlegroups.com.

fishbite

unread,
Oct 12, 2019, 3:39:50 AM10/12/19
to Django users
Hi there,

Thank you for your answer, which is correct!

Much appreciated.

On Saturday, October 12, 2019 at 5:16:43 AM UTC+1, WD Wang wrote:
hi,

export DJANGO_DEBUG=False
This is a shell command, you shouldn't add this to your settings.py.

On Fri, Oct 11, 2019 at 9:51 PM fishbite <stuar...@gmail.com> wrote:
Hi there,

My first post to this group!

I've built the locallibrary project following the MDN tutorial and I'm now preparing to deploy the site on Heroku as described in the same tutorial and have added these lines to my settings.py file:

import os
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY', 'cg#p$g+j9tax!#a3cup@1$8obt2_+&k3q+pmu)5%asj6yjpkag')

export DJANGO_DEBUG=False

I get:
SyntaxError: invalid syntax

Has anyone else encountered this problem and / or know why it is occuring or how to resolve the issue?

Thanks in advance for any help you can provide.

--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages