First time here? Check out the FAQ!
0

RECAPTCHA_USE_SSL = True in settings.py?
 

Hi,

I just reinstalled Askbot as a stand-alone app and after completing askbot-setup, I tried to start the django server to test the installation. While doing so, I encountered the following error:

Traceback (most recent call last):
  File "manage.py", line 4, in <module>
    import settings # Assumed to be in the same directory.
  File "/Users/hannes/Development/test_code/askbot2/settings.py", line 237
    RECAPTCHA_USE_SSL = True
                    ^
SyntaxError: invalid syntax

I can't really see where the problem with the line 237 (and the lines in the settings.py above) is. It seems that due to the syntax error, manage.py can't load the settings.py and breaks. Is that correct?

Thank you for your answers.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
asked 12 years ago
This post is a wiki. Anyone with karma >100 is welcome to improve it.

Comments

The problem must be above that line.

Evgeny's avatar Evgeny (12 years ago)

hm, i checked the lines above 237 before posting but could not find a syntax error. Strange also that it happens with the untouched code right after git clone. I also checked and added the path to the PYTHON PATH, but no change.

neurix's avatar neurix (12 years ago)

Hmm, what is the version of python you are using?

Evgeny's avatar Evgeny (12 years ago)
see more comments

1 Answer

1

There seems to be a typo in the seetins.py file of the development branch. Evgeny was right, the code above wasn't correct.

The correct line 233 and below should be: STATICFILES_DIRS = ( ('default/media', os.path.join(ASKBOT_ROOT, 'media'),) )

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
answered 12 years ago
This post is a wiki. Anyone with karma >100 is welcome to improve it.
link

Comments

Thank you! Fixed in the repository.

Evgeny's avatar Evgeny (12 years ago)
see more comments