Пример #1
0
 def __init__(self):
     """
     The basic underlying plugin mechanism does not work in vhost situation where everything sits in the same basic namespace.
     The final trick was to update the module global mapping in jsDeps with my collections.
     """
     self.Clients = {}
     l_siteJSPackage = athena.AutoJSPackage(jspath)
     _l_siteCSSPackage = athena.AutoCSSPackage(csspath)
     #  LOG.warn('CSS - {}'.format(_l_siteCSSPackage))
     athena.jsDeps.mapping.update(l_siteJSPackage.mapping)
Пример #2
0
    def testPackage(self):
        baseDir = util.sibpath(__file__, 'test_package')
        package = athena.AutoJSPackage(baseDir)

        def _f(*sib):
            return os.path.join(baseDir, *sib)

        expected = {u'Foo': _f('Foo', '__init__.js'),
                    u'Foo.Bar': _f('Foo', 'Bar.js'),
                    u'Foo.Baz': util.sibpath(athena.__file__, 'empty.js'),
                    u'Foo.Baz.Quux': _f('Foo', 'Baz', 'Quux.js')}

        for module, path in expected.iteritems():
            self.assertIn(module, package.mapping)
            self.assertEquals(package.mapping[module], path)
Пример #3
0
from twisted.python import filepath
from nevow import athena

import methanal

js = filepath.FilePath(methanal.__file__).parent().child('js')
package = athena.AutoJSPackage(js.path)
Пример #4
0
from twisted.python import util

from nevow import athena

import nevow

nevowCSSPkg = athena.AutoCSSPackage(util.sibpath(nevow.__file__, 'css'))
nevowPkg = athena.AutoJSPackage(util.sibpath(nevow.__file__, 'js'))
Пример #5
0
from twisted.python import util

from nevow import athena

import echothing

chatthingPkg = athena.AutoJSPackage(util.sibpath(echothing.__file__, 'js'))
Пример #6
0
"""
Created on Jun 27, 2013

@author: briank

This must be installed under newow/plugins - see PyHouse/install/install_files for location

for Linux:
    cp ~/workspace/PyHouse/src/plugins/nevow/plugins/pyhouse_location.py   /usr/local/lib/python2.7/site-packages/nevow/plugins/pyhouse_location.py

for win 7:
    cp ~/Documents/GitHub/PyHouse/src/plugins/nevow/plugins/pyhouse_location.py   /c/Python27/lib/site-packages/nevow/plugins/pyhouse_location.py

"""
from twisted.python import util
from nevow import athena
import PyHouse
#import PyHouse.src

pyhouseJsPackage = athena.AutoJSPackage(
    util.sibpath(PyHouse.__file__, 'src/web/js'))
pyhouseCssPackage = athena.AutoCSSPackage(
    util.sibpath(PyHouse.__file__, 'src/web/css'))

# ## END DBK
Пример #7
0
import os

from nevow import athena

from webby import RESOURCE

webbyPkg = athena.AutoJSPackage(RESOURCE('static'))
Пример #8
0
from twisted.python import util

from nevow import athena

import xmantissa

mantissaPkg = athena.AutoJSPackage(util.sibpath(xmantissa.__file__, 'js'))
Пример #9
0
from twisted.python import filepath

from nevow import athena

import hyperbola

hyperbolaJS = athena.AutoJSPackage(
    filepath.FilePath(hyperbola.__file__).parent().child('js').path)
from twisted.python import filepath
from nevow import athena

import xquotient
quotient = athena.AutoJSPackage(filepath.FilePath(xquotient.__file__).parent().child('js').path)