summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--conf/dev_settings.py13
-rw-r--r--requirements.txt3
-rw-r--r--sublab_project/__init__.py0
-rwxr-xr-xsublab_project/manage.py14
-rw-r--r--sublab_project/news/__init__.py0
-rw-r--r--sublab_project/news/admin.py15
-rw-r--r--sublab_project/news/migrations/0001_initial.py106
-rw-r--r--sublab_project/news/migrations/__init__.py0
-rw-r--r--sublab_project/news/models.py29
-rw-r--r--sublab_project/news/tests.py16
-rw-r--r--sublab_project/news/views.py1
-rw-r--r--sublab_project/projects/__init__.py0
-rw-r--r--sublab_project/projects/admin.py11
-rw-r--r--sublab_project/projects/migrations/0001_initial.py85
-rw-r--r--sublab_project/projects/migrations/__init__.py0
-rw-r--r--sublab_project/projects/models.py27
-rw-r--r--sublab_project/projects/tests.py16
-rw-r--r--sublab_project/projects/views.py1
-rw-r--r--sublab_project/settings.py156
-rw-r--r--sublab_project/templates/404.html0
-rw-r--r--sublab_project/templates/500.html0
-rw-r--r--sublab_project/templates/base.html0
-rw-r--r--sublab_project/urls.py17
24 files changed, 512 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..903440c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.db
+sublab_project/local_settings.py
diff --git a/conf/dev_settings.py b/conf/dev_settings.py
new file mode 100644
index 0000000..b61a979
--- /dev/null
+++ b/conf/dev_settings.py
@@ -0,0 +1,13 @@
+import os
+
+from settings import SITE_ROOT
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': os.path.join(SITE_ROOT, 'sublab.db'),
+ }
+}
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..b7a8960
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,3 @@
+Django==1.3.1
+South==0.7.3
+gunicorn==0.13.4
diff --git a/sublab_project/__init__.py b/sublab_project/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sublab_project/__init__.py
diff --git a/sublab_project/manage.py b/sublab_project/manage.py
new file mode 100755
index 0000000..3e4eedc
--- /dev/null
+++ b/sublab_project/manage.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+from django.core.management import execute_manager
+import imp
+try:
+ imp.find_module('settings') # Assumed to be in the same directory.
+except ImportError:
+ import sys
+ sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__)
+ sys.exit(1)
+
+import settings
+
+if __name__ == "__main__":
+ execute_manager(settings)
diff --git a/sublab_project/news/__init__.py b/sublab_project/news/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sublab_project/news/__init__.py
diff --git a/sublab_project/news/admin.py b/sublab_project/news/admin.py
new file mode 100644
index 0000000..ffead60
--- /dev/null
+++ b/sublab_project/news/admin.py
@@ -0,0 +1,15 @@
+from django.contrib import admin
+
+from news.models import News
+
+
+class NewsAdmin(admin.ModelAdmin):
+ prepopulated_fields = {'slug': ('title',)}
+ list_display = ('title', 'date_created', 'date_updated')
+
+ def save_model(self, request, obj, form, change):
+ if not obj.id:
+ obj.author = request.user
+ obj.save()
+
+admin.site.register(News, NewsAdmin)
diff --git a/sublab_project/news/migrations/0001_initial.py b/sublab_project/news/migrations/0001_initial.py
new file mode 100644
index 0000000..1d93edd
--- /dev/null
+++ b/sublab_project/news/migrations/0001_initial.py
@@ -0,0 +1,106 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding model 'News'
+ db.create_table('news_news', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('title', self.gf('django.db.models.fields.CharField')(max_length=255)),
+ ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50, db_index=True)),
+ ('content', self.gf('django.db.models.fields.TextField')()),
+ ('content_html', self.gf('django.db.models.fields.TextField')()),
+ ('author', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
+ ('date_created', self.gf('django.db.models.fields.DateTimeField')()),
+ ('date_updated', self.gf('django.db.models.fields.DateTimeField')()),
+ ))
+ db.send_create_signal('news', ['News'])
+
+ # Adding M2M table for field projects on 'News'
+ db.create_table('news_news_projects', (
+ ('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True)),
+ ('news', models.ForeignKey(orm['news.news'], null=False)),
+ ('project', models.ForeignKey(orm['projects.project'], null=False))
+ ))
+ db.create_unique('news_news_projects', ['news_id', 'project_id'])
+
+
+ def backwards(self, orm):
+
+ # Deleting model 'News'
+ db.delete_table('news_news')
+
+ # Removing M2M table for field projects on 'News'
+ db.delete_table('news_news_projects')
+
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'news.news': {
+ 'Meta': {'object_name': 'News'},
+ 'author': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
+ 'content': ('django.db.models.fields.TextField', [], {}),
+ 'content_html': ('django.db.models.fields.TextField', [], {}),
+ 'date_created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'date_updated': ('django.db.models.fields.DateTimeField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'projects': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'related_name': "'news'", 'blank': 'True', 'to': "orm['projects.Project']"}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '255'})
+ },
+ 'projects.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'contact_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'contact_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
+ 'date_created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'date_updated': ('django.db.models.fields.DateTimeField', [], {}),
+ 'description': ('django.db.models.fields.TextField', [], {}),
+ 'description_html': ('django.db.models.fields.TextField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
+ }
+ }
+
+ complete_apps = ['news']
diff --git a/sublab_project/news/migrations/__init__.py b/sublab_project/news/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sublab_project/news/migrations/__init__.py
diff --git a/sublab_project/news/models.py b/sublab_project/news/models.py
new file mode 100644
index 0000000..c0b54f7
--- /dev/null
+++ b/sublab_project/news/models.py
@@ -0,0 +1,29 @@
+import datetime
+
+from django.contrib.auth.models import User
+from django.db import models
+
+from projects.models import Project
+
+
+class News(models.Model):
+ """A news item.
+ """
+ title = models.CharField(max_length=255)
+ slug = models.SlugField(unique=True)
+ content = models.TextField()
+ content_html = models.TextField(editable=False)
+ projects = models.ManyToManyField(Project, blank=True,
+ related_name='news')
+ author = models.ForeignKey(User, editable=False)
+ date_created = models.DateTimeField(editable=False)
+ date_updated = models.DateTimeField(editable=False)
+
+ def __unicode__(self):
+ return self.title
+
+ def save(self, *args, **kwargs):
+ if not self.id:
+ self.date_created = datetime.datetime.now()
+ self.date_updated = datetime.datetime.now()
+ super(News, self).save(*args, **kwargs)
diff --git a/sublab_project/news/tests.py b/sublab_project/news/tests.py
new file mode 100644
index 0000000..501deb7
--- /dev/null
+++ b/sublab_project/news/tests.py
@@ -0,0 +1,16 @@
+"""
+This file demonstrates writing tests using the unittest module. These will pass
+when you run "manage.py test".
+
+Replace this with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.assertEqual(1 + 1, 2)
diff --git a/sublab_project/news/views.py b/sublab_project/news/views.py
new file mode 100644
index 0000000..60f00ef
--- /dev/null
+++ b/sublab_project/news/views.py
@@ -0,0 +1 @@
+# Create your views here.
diff --git a/sublab_project/projects/__init__.py b/sublab_project/projects/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sublab_project/projects/__init__.py
diff --git a/sublab_project/projects/admin.py b/sublab_project/projects/admin.py
new file mode 100644
index 0000000..74fd29a
--- /dev/null
+++ b/sublab_project/projects/admin.py
@@ -0,0 +1,11 @@
+from django.contrib import admin
+
+from projects.models import Project
+
+
+class ProjectAdmin(admin.ModelAdmin):
+ prepopulated_fields = {'slug': ('name',)}
+ list_display = ('name', 'date_created', 'date_updated')
+
+
+admin.site.register(Project, ProjectAdmin)
diff --git a/sublab_project/projects/migrations/0001_initial.py b/sublab_project/projects/migrations/0001_initial.py
new file mode 100644
index 0000000..749a5f0
--- /dev/null
+++ b/sublab_project/projects/migrations/0001_initial.py
@@ -0,0 +1,85 @@
+# encoding: utf-8
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+
+ # Adding model 'Project'
+ db.create_table('projects_project', (
+ ('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
+ ('name', self.gf('django.db.models.fields.CharField')(max_length=100)),
+ ('slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50, db_index=True)),
+ ('description', self.gf('django.db.models.fields.TextField')()),
+ ('description_html', self.gf('django.db.models.fields.TextField')()),
+ ('contact_email', self.gf('django.db.models.fields.EmailField')(max_length=75, blank=True)),
+ ('contact_url', self.gf('django.db.models.fields.URLField')(max_length=200, blank=True)),
+ ('contact_user', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['auth.User'])),
+ ('date_created', self.gf('django.db.models.fields.DateTimeField')()),
+ ('date_updated', self.gf('django.db.models.fields.DateTimeField')()),
+ ))
+ db.send_create_signal('projects', ['Project'])
+
+
+ def backwards(self, orm):
+
+ # Deleting model 'Project'
+ db.delete_table('projects_project')
+
+
+ models = {
+ 'auth.group': {
+ 'Meta': {'object_name': 'Group'},
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
+ 'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
+ },
+ 'auth.permission': {
+ 'Meta': {'ordering': "('content_type__app_label', 'content_type__model', 'codename')", 'unique_together': "(('content_type', 'codename'),)", 'object_name': 'Permission'},
+ 'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['contenttypes.ContentType']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
+ },
+ 'auth.user': {
+ 'Meta': {'object_name': 'User'},
+ 'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
+ 'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
+ 'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
+ 'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
+ 'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
+ 'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
+ },
+ 'contenttypes.contenttype': {
+ 'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
+ 'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
+ },
+ 'projects.project': {
+ 'Meta': {'object_name': 'Project'},
+ 'contact_email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
+ 'contact_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'blank': 'True'}),
+ 'contact_user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['auth.User']"}),
+ 'date_created': ('django.db.models.fields.DateTimeField', [], {}),
+ 'date_updated': ('django.db.models.fields.DateTimeField', [], {}),
+ 'description': ('django.db.models.fields.TextField', [], {}),
+ 'description_html': ('django.db.models.fields.TextField', [], {}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '50', 'db_index': 'True'})
+ }
+ }
+
+ complete_apps = ['projects']
diff --git a/sublab_project/projects/migrations/__init__.py b/sublab_project/projects/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sublab_project/projects/migrations/__init__.py
diff --git a/sublab_project/projects/models.py b/sublab_project/projects/models.py
new file mode 100644
index 0000000..f164956
--- /dev/null
+++ b/sublab_project/projects/models.py
@@ -0,0 +1,27 @@
+import datetime
+
+from django.contrib.auth.models import User
+from django.db import models
+
+
+class Project(models.Model):
+ """A project.
+ """
+ name = models.CharField(max_length=100)
+ slug = models.SlugField(unique=True)
+ description = models.TextField()
+ description_html = models.TextField(editable=False)
+ contact_email = models.EmailField(blank=True)
+ contact_url = models.URLField(blank=True)
+ contact_user = models.ForeignKey(User)
+ date_created = models.DateTimeField(editable=False)
+ date_updated = models.DateTimeField(editable=False)
+
+ def __unicode__(self):
+ return self.name
+
+ def save(self, *args, **kwargs):
+ if not self.id:
+ self.date_created = datetime.datetime.now()
+ self.date_updated = datetime.datetime.now()
+ return super(Project, self).save(*args, **kwargs)
diff --git a/sublab_project/projects/tests.py b/sublab_project/projects/tests.py
new file mode 100644
index 0000000..501deb7
--- /dev/null
+++ b/sublab_project/projects/tests.py
@@ -0,0 +1,16 @@
+"""
+This file demonstrates writing tests using the unittest module. These will pass
+when you run "manage.py test".
+
+Replace this with more appropriate tests for your application.
+"""
+
+from django.test import TestCase
+
+
+class SimpleTest(TestCase):
+ def test_basic_addition(self):
+ """
+ Tests that 1 + 1 always equals 2.
+ """
+ self.assertEqual(1 + 1, 2)
diff --git a/sublab_project/projects/views.py b/sublab_project/projects/views.py
new file mode 100644
index 0000000..60f00ef
--- /dev/null
+++ b/sublab_project/projects/views.py
@@ -0,0 +1 @@
+# Create your views here.
diff --git a/sublab_project/settings.py b/sublab_project/settings.py
new file mode 100644
index 0000000..a8c5585
--- /dev/null
+++ b/sublab_project/settings.py
@@ -0,0 +1,156 @@
+# Django settings for sublab_project project.
+import os
+
+SITE_ROOT = os.path.realpath(os.path.dirname(__file__))
+DEBUG = False
+TEMPLATE_DEBUG = DEBUG
+
+ADMINS = (
+ # ('Your Name', 'your_email@example.com'),
+)
+
+MANAGERS = ADMINS
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
+ 'NAME': '', # Or path to database file if using sqlite3.
+ 'USER': '', # Not used with sqlite3.
+ 'PASSWORD': '', # Not used with sqlite3.
+ 'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
+ 'PORT': '', # Set to empty string for default. Not used with sqlite3.
+ }
+}
+
+# Local time zone for this installation. Choices can be found here:
+# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
+# although not all choices may be available on all operating systems.
+# On Unix systems, a value of None will cause Django to use the same
+# timezone as the operating system.
+# If running in a Windows environment this must be set to the same as your
+# system time zone.
+TIME_ZONE = 'Europe/Berlin'
+
+# Language code for this installation. All choices can be found here:
+# http://www.i18nguy.com/unicode/language-identifiers.html
+LANGUAGE_CODE = 'de'
+
+SITE_ID = 1
+
+# If you set this to False, Django will make some optimizations so as not
+# to load the internationalization machinery.
+USE_I18N = True
+
+# If you set this to False, Django will not format dates, numbers and
+# calendars according to the current locale
+USE_L10N = True
+
+# Absolute filesystem path to the directory that will hold user-uploaded files.
+# Example: "/home/media/media.lawrence.com/media/"
+MEDIA_ROOT = ''
+
+# URL that handles the media served from MEDIA_ROOT. Make sure to use a
+# trailing slash.
+# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
+MEDIA_URL = ''
+
+# Absolute path to the directory static files should be collected to.
+# Don't put anything in this directory yourself; store your static files
+# in apps' "static/" subdirectories and in STATICFILES_DIRS.
+# Example: "/home/media/media.lawrence.com/static/"
+STATIC_ROOT = ''
+
+# URL prefix for static files.
+# Example: "http://media.lawrence.com/static/"
+STATIC_URL = '/static/'
+
+# URL prefix for admin static files -- CSS, JavaScript and images.
+# Make sure to use a trailing slash.
+# Examples: "http://foo.com/static/admin/", "/static/admin/".
+ADMIN_MEDIA_PREFIX = '/static/admin/'
+
+# Additional locations of static files
+STATICFILES_DIRS = (
+ # Put strings here, like "/home/html/static" or "C:/www/django/static".
+ # Always use forward slashes, even on Windows.
+ # Don't forget to use absolute paths, not relative paths.
+)
+
+# List of finder classes that know how to find static files in
+# various locations.
+STATICFILES_FINDERS = (
+ 'django.contrib.staticfiles.finders.FileSystemFinder',
+ 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
+)
+
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = 't7#^)rd)o^v-7-x17!w=v+rz!tk5hdr8(!w+x0-k_m-oxf=dpb'
+
+# List of callables that know how to import templates from various sources.
+TEMPLATE_LOADERS = (
+ 'django.template.loaders.filesystem.Loader',
+ 'django.template.loaders.app_directories.Loader',
+# 'django.template.loaders.eggs.Loader',
+)
+
+MIDDLEWARE_CLASSES = (
+ 'django.middleware.common.CommonMiddleware',
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+)
+
+ROOT_URLCONF = 'sublab_project.urls'
+
+TEMPLATE_DIRS = (
+ # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
+ # Always use forward slashes, even on Windows.
+ # Don't forget to use absolute paths, not relative paths.
+ os.path.join(SITE_ROOT, 'templates'),
+)
+
+INSTALLED_APPS = (
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ # Uncomment the next line to enable the admin:
+ 'django.contrib.admin',
+ # Uncomment the next line to enable admin documentation:
+ # 'django.contrib.admindocs',
+ 'south',
+ 'news',
+ 'projects',
+)
+
+# A sample logging configuration. The only tangible logging
+# performed by this configuration is to send an email to
+# the site admins on every HTTP 500 error.
+# See http://docs.djangoproject.com/en/dev/topics/logging for
+# more details on how to customize your logging configuration.
+LOGGING = {
+ 'version': 1,
+ 'disable_existing_loggers': False,
+ 'handlers': {
+ 'mail_admins': {
+ 'level': 'ERROR',
+ 'class': 'django.utils.log.AdminEmailHandler'
+ }
+ },
+ 'loggers': {
+ 'django.request': {
+ 'handlers': ['mail_admins'],
+ 'level': 'ERROR',
+ 'propagate': True,
+ },
+ }
+}
+
+try:
+ from local_settings import *
+except ImportError:
+ pass
diff --git a/sublab_project/templates/404.html b/sublab_project/templates/404.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sublab_project/templates/404.html
diff --git a/sublab_project/templates/500.html b/sublab_project/templates/500.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sublab_project/templates/500.html
diff --git a/sublab_project/templates/base.html b/sublab_project/templates/base.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sublab_project/templates/base.html
diff --git a/sublab_project/urls.py b/sublab_project/urls.py
new file mode 100644
index 0000000..c35dcb6
--- /dev/null
+++ b/sublab_project/urls.py
@@ -0,0 +1,17 @@
+from django.conf.urls.defaults import patterns, include, url
+
+# Uncomment the next two lines to enable the admin:
+from django.contrib import admin
+admin.autodiscover()
+
+urlpatterns = patterns('',
+ # Examples:
+ # url(r'^$', 'sublab_project.views.home', name='home'),
+ # url(r'^sublab_project/', include('sublab_project.foo.urls')),
+
+ # Uncomment the admin/doc line below to enable admin documentation:
+ # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
+
+ # Uncomment the next line to enable the admin:
+ url(r'^admin/', include(admin.site.urls)),
+)