Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7655229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:27:33+00:00 2026-05-31T12:27:33+00:00

Coming from a Django background, I’m accustomed to the framework providing a configuration mechanism

  • 0

Coming from a Django background, I’m accustomed to the framework providing a configuration mechanism which is suitable (and intended) for app-layer configuration rather than framework configuration only.

The TurboGears 2.x template includes a <app_module>.config.app_cfg module, which can be overridden by deployment ini files; however, this is explicitly documented as being for “TG2-specific” settings, and I don’t see any kind of naming convention or namespace mechanism documented which would prevent a configuration entry I come up with for my app from colliding with new settings added to other framework components in the future.

Does TurboGears 2.x provide, or does the set of accepted best practices for TG2 developers (Paste, etc) include, any mechanism for managing configuration for applications built on TG2, not specific to TG2 itself? If reusing the TG2 configuration mechanism is conventional, is there any accepted practice for configuration namespace management?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T12:27:35+00:00Added an answer on May 31, 2026 at 12:27 pm

    The config in TurboGears2 supports complex structures, for example you can declare the options for your application inside myapp.option1 myapp.option2 and so on. They will be accessible inside your application both as tg.config['myapp.option1'] and tg.config.myapp.option1.

    This way you will avoid collisions.

    Options can be set both in your development.iniand config.app_cfg.

    For example, if you put inside your app_cfg

    base_config['myapp.option1'] = 'FOOBAR'
    

    the FOOBAR string will be accessible from tg.config.myapp.option1

    Pay attention that base_config object overwrites options loaded from the .ini configuration file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Coming from a jsp and servlet background I am interested to know how django
Coming from a background in Django, I often use template inheritance, where multiple templates
I'm new to Rails, and I'm coming to it from a Django background. I've
I am coming from the django world to maintain a fairly complicated classic asp
I'm new to Yii (coming from the world of Django, Rails, etc) and wondering
My current project is in Rails. Coming from a Symfony (PHP) and Django (Python)
Coming from a Classic ASP background, I'm used to multiple forms on a page,
Coming from a background, I'm familiar with GUI editors that do a poor job
Coming from a C# background the naming convention for variables and methods are usually
Coming from a desktop background I'm not sure exactly how to pass the exceptions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.