Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make CoffeeKup views available in client side scripts #87

Open
jacobrask opened this issue Sep 23, 2011 · 2 comments
Open

Make CoffeeKup views available in client side scripts #87

jacobrask opened this issue Sep 23, 2011 · 2 comments

Comments

@jacobrask
Copy link

It would be nice to have your CoffeKup views (or at least CoffeeKup in some easy way) available in client side scripts.

My first obvious idea is to auto-compile all views to a template.js file, and serve CoffeeKup as /zappa/coffeekup.js, but maybe it can be done in better way.

As far as I can tell there's currently no easy/shortcut way to use client side CoffeeKup templates in Zappa.

@hickford
Copy link

hickford commented Nov 2, 2011

Right. Let me give an example why this would be a Good Thing. I have a microblogging app. Posts are rendered at two times. The server renders posts in a http handler. The client renders posts in a socket handler (providing real-time updates). Presently the server calls a @view—a CoffeeKup template—with partial. Whereas the client socket handler renders posts with jQuery.

In accordance with Don't Repeat Yourself I want to use same code to render the posts on the server and client. Zappa is probably the first framework where this could be possible.

@Darcbar
Copy link

Darcbar commented Mar 25, 2013

+1 this would be an awesome feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants