| | 1 | = Reducing Redundant Code in s3cfg.py and 000_config = |
| | 2 | |
| | 3 | There has to be a file that will run before s3cfg or even 000_config . |
| | 4 | So it can be used in init only if |
| | 5 | there is no 000_config in the models(i.e for the first time) |
| | 6 | |
| | 7 | == Initialy in s3cfg2.py == |
| | 8 | |
| | 9 | {{{ |
| | 10 | #!python |
| | 11 | class S3Config(Storage): |
| | 12 | |
| | 13 | """ |
| | 14 | Deployment Settings Helper Class |
| | 15 | |
| | 16 | """ |
| | 17 | |
| | 18 | def __init__(self, T): |
| | 19 | self.auth = Storage() |
| | 20 | self.base = Storage() |
| | 21 | self.database = Storage() |
| | 22 | self.gis = Storage() |
| | 23 | self.mail = Storage() |
| | 24 | self.twitter = Storage() |
| | 25 | self.L10n = Storage() |
| | 26 | self.osm = Storage() |
| | 27 | self.security = Storage() |
| | 28 | self.ui = Storage() |
| | 29 | self.T = T |
| | 30 | |
| | 31 | }}} |
| | 32 | |
| | 33 | == s3cfg1.py == |