MDN Locallibrary project - syntax error on 'export DJANGO_DEBUG=False'

18 views
Skip to first unread message

fishbite

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

I've been working on the MDN Locallibrary project and am just preparing to publish the website on Heroku.

I seem to be stumbling at the first hurdle though and hope someone can help.

The problem is a syntax error pointing to the following line of code in my settings.py file:

export DJANGO_DEBUG=False

the following lines precede this with no errors:

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

DEBUG = os.environ.get('DJANGO_DEBUG', '') != 'False'

could someone please tell me why this is happening and how to fix it. The lines have been copied and pasted from the tutorial into the file, so I'm pretty sure there isn't a typo.

Thanks in advance.

John Martin

unread,
Oct 11, 2019, 5:22:40 PM10/11/19
to django...@googlegroups.com

Try retyping the lines from scratch. You may have picked up a unicode version of single quote, or similar substitution, through copy/pasting.

John

--
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/d3b25700-4b4c-4c4f-b468-6f2d344e6951%40googlegroups.com.

Daniel Hepper

unread,
Oct 11, 2019, 5:39:18 PM10/11/19
to django...@googlegroups.com
The export statement does not belong in your settings file, you are supposed to type it into your shell, like you do with “python manage.py ...” commands

Am 11.10.2019 um 15:51 schrieb fishbite <stuar...@gmail.com>:


--

fishbite

unread,
Oct 12, 2019, 3:35:52 AM10/12/19
to Django users
Thank you Daniel, that's a great help. I sat looking at the tutorial thinking to myself that it didn't explicitly say that line should be put into the settings file, but on the other hand, it didn't say that it shohuld be entered at the prompt either!

Thanks again, it is much appreciated.

On Friday, October 11, 2019 at 10:39:18 PM UTC+1, Daniel Hepper wrote:
The export statement does not belong in your settings file, you are supposed to type it into your shell, like you do with “python manage.py ...” commands

Am 11.10.2019 um 15:51 schrieb fishbite <stuar...@gmail.com>:


Hi there,

I've been working on the MDN Locallibrary project and am just preparing to publish the website on Heroku.

I seem to be stumbling at the first hurdle though and hope someone can help.

The problem is a syntax error pointing to the following line of code in my settings.py file:

export DJANGO_DEBUG=False

the following lines precede this with no errors:

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

DEBUG = os.environ.get('DJANGO_DEBUG', '') != 'False'

could someone please tell me why this is happening and how to fix it. The lines have been copied and pasted from the tutorial into the file, so I'm pretty sure there isn't a typo.

Thanks in advance.

--
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