Browse files

create __init__.py in config directory, remove print at install

  • Loading branch information...
1 parent 8722ee7 commit 35e08c0c25158a73f127ef2c4c467877f63d6146 @elijahr elijahr committed Oct 17, 2011
Showing with 7 additions and 3 deletions.
  1. +6 −1 django_host_settings/management/commands/createhostsettings.py
  2. +1 −2 setup.py
View
7 django_host_settings/management/commands/createhostsettings.py
@@ -12,11 +12,16 @@ def handle(self, *args, **options):
module_name = get_local_settings_module()
module_path = os.path.join(settings.PROJECT_ROOT, 'config',
'%s.py' % module_name)
+
if os.path.exists(module_path):
raise CommandError('%s already exists, nothing to do' % module_path)
+
try:
try:
- os.makedirs(os.path.dirname(module_path))
+ dirname = os.path.dirname(module_path)
+ os.makedirs(dirname)
+ with open(os.path.join(dirname, '__init__.py'), 'w') as f:
+ f.write('')
except:
pass
with open(module_path, 'w+b') as f:
View
3 setup.py
@@ -1,9 +1,8 @@
from setuptools import setup, find_packages
-print find_packages()
packages = find_packages()
setup(
- version = "0.1",
+ version = "0.2",
name = "django-host-settings",
packages = packages,
author = "Elijah Rutschman",

0 comments on commit 35e08c0

Please sign in to comment.