Commits

Anonymous committed aa767c9

Added bin dir

Comments (0)

Files changed (6)

template/bin/develop

+#!/usr/bin/env python
+import os, sys
+
+if __name__ == "__main__":
+    sys.path.append(os.path.dirname(os.path.dirname(__file__)))
+
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings.development")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)

template/bin/production

+#!/usr/bin/env python
+import os, sys
+
+if __name__ == "__main__":
+    sys.path.append(os.path.dirname(os.path.dirname(__file__)))
+
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings.production")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)

template/bin/runtests

+#!/usr/bin/env python
+import os, sys
+
+if __name__ == "__main__":
+    sys.path.append(os.path.dirname(os.path.dirname(__file__)))
+
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings.testing")
+
+    from django.core.management import call_command
+    from django.conf import settings
+
+    apps_for_testing = [app[16:] for app in settings.INSTALLED_APPS
+            if app.startswith("{{ project_name }}.apps")]
+
+    call_command("test", *apps_for_testing)

template/bin/staging

+#!/usr/bin/env python
+import os, sys
+
+if __name__ == "__main__":
+    sys.path.append(os.path.dirname(os.path.dirname(__file__)))
+
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings.staging")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)

template/project_name/settings/production.py

 from {{ project_name }}.settings.base import *
 
+DEBUG = False
+TEMPLATE_DEBUG = False
+
 INSTALLED_APPS += ('sentry,')
 
 DATABASES['default']['NAME'] = '{{ project_name }}_production'

template/project_name/urls.py

 admin.autodiscover()
 
 urlpatterns = patterns('',
-    url(r'^/', include('{{ project_name }}.apps.site.urls'), namespace='site'),
+    url(r'^', include('{{ project_name }}.apps.site.urls', namespace='site')),
     url(r'^admin/', include(admin.site.urls)),
 )