diff --git a/trunk/MANIFEST.in b/trunk/MANIFEST.in new file mode 100644 index 0000000..ac17a74 --- /dev/null +++ b/trunk/MANIFEST.in @@ -0,0 +1,2 @@ +recursive-include yolanda/public * +recursive-include yolanda/templates * diff --git a/trunk/README.txt b/trunk/README.txt new file mode 100644 index 0000000..b6a6861 --- /dev/null +++ b/trunk/README.txt @@ -0,0 +1,19 @@ +This file is for you to describe the Yolanda application. Typically +you would include information such as the information below: + +Installation and Setup +====================== + +Install ``Yolanda`` using easy_install:: + + easy_install Yolanda + +Make a config file as follows:: + + paster make-config Yolanda config.ini + +Tweak the config file as appropriate and then setup the application:: + + paster setup-app config.ini + +Then you are ready to go. diff --git a/trunk/Yolanda.egg-info/PKG-INFO b/trunk/Yolanda.egg-info/PKG-INFO new file mode 100644 index 0000000..2e4f694 --- /dev/null +++ b/trunk/Yolanda.egg-info/PKG-INFO @@ -0,0 +1,10 @@ +Metadata-Version: 1.0 +Name: Yolanda +Version: 0.0.0dev +Summary: UNKNOWN +Home-page: UNKNOWN +Author: UNKNOWN +Author-email: UNKNOWN +License: UNKNOWN +Description: UNKNOWN +Platform: UNKNOWN diff --git a/trunk/Yolanda.egg-info/SOURCES.txt b/trunk/Yolanda.egg-info/SOURCES.txt new file mode 100644 index 0000000..b4a97a0 --- /dev/null +++ b/trunk/Yolanda.egg-info/SOURCES.txt @@ -0,0 +1,29 @@ +MANIFEST.in +README.txt +setup.cfg +setup.py +Yolanda.egg-info/PKG-INFO +Yolanda.egg-info/SOURCES.txt +Yolanda.egg-info/dependency_links.txt +Yolanda.egg-info/entry_points.txt +Yolanda.egg-info/paste_deploy_config.ini_tmpl +Yolanda.egg-info/requires.txt +Yolanda.egg-info/top_level.txt +yolanda/__init__.py +yolanda/websetup.py +yolanda/config/__init__.py +yolanda/config/environment.py +yolanda/config/middleware.py +yolanda/config/routing.py +yolanda/controllers/__init__.py +yolanda/controllers/error.py +yolanda/controllers/template.py +yolanda/lib/__init__.py +yolanda/lib/app_globals.py +yolanda/lib/base.py +yolanda/lib/helpers.py +yolanda/model/__init__.py +yolanda/public/index.html +yolanda/tests/__init__.py +yolanda/tests/test_models.py +yolanda/tests/functional/__init__.py \ No newline at end of file diff --git a/trunk/Yolanda.egg-info/dependency_links.txt b/trunk/Yolanda.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/trunk/Yolanda.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/trunk/Yolanda.egg-info/entry_points.txt b/trunk/Yolanda.egg-info/entry_points.txt new file mode 100644 index 0000000..6655f5b --- /dev/null +++ b/trunk/Yolanda.egg-info/entry_points.txt @@ -0,0 +1,7 @@ + + [paste.app_factory] + main = yolanda.config.middleware:make_app + + [paste.app_install] + main = pylons.util:PylonsInstaller + \ No newline at end of file diff --git a/trunk/Yolanda.egg-info/paste_deploy_config.ini_tmpl b/trunk/Yolanda.egg-info/paste_deploy_config.ini_tmpl new file mode 100644 index 0000000..9f4f7f0 --- /dev/null +++ b/trunk/Yolanda.egg-info/paste_deploy_config.ini_tmpl @@ -0,0 +1,58 @@ +# +# Yolanda - Pylons configuration +# +# The %(here)s variable will be replaced with the parent directory of this file +# +[DEFAULT] +debug = true +email_to = you@yourdomain.com +smtp_server = localhost +error_email_from = paste@localhost + +[server:main] +use = egg:Paste#http +host = 0.0.0.0 +port = 5000 + +[app:main] +use = egg:Yolanda +full_stack = true +cache_dir = %(here)s/data +beaker.session.key = yolanda +beaker.session.secret = ${app_instance_secret} +app_instance_uuid = ${app_instance_uuid} + +# If you'd like to fine-tune the individual locations of the cache data dirs +# for the Cache data, or the Session saves, un-comment the desired settings +# here: +#beaker.cache.data_dir = %(here)s/data/cache +#beaker.session.data_dir = %(here)s/data/sessions + +# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* +# Debug mode will enable the interactive debugging tool, allowing ANYONE to +# execute malicious code after an exception is raised. +set debug = false + + +# Logging configuration +[loggers] +keys = root + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = INFO +handlers = console + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(asctime)s %(levelname)-5.5s [%(name)s] %(message)s diff --git a/trunk/Yolanda.egg-info/paster_plugins.txt b/trunk/Yolanda.egg-info/paster_plugins.txt new file mode 100644 index 0000000..b3ee8d7 --- /dev/null +++ b/trunk/Yolanda.egg-info/paster_plugins.txt @@ -0,0 +1,3 @@ +Pylons +WebHelpers +PasteScript diff --git a/trunk/Yolanda.egg-info/requires.txt b/trunk/Yolanda.egg-info/requires.txt new file mode 100644 index 0000000..a7c9299 --- /dev/null +++ b/trunk/Yolanda.egg-info/requires.txt @@ -0,0 +1 @@ +Pylons>=0.9.6.1 \ No newline at end of file diff --git a/trunk/Yolanda.egg-info/top_level.txt b/trunk/Yolanda.egg-info/top_level.txt new file mode 100644 index 0000000..11a9aa0 --- /dev/null +++ b/trunk/Yolanda.egg-info/top_level.txt @@ -0,0 +1 @@ +yolanda diff --git a/trunk/data/sessions/container_file/6/6b/6b6319534be44c654af01dfd8269df82.cache b/trunk/data/sessions/container_file/6/6b/6b6319534be44c654af01dfd8269df82.cache new file mode 100644 index 0000000..7d115ef --- /dev/null +++ b/trunk/data/sessions/container_file/6/6b/6b6319534be44c654af01dfd8269df82.cache @@ -0,0 +1,12 @@ +(dp1 +S'_authentication_token' +p2 +S'141491361115205551276239095199970379580' +p3 +sS'_accessed_time' +p4 +F1217161386.3120041 +sS'_creation_time' +p5 +F1217161386.3120079 +s. \ No newline at end of file diff --git a/trunk/data/templates/index.mako.py b/trunk/data/templates/index.mako.py new file mode 100644 index 0000000..836a3d0 --- /dev/null +++ b/trunk/data/templates/index.mako.py @@ -0,0 +1,40 @@ +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +_magic_number = 2 +_modified_time = 1216907993.197489 +_template_filename='/home/nils/src/yolanda/trunk/yolanda/templates/index.mako' +_template_uri='/index.mako' +_template_cache=cache.Cache(__name__, _modified_time) +_source_encoding=None +_exports = [] + + +def render_body(context,**pageargs): + context.caller_stack.push_frame() + try: + __M_locals = dict(pageargs=pageargs) + h = context.get('h', UNDEFINED) + # SOURCE LINE 1 + context.write(u'

\n Welcome to Yolanda\n

\n\n

\n This is the front page.\n

\n\n

\n upload video\n

\n\n

\n\n') + # SOURCE LINE 15 + context.write(unicode( h.form( \ + h.url(action='/results'), \ + method='get', \ + enctype='application/x-www-form-urlencoded' \ +) )) + # SOURCE LINE 19 + context.write(u'\n\n') + # SOURCE LINE 21 + context.write(unicode( h.text_field('query') )) + context.write(u'\n') + # SOURCE LINE 22 + context.write(unicode( h.submit('find video') )) + context.write(u'\n\n') + # SOURCE LINE 24 + context.write(unicode( h.end_form() )) + context.write(u'\n\n

\n
\n\n \n search for videos\n \n\n \n \n\n
\n
\n

\n') + return '' + finally: + context.caller_stack.pop_frame() + + diff --git a/trunk/data/templates/index.mako.pyc b/trunk/data/templates/index.mako.pyc new file mode 100644 index 0000000..832dba2 Binary files /dev/null and b/trunk/data/templates/index.mako.pyc differ diff --git a/trunk/data/templates/index.myt.py b/trunk/data/templates/index.myt.py new file mode 100644 index 0000000..68592aa --- /dev/null +++ b/trunk/data/templates/index.myt.py @@ -0,0 +1,22 @@ +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +_magic_number = 2 +_modified_time = 1216815389.6429961 +_template_filename='/home/nils/src/yolanda/trunk/yolanda/templates/index.myt' +_template_uri='/index.myt' +_template_cache=cache.Cache(__name__, _modified_time) +_source_encoding=None +_exports = [] + + +def render_body(context,**pageargs): + context.caller_stack.push_frame() + try: + __M_locals = dict(pageargs=pageargs) + # SOURCE LINE 1 + context.write(u'\n\n

\n Welcome to Yolanda\n

\n\n

\n This is the front page.\n

\n\n

\n upload video\n

\n\n

\n

\n
\n\n \n search for videos\n \n\n \n \n\n
\n
\n

\n\n\n') + return '' + finally: + context.caller_stack.pop_frame() + + diff --git a/trunk/data/templates/index.myt.pyc b/trunk/data/templates/index.myt.pyc new file mode 100644 index 0000000..7e737a1 Binary files /dev/null and b/trunk/data/templates/index.myt.pyc differ diff --git a/trunk/data/templates/results.mako.py b/trunk/data/templates/results.mako.py new file mode 100644 index 0000000..4de22eb --- /dev/null +++ b/trunk/data/templates/results.mako.py @@ -0,0 +1,62 @@ +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +_magic_number = 2 +_modified_time = 1216910187.0066929 +_template_filename='/home/nils/src/yolanda/trunk/yolanda/templates/results.mako' +_template_uri='/results.mako' +_template_cache=cache.Cache(__name__, _modified_time) +_source_encoding=None +_exports = ['result'] + + +def render_body(context,**pageargs): + context.caller_stack.push_frame() + try: + __M_locals = dict(pageargs=pageargs) + h = context.get('h', UNDEFINED) + c = context.get('c', UNDEFINED) + def result(x): + return render_result(context.locals_(__M_locals),x) + # SOURCE LINE 1 + context.write(u'\n\n\n\n\n') + # SOURCE LINE 6 + context.write(unicode( h.javascript_include_tag('/javascripts/effects.js', builtins=True) )) + context.write(u'\n\n\n\n\n\n\n') + # SOURCE LINE 18 + context.write(u'\n\n

\n Here be results for ') + # SOURCE LINE 21 + context.write(unicode(c.query)) + context.write(u'.\n

\n\n') + # SOURCE LINE 24 + for x in range(1,10): + # SOURCE LINE 25 + context.write(u' ') + context.write(unicode(result(x))) + context.write(u'\n') + # SOURCE LINE 27 + context.write(u'\n\n\n\n\n') + return '' + finally: + context.caller_stack.pop_frame() + + +def render_result(context,x): + context.caller_stack.push_frame() + try: + h = context.get('h', UNDEFINED) + # SOURCE LINE 13 + context.write(u'\n
\n ') + # SOURCE LINE 15 + context.write(unicode( h.draggable_element(x, revert=True) )) + context.write(u'\n thumbnail and infos for video ') + # SOURCE LINE 16 + context.write(unicode(x)) + context.write(u'\n
\n') + return '' + finally: + context.caller_stack.pop_frame() + + diff --git a/trunk/data/templates/results.mako.pyc b/trunk/data/templates/results.mako.pyc new file mode 100644 index 0000000..b65c451 Binary files /dev/null and b/trunk/data/templates/results.mako.pyc differ diff --git a/trunk/data/templates/results.myt.py b/trunk/data/templates/results.myt.py new file mode 100644 index 0000000..809274c --- /dev/null +++ b/trunk/data/templates/results.myt.py @@ -0,0 +1,44 @@ +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +_magic_number = 2 +_modified_time = 1216817791.7502799 +_template_filename='/home/nils/src/yolanda/trunk/yolanda/templates/results.myt' +_template_uri='/results.myt' +_template_cache=cache.Cache(__name__, _modified_time) +_source_encoding=None +_exports = [] + + +def render_body(context,**pageargs): + context.caller_stack.push_frame() + try: + __M_locals = dict(pageargs=pageargs) + h = context.get('h', UNDEFINED) + c = context.get('c', UNDEFINED) + # SOURCE LINE 1 + context.write(u'

\n Welcome to Yolanda\n

\n\n

\n This is the search page.\n

\n\n

\n') + # SOURCE LINE 10 + h.start_form(h.url_for(action='save', title=c.query), method="get") + + context.write(u'\n ') + # SOURCE LINE 11 + h.text_area(name='content', rows=7, cols=40, content=c.content) + + context.write(u'
\n ') + # SOURCE LINE 12 + h.submit(value="Save changes", name='commit') + + context.write(u'\n') + # SOURCE LINE 13 + h.end_form() + + context.write(u'\n\n ') + # SOURCE LINE 15 + c.query + + context.write(u'\n

\n') + return '' + finally: + context.caller_stack.pop_frame() + + diff --git a/trunk/data/templates/results.myt.pyc b/trunk/data/templates/results.myt.pyc new file mode 100644 index 0000000..be8625f Binary files /dev/null and b/trunk/data/templates/results.myt.pyc differ diff --git a/trunk/data/templates/search.myt.py b/trunk/data/templates/search.myt.py new file mode 100644 index 0000000..1b7fdda --- /dev/null +++ b/trunk/data/templates/search.myt.py @@ -0,0 +1,22 @@ +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +_magic_number = 2 +_modified_time = 1216814715.8671241 +_template_filename='/home/nils/src/yolanda/trunk/yolanda/templates/search.myt' +_template_uri='/search.myt' +_template_cache=cache.Cache(__name__, _modified_time) +_source_encoding=None +_exports = [] + + +def render_body(context,**pageargs): + context.caller_stack.push_frame() + try: + __M_locals = dict(pageargs=pageargs) + # SOURCE LINE 1 + context.write(u'\n\n

\n Welcome to Yolanda\n

\n\n

\n This is the search page.\n

\n\n\n') + return '' + finally: + context.caller_stack.pop_frame() + + diff --git a/trunk/data/templates/search.myt.pyc b/trunk/data/templates/search.myt.pyc new file mode 100644 index 0000000..f4930ea Binary files /dev/null and b/trunk/data/templates/search.myt.pyc differ diff --git a/trunk/data/templates/xhtml/base.mako.py b/trunk/data/templates/xhtml/base.mako.py new file mode 100644 index 0000000..f433d88 --- /dev/null +++ b/trunk/data/templates/xhtml/base.mako.py @@ -0,0 +1,48 @@ +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +_magic_number = 2 +_modified_time = 1217192624.700382 +_template_filename=u'/home/nils/src/yolanda/trunk/yolanda/templates/xhtml/base.mako' +_template_uri=u'/xhtml/base.mako' +_template_cache=cache.Cache(__name__, _modified_time) +_source_encoding=None +_exports = [] + + +def render_body(context,**pageargs): + context.caller_stack.push_frame() + try: + __M_locals = dict(pageargs=pageargs) + h = context.get('h', UNDEFINED) + self = context.get('self', UNDEFINED) + # SOURCE LINE 1 + context.write(u'\n\n\n\n\n\n\n \n\n \n\n \n Yolanda - ') + # SOURCE LINE 22 + context.write(unicode(self.title())) + context.write(u'\n \n\n\n\n\n\n
\n

\n ') + # SOURCE LINE 31 + context.write(unicode(self.heading())) + context.write(u'\n

\n
\n\n \n\n ') + # SOURCE LINE 50 + context.write(unicode(self.body())) + context.write(u'\n\n \n\n \n\n\n\n\n') + return '' + finally: + context.caller_stack.pop_frame() + + diff --git a/trunk/data/templates/xhtml/base.mako.pyc b/trunk/data/templates/xhtml/base.mako.pyc new file mode 100644 index 0000000..3bde14b Binary files /dev/null and b/trunk/data/templates/xhtml/base.mako.pyc differ diff --git a/trunk/data/templates/xhtml/index.mako.py b/trunk/data/templates/xhtml/index.mako.py new file mode 100644 index 0000000..ed6f334 --- /dev/null +++ b/trunk/data/templates/xhtml/index.mako.py @@ -0,0 +1,57 @@ +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +_magic_number = 2 +_modified_time = 1217192819.900584 +_template_filename='/home/nils/src/yolanda/trunk/yolanda/templates/xhtml/index.mako' +_template_uri='/xhtml/index.mako' +_template_cache=cache.Cache(__name__, _modified_time) +_source_encoding=None +_exports = ['heading', 'title'] + + +def _mako_get_namespace(context, name): + try: + return context.namespaces[(__name__, name)] + except KeyError: + _mako_generate_namespaces(context) + return context.namespaces[(__name__, name)] +def _mako_generate_namespaces(context): + pass +def _mako_inherit(template, context): + _mako_generate_namespaces(context) + return runtime._inherit_from(context, u'base.mako', _template_uri) +def render_body(context,**pageargs): + context.caller_stack.push_frame() + try: + __M_locals = dict(pageargs=pageargs) + # SOURCE LINE 1 + context.write(u'\n\n') + # SOURCE LINE 5 + context.write(u'\n\n') + # SOURCE LINE 9 + context.write(u'\n\nLOL INDEX\n') + return '' + finally: + context.caller_stack.pop_frame() + + +def render_heading(context): + context.caller_stack.push_frame() + try: + # SOURCE LINE 7 + context.write(u'\n Welcome, youngling !\n') + return '' + finally: + context.caller_stack.pop_frame() + + +def render_title(context): + context.caller_stack.push_frame() + try: + # SOURCE LINE 3 + context.write(u'\n front page\n') + return '' + finally: + context.caller_stack.pop_frame() + + diff --git a/trunk/data/templates/xhtml/index.mako.pyc b/trunk/data/templates/xhtml/index.mako.pyc new file mode 100644 index 0000000..8726e09 Binary files /dev/null and b/trunk/data/templates/xhtml/index.mako.pyc differ diff --git a/trunk/data/templates/xhtml/results.mako.py b/trunk/data/templates/xhtml/results.mako.py new file mode 100644 index 0000000..59f71b4 --- /dev/null +++ b/trunk/data/templates/xhtml/results.mako.py @@ -0,0 +1,105 @@ +from mako import runtime, filters, cache +UNDEFINED = runtime.UNDEFINED +_magic_number = 2 +_modified_time = 1217192310.2031181 +_template_filename='/home/nils/src/yolanda/trunk/yolanda/templates/xhtml/results.mako' +_template_uri='/xhtml/results.mako' +_template_cache=cache.Cache(__name__, _modified_time) +_source_encoding=None +_exports = ['results_listing', 'heading', 'title'] + + +def _mako_get_namespace(context, name): + try: + return context.namespaces[(__name__, name)] + except KeyError: + _mako_generate_namespaces(context) + return context.namespaces[(__name__, name)] +def _mako_generate_namespaces(context): + pass +def _mako_inherit(template, context): + _mako_generate_namespaces(context) + return runtime._inherit_from(context, u'base.mako', _template_uri) +def render_body(context,**pageargs): + context.caller_stack.push_frame() + try: + __M_locals = dict(pageargs=pageargs) + def results_listing(results): + return render_results_listing(context.locals_(__M_locals),results) + c = context.get('c', UNDEFINED) + # SOURCE LINE 1 + context.write(u'\n\n') + # SOURCE LINE 5 + context.write(u'\n\n') + # SOURCE LINE 9 + context.write(u'\n\n') + # SOURCE LINE 25 + context.write(u'\n\n') + # SOURCE LINE 27 + context.write(unicode(results_listing(c.results))) + context.write(u'\n') + return '' + finally: + context.caller_stack.pop_frame() + + +def render_results_listing(context,results): + context.caller_stack.push_frame() + try: + h = context.get('h', UNDEFINED) + c = context.get('c', UNDEFINED) + # SOURCE LINE 11 + context.write(u'\n
    \n') + # SOURCE LINE 13 + for result in c.results: + # SOURCE LINE 14 + context.write(u'
  1. \n \n \'thumbnail\n \n
    \n \n ') + # SOURCE LINE 20 + context.write(unicode(result['title'])) + context.write(u'\n \n
  2. \n') + # SOURCE LINE 24 + context.write(u'
\n') + return '' + finally: + context.caller_stack.pop_frame() + + +def render_heading(context): + context.caller_stack.push_frame() + try: + c = context.get('c', UNDEFINED) + # SOURCE LINE 7 + context.write(u'\n 9001 results for "') + # SOURCE LINE 8 + context.write(unicode(c.query)) + context.write(u'":\n') + return '' + finally: + context.caller_stack.pop_frame() + + +def render_title(context): + context.caller_stack.push_frame() + try: + c = context.get('c', UNDEFINED) + # SOURCE LINE 3 + context.write(u'\n results for "') + # SOURCE LINE 4 + context.write(unicode(c.query)) + context.write(u'"\n') + return '' + finally: + context.caller_stack.pop_frame() + + diff --git a/trunk/data/templates/xhtml/results.mako.pyc b/trunk/data/templates/xhtml/results.mako.pyc new file mode 100644 index 0000000..736d507 Binary files /dev/null and b/trunk/data/templates/xhtml/results.mako.pyc differ diff --git a/trunk/development.ini b/trunk/development.ini new file mode 100644 index 0000000..902f4b3 --- /dev/null +++ b/trunk/development.ini @@ -0,0 +1,64 @@ +# +# Yolanda - Pylons development environment configuration +# +# The %(here)s variable will be replaced with the parent directory of this file +# +[DEFAULT] +debug = true +# Uncomment and replace with the address which should receive any error reports +#email_to = you@yourdomain.com +smtp_server = localhost +error_email_from = paste@localhost + +[server:main] +use = egg:Paste#http +host = 0.0.0.0 +port = 5000 + +[app:main] +use = egg:Yolanda +full_stack = true +cache_dir = %(here)s/data +beaker.session.key = yolanda +beaker.session.secret = somesecret + +# If you'd like to fine-tune the individual locations of the cache data dirs +# for the Cache data, or the Session saves, un-comment the desired settings +# here: +#beaker.cache.data_dir = %(here)s/data/cache +#beaker.session.data_dir = %(here)s/data/sessions + +# WARNING: *THE LINE BELOW MUST BE UNCOMMENTED ON A PRODUCTION ENVIRONMENT* +# Debug mode will enable the interactive debugging tool, allowing ANYONE to +# execute malicious code after an exception is raised. +#set debug = false + + +# Logging configuration +[loggers] +keys = root, yolanda + +[handlers] +keys = console + +[formatters] +keys = generic + +[logger_root] +level = INFO +handlers = console + +[logger_yolanda] +level = DEBUG +handlers = +qualname = yolanda + +[handler_console] +class = StreamHandler +args = (sys.stderr,) +level = NOTSET +formatter = generic + +[formatter_generic] +format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s +datefmt = %H:%M:%S diff --git a/trunk/docs/index.txt b/trunk/docs/index.txt new file mode 100644 index 0000000..6e3b34d --- /dev/null +++ b/trunk/docs/index.txt @@ -0,0 +1,12 @@ +yolanda ++++++++ + +This is the main index page of your documentation. It should be written in +`reStructuredText format `_. + +You can generate your documentation in HTML format by running this command:: + + setup.py pudge + +For this to work you will need to download and install ``buildutils`` and +``pudge``. diff --git a/trunk/setup.cfg b/trunk/setup.cfg new file mode 100644 index 0000000..f429673 --- /dev/null +++ b/trunk/setup.cfg @@ -0,0 +1,59 @@ +[egg_info] +tag_build = dev +tag_svn_revision = true + +[easy_install] +find_links = http://www.pylonshq.com/download/ + +[pudge] +theme = pythonpaste.org + +# Add extra doc files here with spaces between them +docs = docs/index.txt + +# Doc Settings +doc_base = docs/ +dest = docs/html + +# Add extra modules here separated with commas +modules = yolanda +title = Yolanda +organization = Pylons + +# Highlight code-block sections with Pygments +highlighter = pygments + +# Optionally add extra links +#organization_url = http://pylonshq.com/ +#trac_url = http://pylonshq.com/project +settings = no_about=true + +# Optionally add extra settings +# link1=/community/ Community +# link2=/download/ Download + +[publish] +doc-dir=docs/html +make-dirs=1 + +# Babel configuration +[compile_catalog] +domain = yolanda +directory = yolanda/i18n +statistics = true + +[extract_messages] +add_comments = TRANSLATORS: +output_file = yolanda/i18n/yolanda.pot +width = 80 + +[init_catalog] +domain = yolanda +input_file = yolanda/i18n/yolanda.pot +output_dir = yolanda/i18n + +[update_catalog] +domain = yolanda +input_file = yolanda/i18n/yolanda.pot +output_dir = yolanda/i18n +previous = true diff --git a/trunk/setup.py b/trunk/setup.py new file mode 100644 index 0000000..c5a63de --- /dev/null +++ b/trunk/setup.py @@ -0,0 +1,31 @@ +try: + from setuptools import setup, find_packages +except ImportError: + from ez_setup import use_setuptools + use_setuptools() + from setuptools import setup, find_packages + +setup( + name='Yolanda', + version="", + #description='', + #author='', + #author_email='', + #url='', + install_requires=["Pylons>=0.9.6.1"], + packages=find_packages(exclude=['ez_setup']), + include_package_data=True, + test_suite='nose.collector', + package_data={'yolanda': ['i18n/*/LC_MESSAGES/*.mo']}, + #message_extractors = {'yolanda': [ + # ('**.py', 'python', None), + # ('templates/**.mako', 'mako', None), + # ('public/**', 'ignore', None)]}, + entry_points=""" + [paste.app_factory] + main = yolanda.config.middleware:make_app + + [paste.app_install] + main = pylons.util:PylonsInstaller + """, +) diff --git a/trunk/test.ini b/trunk/test.ini new file mode 100644 index 0000000..50367f9 --- /dev/null +++ b/trunk/test.ini @@ -0,0 +1,21 @@ +# +# Yolanda - Pylons testing environment configuration +# +# The %(here)s variable will be replaced with the parent directory of this file +# +[DEFAULT] +debug = true +# Uncomment and replace with the address which should receive any error reports +#email_to = you@yourdomain.com +smtp_server = localhost +error_email_from = paste@localhost + +[server:main] +use = egg:Paste#http +host = 0.0.0.0 +port = 5000 + +[app:main] +use = config:development.ini + +# Add additional test specific configuration options as necessary. diff --git a/trunk/yolanda/__init__.py b/trunk/yolanda/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/trunk/yolanda/__init__.pyc b/trunk/yolanda/__init__.pyc new file mode 100644 index 0000000..88e92f7 Binary files /dev/null and b/trunk/yolanda/__init__.pyc differ diff --git a/trunk/yolanda/config/__init__.py b/trunk/yolanda/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/trunk/yolanda/config/__init__.pyc b/trunk/yolanda/config/__init__.pyc new file mode 100644 index 0000000..c9f3e28 Binary files /dev/null and b/trunk/yolanda/config/__init__.pyc differ diff --git a/trunk/yolanda/config/environment.py b/trunk/yolanda/config/environment.py new file mode 100644 index 0000000..efd35df --- /dev/null +++ b/trunk/yolanda/config/environment.py @@ -0,0 +1,33 @@ +"""Pylons environment configuration""" +import os + +from pylons import config + +import yolanda.lib.app_globals as app_globals +import yolanda.lib.helpers +from yolanda.config.routing import make_map + +def load_environment(global_conf, app_conf): + """Configure the Pylons environment via the ``pylons.config`` + object + """ + # Pylons paths + root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + paths = dict(root=root, + controllers=os.path.join(root, 'controllers'), + static_files=os.path.join(root, 'public'), + templates=[os.path.join(root, 'templates')]) + + # Initialize config with the basic options + config.init_app(global_conf, app_conf, package='yolanda', + template_engine='mako', paths=paths) + + config['routes.map'] = make_map() + config['pylons.g'] = app_globals.Globals() + config['pylons.h'] = yolanda.lib.helpers + + # Customize templating options via this variable + tmpl_options = config['buffet.template_options'] + + # CONFIGURATION OPTIONS HERE (note: all config options will override + # any Pylons config options) diff --git a/trunk/yolanda/config/environment.pyc b/trunk/yolanda/config/environment.pyc new file mode 100644 index 0000000..4b88d7f Binary files /dev/null and b/trunk/yolanda/config/environment.pyc differ diff --git a/trunk/yolanda/config/middleware.py b/trunk/yolanda/config/middleware.py new file mode 100644 index 0000000..e340ab1 --- /dev/null +++ b/trunk/yolanda/config/middleware.py @@ -0,0 +1,57 @@ +"""Pylons middleware initialization""" +from paste.cascade import Cascade +from paste.registry import RegistryManager +from paste.urlparser import StaticURLParser +from paste.deploy.converters import asbool + +from pylons import config +from pylons.error import error_template +from pylons.middleware import error_mapper, ErrorDocuments, ErrorHandler, \ + StaticJavascripts +from pylons.wsgiapp import PylonsApp + +from yolanda.config.environment import load_environment + +def make_app(global_conf, full_stack=True, **app_conf): + """Create a Pylons WSGI application and return it + + ``global_conf`` + The inherited configuration for this application. Normally from + the [DEFAULT] section of the Paste ini file. + + ``full_stack`` + Whether or not this application provides a full WSGI stack (by + default, meaning it handles its own exceptions and errors). + Disable full_stack when this application is "managed" by + another WSGI middleware. + + ``app_conf`` + The application's local configuration. Normally specified in the + [app:] section of the Paste ini file (where + defaults to main). + """ + # Configure the Pylons environment + load_environment(global_conf, app_conf) + + # The Pylons WSGI app + app = PylonsApp() + + # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares) + + if asbool(full_stack): + # Handle Python exceptions + app = ErrorHandler(app, global_conf, error_template=error_template, + **config['pylons.errorware']) + + # Display error documents for 401, 403, 404 status codes (and + # 500 when debug is disabled) + app = ErrorDocuments(app, global_conf, mapper=error_mapper, **app_conf) + + # Establish the Registry for this application + app = RegistryManager(app) + + # Static files + javascripts_app = StaticJavascripts() + static_app = StaticURLParser(config['pylons.paths']['static_files']) + app = Cascade([static_app, javascripts_app, app]) + return app diff --git a/trunk/yolanda/config/middleware.pyc b/trunk/yolanda/config/middleware.pyc new file mode 100644 index 0000000..dbc07fd Binary files /dev/null and b/trunk/yolanda/config/middleware.pyc differ diff --git a/trunk/yolanda/config/routing.py b/trunk/yolanda/config/routing.py new file mode 100644 index 0000000..34d164b --- /dev/null +++ b/trunk/yolanda/config/routing.py @@ -0,0 +1,46 @@ +"""Routes configuration + +The more specific and detailed routes should be defined first so they +may take precedent over the more generic routes. For more information +refer to the routes manual at http://routes.groovie.org/docs/ +""" +from pylons import config +from routes import Mapper + +def make_map(): + """Create, configure and return the routes Mapper""" + map = Mapper(directory=config['pylons.paths']['controllers'], + always_scan=config['debug']) + + # The ErrorController route (handles 404/500 error pages); it should + # likely stay at the top, ensuring it can always be resolved + map.connect('error/:action/:id', controller='error') + + # CUSTOM ROUTES HERE + + # front page (search form and search errors) + map.connect('', controller='index', action='index') + + # search results + map.connect('search_results', 'results', controller='search', action='results') + + # videos + def video_expand(kargs): + # only alter kargs if a video keyword arg is present + if 'video' not in kargs: + return kargs + + video = kargs.pop('video') + kargs['id'] = video['id'] + kargs['title'] = video['title'] + + return kargs + + map.connect('video_page', 'video/:id/:title', controller='video', _filter=video_expand) + # map.connect('video_file', 'video/:id.ogv', controller='video', action='file' _filter=video_expand) + + # everything else + map.connect(':controller/:action/:id') + # map.connect('*url', controller='template', action='view') + + return map diff --git a/trunk/yolanda/config/routing.pyc b/trunk/yolanda/config/routing.pyc new file mode 100644 index 0000000..5b4531a Binary files /dev/null and b/trunk/yolanda/config/routing.pyc differ diff --git a/trunk/yolanda/controllers/__init__.py b/trunk/yolanda/controllers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/trunk/yolanda/controllers/__init__.pyc b/trunk/yolanda/controllers/__init__.pyc new file mode 100644 index 0000000..f5f0dde Binary files /dev/null and b/trunk/yolanda/controllers/__init__.pyc differ diff --git a/trunk/yolanda/controllers/account.py b/trunk/yolanda/controllers/account.py new file mode 100644 index 0000000..cb9a7b5 --- /dev/null +++ b/trunk/yolanda/controllers/account.py @@ -0,0 +1,13 @@ +import logging + +from yolanda.lib.base import * + +log = logging.getLogger(__name__) + +class AccountController(BaseController): + + def index(self): + # Return a rendered template + # return render('/some/template.mako') + # or, Return a response + return 'account' diff --git a/trunk/yolanda/controllers/error.py b/trunk/yolanda/controllers/error.py new file mode 100644 index 0000000..8a10408 --- /dev/null +++ b/trunk/yolanda/controllers/error.py @@ -0,0 +1,39 @@ +import os.path + +import paste.fileapp +from pylons.middleware import error_document_template, media_path + +from yolanda.lib.base import * + +class ErrorController(BaseController): + """Generates error documents as and when they are required. + + The ErrorDocuments middleware forwards to ErrorController when error + related status codes are returned from the application. + + This behaviour can be altered by changing the parameters to the + ErrorDocuments middleware in your config/middleware.py file. + """ + + def document(self): + """Render the error document""" + page = error_document_template % \ + dict(prefix=request.environ.get('SCRIPT_NAME', ''), + code=request.params.get('code', ''), + message=request.params.get('message', '')) + return page + + def img(self, id): + """Serve Pylons' stock images""" + return self._serve_file(os.path.join(media_path, 'img', id)) + + def style(self, id): + """Serve Pylons' stock stylesheets""" + return self._serve_file(os.path.join(media_path, 'style', id)) + + def _serve_file(self, path): + """Call Paste's FileApp (a WSGI application) to serve the file + at the specified path + """ + fapp = paste.fileapp.FileApp(path) + return fapp(request.environ, self.start_response) diff --git a/trunk/yolanda/controllers/error.pyc b/trunk/yolanda/controllers/error.pyc new file mode 100644 index 0000000..56fc2c5 Binary files /dev/null and b/trunk/yolanda/controllers/error.pyc differ diff --git a/trunk/yolanda/controllers/index.py b/trunk/yolanda/controllers/index.py new file mode 100644 index 0000000..977b0cf --- /dev/null +++ b/trunk/yolanda/controllers/index.py @@ -0,0 +1,10 @@ +import logging + +from yolanda.lib.base import * + +log = logging.getLogger(__name__) + +class IndexController(BaseController): + + def index(self): + return render('/xhtml/index.mako') diff --git a/trunk/yolanda/controllers/index.pyc b/trunk/yolanda/controllers/index.pyc new file mode 100644 index 0000000..9f4b9f0 Binary files /dev/null and b/trunk/yolanda/controllers/index.pyc differ diff --git a/trunk/yolanda/controllers/search.py b/trunk/yolanda/controllers/search.py new file mode 100644 index 0000000..3981ae4 --- /dev/null +++ b/trunk/yolanda/controllers/search.py @@ -0,0 +1,31 @@ +import logging + +from yolanda.lib.base import * + +log = logging.getLogger(__name__) + +class SearchController(BaseController): + + def results(self): + + # maybe c.query could / should be a dictionary ? + c.query = request.params['query'] + + # c.results dummy + c.results = [ + {'title': 'foobar', 'id': '23' , 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'blablupp', 'id': '42', 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'uiae nrdt', 'id': '555' , 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'uiaenrtd uiaenrtd uiaenrdt', 'id': '666666666', 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'foobar', 'id': '23' , 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'blablupp', 'id': '42', 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'James Bond drives a bulletproof Aston Martin !!!', 'id': '555' , 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'uiaenrtd uiaenrtd uiaenrdt uiaenrtd uiaenrtd', 'id': '666666666', 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'foobar', 'id': '123' , 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'blablupp', 'id': '42', 'thumbnail': h.url_for('/images/404.png')}, + {'title': 'lolwtf hax !!!11', 'id': '9001', 'thumbnail': h.url_for('/images/404.png')} + ] + + return render('/xhtml/results.mako') + # return request.params['query'] + # return h.form(h.url(action='search'), method='get') diff --git a/trunk/yolanda/controllers/search.pyc b/trunk/yolanda/controllers/search.pyc new file mode 100644 index 0000000..2a1c40c Binary files /dev/null and b/trunk/yolanda/controllers/search.pyc differ diff --git a/trunk/yolanda/controllers/template.py b/trunk/yolanda/controllers/template.py new file mode 100644 index 0000000..95a39b3 --- /dev/null +++ b/trunk/yolanda/controllers/template.py @@ -0,0 +1,27 @@ +from yolanda.lib.base import * + +class TemplateController(BaseController): + + def view(self, url): + """By default, the final controller tried to fulfill the request + when no other routes match. It may be used to display a template + when all else fails, e.g.:: + + def view(self, url): + return render('/%s' % url) + + Or if you're using Mako and want to explicitly send a 404 (Not + Found) response code when the requested template doesn't exist:: + + import mako.exceptions + + def view(self, url): + try: + return render('/%s' % url) + except mako.exceptions.TopLevelLookupException: + abort(404) + + By default this controller aborts the request with a 404 (Not + Found) + """ + abort(404) diff --git a/trunk/yolanda/controllers/template.pyc b/trunk/yolanda/controllers/template.pyc new file mode 100644 index 0000000..a6dae5d Binary files /dev/null and b/trunk/yolanda/controllers/template.pyc differ diff --git a/trunk/yolanda/controllers/video.py b/trunk/yolanda/controllers/video.py new file mode 100644 index 0000000..8697bda --- /dev/null +++ b/trunk/yolanda/controllers/video.py @@ -0,0 +1,14 @@ +import logging + +from yolanda.lib.base import * + +log = logging.getLogger(__name__) + +class VideoController(BaseController): + + def index(self): + return 'show a video html page' + + def file(self): + return 'serve video' + diff --git a/trunk/yolanda/controllers/video.pyc b/trunk/yolanda/controllers/video.pyc new file mode 100644 index 0000000..546ab92 Binary files /dev/null and b/trunk/yolanda/controllers/video.pyc differ diff --git a/trunk/yolanda/lib/__init__.py b/trunk/yolanda/lib/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/trunk/yolanda/lib/__init__.pyc b/trunk/yolanda/lib/__init__.pyc new file mode 100644 index 0000000..efb5800 Binary files /dev/null and b/trunk/yolanda/lib/__init__.pyc differ diff --git a/trunk/yolanda/lib/app_globals.py b/trunk/yolanda/lib/app_globals.py new file mode 100644 index 0000000..7f7585f --- /dev/null +++ b/trunk/yolanda/lib/app_globals.py @@ -0,0 +1,14 @@ +"""The application's Globals object""" +from pylons import config + +class Globals(object): + """Globals acts as a container for objects available throughout the + life of the application + """ + + def __init__(self): + """One instance of Globals is created during application + initialization and is available during requests via the 'g' + variable + """ + pass diff --git a/trunk/yolanda/lib/app_globals.pyc b/trunk/yolanda/lib/app_globals.pyc new file mode 100644 index 0000000..2fa766c Binary files /dev/null and b/trunk/yolanda/lib/app_globals.pyc differ diff --git a/trunk/yolanda/lib/base.py b/trunk/yolanda/lib/base.py new file mode 100644 index 0000000..5beaf03 --- /dev/null +++ b/trunk/yolanda/lib/base.py @@ -0,0 +1,27 @@ +"""The base Controller API + +Provides the BaseController class for subclassing, and other objects +utilized by Controllers. +""" +from pylons import c, cache, config, g, request, response, session +from pylons.controllers import WSGIController +from pylons.controllers.util import abort, etag_cache, redirect_to +from pylons.decorators import jsonify, validate +from pylons.i18n import _, ungettext, N_ +from pylons.templating import render + +import yolanda.lib.helpers as h +import yolanda.model as model + +class BaseController(WSGIController): + + def __call__(self, environ, start_response): + """Invoke the Controller""" + # WSGIController.__call__ dispatches to the Controller method + # the request is routed to. This routing information is + # available in environ['pylons.routes_dict'] + return WSGIController.__call__(self, environ, start_response) + +# Include the '_' function in the public names +__all__ = [__name for __name in locals().keys() if not __name.startswith('_') \ + or __name == '_'] diff --git a/trunk/yolanda/lib/base.pyc b/trunk/yolanda/lib/base.pyc new file mode 100644 index 0000000..a91d148 Binary files /dev/null and b/trunk/yolanda/lib/base.pyc differ diff --git a/trunk/yolanda/lib/helpers.py b/trunk/yolanda/lib/helpers.py new file mode 100644 index 0000000..0eb7c8f --- /dev/null +++ b/trunk/yolanda/lib/helpers.py @@ -0,0 +1,6 @@ +"""Helper functions + +Consists of functions to typically be used within templates, but also +available to Controllers. This module is available to both as 'h'. +""" +from webhelpers import * diff --git a/trunk/yolanda/lib/helpers.pyc b/trunk/yolanda/lib/helpers.pyc new file mode 100644 index 0000000..9b41f95 Binary files /dev/null and b/trunk/yolanda/lib/helpers.pyc differ diff --git a/trunk/yolanda/model/__init__.py b/trunk/yolanda/model/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/trunk/yolanda/model/__init__.pyc b/trunk/yolanda/model/__init__.pyc new file mode 100644 index 0000000..42753c6 Binary files /dev/null and b/trunk/yolanda/model/__init__.pyc differ diff --git a/trunk/yolanda/public/css/default.css b/trunk/yolanda/public/css/default.css new file mode 100644 index 0000000..f1a778b --- /dev/null +++ b/trunk/yolanda/public/css/default.css @@ -0,0 +1,97 @@ +/* reset */ +* +{ + margin: 0px; + padding: 0px; +} + +/* re/b/oot */ +body +{ + padding-bottom: 0.5em; + text-align: center; +} + +div +{ + background-color: #eeeeec; + color: black; + border: 1px solid black; + margin: 0.5em; + padding: 0.5em; +} + +form +{ + padding: 0.5em; +} + + form input + { + font-size: 1.2em; + width: 11em; + } + + form input[type="text"] + { + text-align: left; + } + +h1 +{ + font-size: 1.2em; + font-weight: normal; +} + +ol, ul[role="navigation"] +{ + list-style-position: inside; + list-style-type: none; +} + + ol#results + { + margin: 0.5em; + padding: 0.5em; + } + + ol#results li + { + display: inline-block; + padding: 0.5em; + vertical-align: top; + width: 227px; + } + + ol#results li img + { + border: 1px solid black; + } + + #antipixel li, #footer li + { + display: inline-block; + } + + #antipixel li + { + padding: 0.5em; + } + +#copyright +{ + background-color: #eeeeec; + clear: right; + color: black; + border: 1px solid black; + margin: 0.5em; + padding: 0.5em; + font-family: monospace; +} + +#heading-box, #search-box +{ + clear: right; + float: right; + width: 15em; +} diff --git a/trunk/yolanda/public/images/404.png b/trunk/yolanda/public/images/404.png new file mode 100644 index 0000000..22c3728 Binary files /dev/null and b/trunk/yolanda/public/images/404.png differ diff --git a/trunk/yolanda/templates/xhtml/base.mako b/trunk/yolanda/templates/xhtml/base.mako new file mode 100644 index 0000000..e9a16c9 --- /dev/null +++ b/trunk/yolanda/templates/xhtml/base.mako @@ -0,0 +1,90 @@ + + + + + + + + + + + + + Yolanda - ${self.title()} + + + + + + +
+

+ ${self.heading()} +

+
+ + + + ${self.body()} + + + + + + + + diff --git a/trunk/yolanda/templates/xhtml/index.mako b/trunk/yolanda/templates/xhtml/index.mako new file mode 100644 index 0000000..aaa1e6d --- /dev/null +++ b/trunk/yolanda/templates/xhtml/index.mako @@ -0,0 +1,11 @@ +<%inherit file="base.mako"/> + +<%def name="title()"> + front page + + +<%def name="heading()"> + Welcome, youngling ! + + +LOL INDEX diff --git a/trunk/yolanda/templates/xhtml/results.mako b/trunk/yolanda/templates/xhtml/results.mako new file mode 100644 index 0000000..78e8639 --- /dev/null +++ b/trunk/yolanda/templates/xhtml/results.mako @@ -0,0 +1,27 @@ +<%inherit file="base.mako"/> + +<%def name="title()"> + results for "${c.query}" + + +<%def name="heading()"> + 9001 results for "${c.query}": + + +<%def name="results_listing(results)"> +
    + % for result in c.results: +
  1. + + thumbnail for "${result[ + +
    + + ${result['title']} + +
  2. + % endfor +
+ + +${results_listing(c.results)} diff --git a/trunk/yolanda/tests/__init__.py b/trunk/yolanda/tests/__init__.py new file mode 100644 index 0000000..91ff2e7 --- /dev/null +++ b/trunk/yolanda/tests/__init__.py @@ -0,0 +1,40 @@ +"""Pylons application test package + +When the test runner finds and executes tests within this directory, +this file will be loaded to setup the test environment. + +It registers the root directory of the project in sys.path and +pkg_resources, in case the project hasn't been installed with +setuptools. It also initializes the application via websetup (paster +setup-app) with the project's test.ini configuration file. +""" +import os +import sys +from unittest import TestCase + +import pkg_resources +import paste.fixture +import paste.script.appinstall +from paste.deploy import loadapp +from routes import url_for + +__all__ = ['url_for', 'TestController'] + +here_dir = os.path.dirname(os.path.abspath(__file__)) +conf_dir = os.path.dirname(os.path.dirname(here_dir)) + +sys.path.insert(0, conf_dir) +pkg_resources.working_set.add_entry(conf_dir) +pkg_resources.require('Paste') +pkg_resources.require('PasteScript') + +test_file = os.path.join(conf_dir, 'test.ini') +cmd = paste.script.appinstall.SetupCommand('setup-app') +cmd.run([test_file]) + +class TestController(TestCase): + + def __init__(self, *args, **kwargs): + wsgiapp = loadapp('config:test.ini', relative_to=conf_dir) + self.app = paste.fixture.TestApp(wsgiapp) + TestCase.__init__(self, *args, **kwargs) diff --git a/trunk/yolanda/tests/functional/__init__.py b/trunk/yolanda/tests/functional/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/trunk/yolanda/tests/functional/test_account.py b/trunk/yolanda/tests/functional/test_account.py new file mode 100644 index 0000000..e2f5953 --- /dev/null +++ b/trunk/yolanda/tests/functional/test_account.py @@ -0,0 +1,7 @@ +from yolanda.tests import * + +class TestAccountController(TestController): + + def test_index(self): + response = self.app.get(url_for(controller='account')) + # Test response... diff --git a/trunk/yolanda/tests/functional/test_index.py b/trunk/yolanda/tests/functional/test_index.py new file mode 100644 index 0000000..b8838bd --- /dev/null +++ b/trunk/yolanda/tests/functional/test_index.py @@ -0,0 +1,7 @@ +from yolanda.tests import * + +class TestIndexController(TestController): + + def test_index(self): + response = self.app.get(url_for(controller='index')) + # Test response... diff --git a/trunk/yolanda/tests/functional/test_search.py b/trunk/yolanda/tests/functional/test_search.py new file mode 100644 index 0000000..6a9df42 --- /dev/null +++ b/trunk/yolanda/tests/functional/test_search.py @@ -0,0 +1,7 @@ +from yolanda.tests import * + +class TestSearchController(TestController): + + def test_index(self): + response = self.app.get(url_for(controller='search')) + # Test response... diff --git a/trunk/yolanda/tests/functional/test_video.py b/trunk/yolanda/tests/functional/test_video.py new file mode 100644 index 0000000..4a2040d --- /dev/null +++ b/trunk/yolanda/tests/functional/test_video.py @@ -0,0 +1,7 @@ +from yolanda.tests import * + +class TestVideoController(TestController): + + def test_index(self): + response = self.app.get(url_for(controller='video')) + # Test response... diff --git a/trunk/yolanda/tests/test_models.py b/trunk/yolanda/tests/test_models.py new file mode 100644 index 0000000..e69de29 diff --git a/trunk/yolanda/websetup.py b/trunk/yolanda/websetup.py new file mode 100644 index 0000000..012683e --- /dev/null +++ b/trunk/yolanda/websetup.py @@ -0,0 +1,14 @@ +"""Setup the Yolanda application""" +import logging + +from paste.deploy import appconfig +from pylons import config + +from yolanda.config.environment import load_environment + +log = logging.getLogger(__name__) + +def setup_config(command, filename, section, vars): + """Place any commands to setup yolanda here""" + conf = appconfig('config:' + filename) + load_environment(conf.global_conf, conf.local_conf)