comparison frontend/mfrontend/utils.py @ 1:c3fb1e9fc1f7

(none)
author michalr
date Tue, 22 Feb 2011 18:10:18 +0000
parents
children e0061735c327
comparison
equal deleted inserted replaced
0:ebb283da07f7 1:c3fb1e9fc1f7
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 import random
5
6 def default_ini():
7 """Funkcja tworząca domyślny plik .ini z ustawieniami aplikacji"""
8 config = ConfigParser.SafeConfigParser()
9 config.add_section('Basic')
10 config.set('Basic', 'Database', '../baza.sqlite')
11 config.set('Basic', 'Debug', '0')
12 config.set('Basic', 'Secret_Key',
13 ''.join(random.choice(string.ascii_letters for x in range(10))))
14 with open('config.ini', 'wb') as configfile:
15 config.write(configfile)
16