In forum/views/readers.py, where does the variable settings (e.g. in settings.APP_TITLE on line 77) get its value? I see no import of settings anywhere in this file.

I realize this is a rather low-level Python code question, but it is relevant to my efforts to customize OSQA. Thanks in advance for any insight you can provide.

asked 02 Nov '10, 20:23

Kevin%20Yank's gravatar image

Kevin Yank
436111824
accept rate: 28%

edited 12 Jan '11, 23:10

rickross's gravatar image

rickross ♦♦
12.5k2914972

APP_TITLE is declared in 'forum/settings/basic.py' as a "Setting" object; I can't see how that relates to putting it into scope at the point you indicate either, but it must be relevant somehow.

(12 Jan '11, 23:07) john

It probably comes from some other import, like from somewhere import *. In this case probaly forum.forms. When you do an import like that in python you import everything in that namespace, including stuff imported from other places, unless the imported file writes the __all__ builtin list directly.

link

answered 02 Nov '10, 20:29

Hernani%20Cerqueira's gravatar image

Hernani Cerq... ♦♦
16.8k65975
accept rate: 52%

To be clear, then, the correct way to access OSQA’s settings module is to from forum import settings, right?

(03 Nov '10, 00:05) Kevin Yank
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×30
×25
×11

Asked: 02 Nov '10, 20:23

Seen: 555 times

Last updated: 12 Jan '11, 23:11

powered by OSQA