summaryrefslogtreecommitdiff
path: root/testproject
diff options
context:
space:
mode:
authorRocky Meza <rocky@fusionbox.com>2014-02-01 18:22:17 -0700
committerRocky Meza <rocky@fusionbox.com>2014-02-01 19:05:04 -0700
commit2a53a7abd1ddba02c44b81a24305b03532b45fee (patch)
tree6b009211aa1eb8355464dcf0e765b076207fa778 /testproject
downloaddjango-pyscss-2a53a7abd1ddba02c44b81a24305b03532b45fee.tar.gz
django-pyscss - use PySCSS in Django more easily
Diffstat (limited to 'testproject')
-rw-r--r--testproject/__init__.py0
-rw-r--r--testproject/runtests.py15
-rw-r--r--testproject/testapp1/__init__.py0
-rw-r--r--testproject/testapp1/admin.py3
-rw-r--r--testproject/testapp1/models.py3
-rw-r--r--testproject/testapp1/static/css/app1.scss3
-rw-r--r--testproject/testapp1/tests.py3
-rw-r--r--testproject/testapp1/views.py3
-rw-r--r--testproject/testapp2/__init__.py0
-rw-r--r--testproject/testapp2/admin.py3
-rw-r--r--testproject/testapp2/models.py3
-rw-r--r--testproject/testapp2/static/css/app2.scss2
-rw-r--r--testproject/testapp2/tests.py3
-rw-r--r--testproject/testapp2/views.py3
-rw-r--r--testproject/testproject/__init__.py0
-rw-r--r--testproject/testproject/settings.py90
-rw-r--r--testproject/testproject/static/css/foo.scss3
-rw-r--r--testproject/testproject/urls.py12
-rw-r--r--testproject/testproject/wsgi.py14
19 files changed, 163 insertions, 0 deletions
diff --git a/testproject/__init__.py b/testproject/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testproject/__init__.py
diff --git a/testproject/runtests.py b/testproject/runtests.py
new file mode 100644
index 0000000..394f24a
--- /dev/null
+++ b/testproject/runtests.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+import os
+import sys
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings")
+
+from django.test.utils import get_runner
+from django.conf import settings
+
+
+def runtests():
+ # Stolen from django/core/management/commands/test.py
+ TestRunner = get_runner(settings)
+ test_runner = TestRunner(verbosity=1, interactive=True)
+ failures = test_runner.run_tests(['tests'])
+ sys.exit(bool(failures))
diff --git a/testproject/testapp1/__init__.py b/testproject/testapp1/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testproject/testapp1/__init__.py
diff --git a/testproject/testapp1/admin.py b/testproject/testapp1/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/testproject/testapp1/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/testproject/testapp1/models.py b/testproject/testapp1/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/testproject/testapp1/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/testproject/testapp1/static/css/app1.scss b/testproject/testapp1/static/css/app1.scss
new file mode 100644
index 0000000..bbc87de
--- /dev/null
+++ b/testproject/testapp1/static/css/app1.scss
@@ -0,0 +1,3 @@
+.app1 {
+ color: #ff9900;
+}
diff --git a/testproject/testapp1/tests.py b/testproject/testapp1/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/testproject/testapp1/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/testproject/testapp1/views.py b/testproject/testapp1/views.py
new file mode 100644
index 0000000..91ea44a
--- /dev/null
+++ b/testproject/testapp1/views.py
@@ -0,0 +1,3 @@
+from django.shortcuts import render
+
+# Create your views here.
diff --git a/testproject/testapp2/__init__.py b/testproject/testapp2/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testproject/testapp2/__init__.py
diff --git a/testproject/testapp2/admin.py b/testproject/testapp2/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/testproject/testapp2/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/testproject/testapp2/models.py b/testproject/testapp2/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/testproject/testapp2/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/testproject/testapp2/static/css/app2.scss b/testproject/testapp2/static/css/app2.scss
new file mode 100644
index 0000000..d19b910
--- /dev/null
+++ b/testproject/testapp2/static/css/app2.scss
@@ -0,0 +1,2 @@
+@import "css/foo.scss";
+@import "css/app1.scss";
diff --git a/testproject/testapp2/tests.py b/testproject/testapp2/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/testproject/testapp2/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/testproject/testapp2/views.py b/testproject/testapp2/views.py
new file mode 100644
index 0000000..91ea44a
--- /dev/null
+++ b/testproject/testapp2/views.py
@@ -0,0 +1,3 @@
+from django.shortcuts import render
+
+# Create your views here.
diff --git a/testproject/testproject/__init__.py b/testproject/testproject/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testproject/testproject/__init__.py
diff --git a/testproject/testproject/settings.py b/testproject/testproject/settings.py
new file mode 100644
index 0000000..6983250
--- /dev/null
+++ b/testproject/testproject/settings.py
@@ -0,0 +1,90 @@
+"""
+Django settings for testproject project.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.6/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/1.6/ref/settings/
+"""
+
+# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+import os
+BASE_DIR = os.path.dirname(os.path.dirname(__file__))
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/1.6/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'testproject'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+TEMPLATE_DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = (
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+
+ 'testproject.testapp1',
+ 'testproject.testapp2',
+)
+
+MIDDLEWARE_CLASSES = (
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+)
+
+ROOT_URLCONF = 'testproject.urls'
+
+WSGI_APPLICATION = 'testproject.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/1.6/ref/settings/#databases
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
+ }
+}
+
+# Internationalization
+# https://docs.djangoproject.com/en/1.6/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_L10N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/1.6/howto/static-files/
+
+STATIC_URL = '/static/'
+STATIC_ROOT = os.path.join(BASE_DIR, '..', 'tmp', 'static')
+
+STATICFILES_DIRS = (
+ os.path.join(BASE_DIR, 'testproject', 'static'),
+)
diff --git a/testproject/testproject/static/css/foo.scss b/testproject/testproject/static/css/foo.scss
new file mode 100644
index 0000000..97ff765
--- /dev/null
+++ b/testproject/testproject/static/css/foo.scss
@@ -0,0 +1,3 @@
+.foo {
+ color: #ff0000;
+}
diff --git a/testproject/testproject/urls.py b/testproject/testproject/urls.py
new file mode 100644
index 0000000..de3a3a9
--- /dev/null
+++ b/testproject/testproject/urls.py
@@ -0,0 +1,12 @@
+from django.conf.urls import patterns, include, url
+
+from django.contrib import admin
+admin.autodiscover()
+
+urlpatterns = patterns('',
+ # Examples:
+ # url(r'^$', 'testproject.views.home', name='home'),
+ # url(r'^blog/', include('blog.urls')),
+
+ url(r'^admin/', include(admin.site.urls)),
+)
diff --git a/testproject/testproject/wsgi.py b/testproject/testproject/wsgi.py
new file mode 100644
index 0000000..c6a4e4e
--- /dev/null
+++ b/testproject/testproject/wsgi.py
@@ -0,0 +1,14 @@
+"""
+WSGI config for testproject project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
+"""
+
+import os
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.settings")
+
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()