Initial skeleton commit.
authorEevee <git@veekun.com>
Tue, 4 May 2010 05:20:23 +0000 (22:20 -0700)
committerEevee <git@veekun.com>
Tue, 4 May 2010 05:20:23 +0000 (22:20 -0700)
14 files changed:
.gitignore [new file with mode: 0644]
migration/README [new file with mode: 0644]
migration/__init__.py [new file with mode: 0755]
migration/manage.py [new file with mode: 0644]
migration/migrate.cfg [new file with mode: 0644]
migration/versions/__init__.py [new file with mode: 0755]
setup.py [new file with mode: 0644]
spline/__init__.py [new file with mode: 0644]
spline/plugins/__init__.py [new file with mode: 0644]
spline/plugins/forum/__init__.py [new file with mode: 0644]
spline/plugins/forum/controllers/__init__.py [new file with mode: 0644]
spline/plugins/forum/controllers/forum.py [new file with mode: 0644]
spline/plugins/forum/model/__init__.py [new file with mode: 0644]
spline/plugins/forum/templates/css/forum.mako [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..6df398f
--- /dev/null
@@ -0,0 +1,7 @@
+*.swp
+*.pyc
+
+*.egg-info/
+/*.db
+/data
+/migration.py
diff --git a/migration/README b/migration/README
new file mode 100644 (file)
index 0000000..6218f8c
--- /dev/null
@@ -0,0 +1,4 @@
+This is a database migration repository.
+
+More information at
+http://code.google.com/p/sqlalchemy-migrate/
diff --git a/migration/__init__.py b/migration/__init__.py
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/migration/manage.py b/migration/manage.py
new file mode 100644 (file)
index 0000000..0add9c2
--- /dev/null
@@ -0,0 +1,4 @@
+#!/usr/bin/env python
+from migrate.versioning.shell import main
+
+main(repository='migration')
diff --git a/migration/migrate.cfg b/migration/migrate.cfg
new file mode 100644 (file)
index 0000000..fb4dcc0
--- /dev/null
@@ -0,0 +1,20 @@
+[db_settings]
+# Used to identify which repository this database is versioned under.
+# You can use the name of your project.
+repository_id=spline-forun
+
+# The name of the database table used to track the schema version.
+# This name shouldn't already be used by your project.
+# If this is changed once a database is under version control, you'll need to 
+# change the table name in each database too. 
+version_table=migrate_version
+
+# When committing a change script, Migrate will attempt to generate the 
+# sql for all supported databases; normally, if one of them fails - probably
+# because you don't have that database installed - it is ignored and the 
+# commit continues, perhaps ending successfully. 
+# Databases in this list MUST compile successfully during a commit, or the 
+# entire commit will fail. List the databases your application will actually 
+# be using to ensure your updates to that database work properly.
+# This must be a list; example: ['postgres','sqlite']
+required_dbs=[]
diff --git a/migration/versions/__init__.py b/migration/versions/__init__.py
new file mode 100755 (executable)
index 0000000..e69de29
diff --git a/setup.py b/setup.py
new file mode 100644 (file)
index 0000000..5e736f3
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,19 @@
+from setuptools import setup, find_packages
+setup(
+    name = 'spline-forum',
+    version = '0.1',
+    packages = find_packages(),
+
+    install_requires = [
+        'spline',
+        'spline-users',
+    ],
+
+    include_package_data = True,
+
+    zip_safe = False,
+
+    entry_points = {'spline.plugins': 'forum = spline.plugins.forum:ForumPlugin'},
+
+    namespace_packages = ['spline', 'spline.plugins'],
+)
diff --git a/spline/__init__.py b/spline/__init__.py
new file mode 100644 (file)
index 0000000..de40ea7
--- /dev/null
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/spline/plugins/__init__.py b/spline/plugins/__init__.py
new file mode 100644 (file)
index 0000000..de40ea7
--- /dev/null
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/spline/plugins/forum/__init__.py b/spline/plugins/forum/__init__.py
new file mode 100644 (file)
index 0000000..a3f259e
--- /dev/null
@@ -0,0 +1,32 @@
+from pkg_resources import resource_filename
+
+from pylons import c, session
+
+from spline.lib.plugin import PluginBase
+from spline.lib.plugin import PluginBase, PluginLink, Priority
+import spline.model as model
+import spline.model.meta as meta
+
+import spline.plugins.forum.controllers.forum
+import spline.plugins.forum.model
+
+def add_routes_hook(map, *args, **kwargs):
+    """Hook to inject some of our behavior into the routes configuration."""
+    map.connect('/forum', controller='forum', action='index')
+
+
+class ForumPlugin(PluginBase):
+    def controllers(self):
+        return dict(
+            forum = spline.plugins.forum.controllers.forum.ForumController,
+        )
+
+    def template_dirs(self):
+        return [
+            (resource_filename(__name__, 'templates'), Priority.NORMAL)
+        ]
+
+    def hooks(self):
+        return [
+            ('routes_mapping',    Priority.NORMAL,      add_routes_hook),
+        ]
diff --git a/spline/plugins/forum/controllers/__init__.py b/spline/plugins/forum/controllers/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/spline/plugins/forum/controllers/forum.py b/spline/plugins/forum/controllers/forum.py
new file mode 100644 (file)
index 0000000..6d577fb
--- /dev/null
@@ -0,0 +1,21 @@
+import logging
+
+from pylons import config, request, response, session, tmpl_context as c, url
+from pylons.controllers.util import abort, redirect_to
+from routes import request_config
+from sqlalchemy.orm.exc import NoResultFound
+
+from spline import model
+from spline.model import meta
+from spline.lib import helpers as h
+from spline.lib.base import BaseController, render
+
+log = logging.getLogger(__name__)
+
+class ForumController(BaseController):
+
+    def index(self):
+        # Return a rendered template
+        #   return render('/template.mako')
+        # or, Return a response
+        return 'stub'
diff --git a/spline/plugins/forum/model/__init__.py b/spline/plugins/forum/model/__init__.py
new file mode 100644 (file)
index 0000000..f7d8a14
--- /dev/null
@@ -0,0 +1,7 @@
+from sqlalchemy import Column, ForeignKey
+from sqlalchemy.orm import relation
+from sqlalchemy.types import Integer, Unicode
+
+from spline.model.meta import TableBase
+
+pass
diff --git a/spline/plugins/forum/templates/css/forum.mako b/spline/plugins/forum/templates/css/forum.mako
new file mode 100644 (file)
index 0000000..e69de29