-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/22/2014 08:53 AM, Achim Domma wrote:
> Service and UI will be served from the same domain, so that I don't
> have to care about cross domain access stuff like CORS. I would like
> to have the same for my development system, so I would have to
> "build" the Javasript files into my Pyramid project.
You don't necessarily need to have the front-end artifacts in the same
place. For instance, I've added a minimal Python stub to the JS/CSS
checkout for one project. It has a 'setup.py':
$ cd /path/to/frontend
$ cat setup.py
from setuptools import find_packages
from setuptools import setup
setup(name='frontend',
version="0.1",
description='Angular frontend',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
)
and an almost-empty Python package:
$ cat frontend/__init__.py
def includeme(config):
config.add_static_view(name='frontend', path='../src')
# Let other apps reuse our library aassets.
config.add_static_view(name='lib', path='../src/lib')
The Angular app is in 'src', and the external dependecies are in
'src/lib'.
I then pull in its static views via 'config.include("frontend")' in
my Pyramid app.
Tres.
- --
===================================================================
Tres Seaver
+1 540-429-0999 tse...@palladion.com
Palladion Software "Excellence by Design"
http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird -
http://www.enigmail.net/
iEYEARECAAYFAlNWi+IACgkQ+gerLs4ltQ7m/QCgrmgrPKwfcYzAhuWK3zjYQX32
qTgAoKiLrG23wOJLNuQgq4aC68vu6wuH
=rGSg
-----END PGP SIGNATURE-----