8👍
Question 1: static HTML files should work finely (unless you plan to use HAML’s ruby evaluation feature to dynamically content). I use a similar way on a php website with SASS stylesheets. Just make sure you start HAML in directory watch mode before starting to hack 😉
Question 2: while forking a ruby process to create HTML code is possible, but I don’t recommend it you, because initializing a ruby interpreter, and loading required files takes a lot of cpu times, so you better stick with static files. If you need the ruby evaluation feature to include runtime created data into the document, you’d better have a look at eventmachine, and make it a server (so your Django application can connect to it, and request HTML generation, without forking a new interpreter each time).
Question 3: maybe this is the hardest. There’s GHRML which is abandoned; SHPAML which only implements a small subset of HAML, DMSL which is currently very experimental, but already supports most of HAML and also calling python code, but lacks Markdown or Textile support. But apparently there’s no alternative (yet) to Ruby HAML that supports all the required features.
- How to show more than 100 items on each paginated "Change List" page in Django Admin?
- Django REST Framework Swagger 2.0
- Django order_by a property
- TimeField format in Django template
- You cannot add messages without installing django.contrib.messages.middleware.MessageMiddleware
1👍
I strongly recommend that you do not fork any processes out of your django views, because the overhead is significant.
You should have a persistent ruby process to serve your templates for you, and invoke it from your django code. I leave the IPC technology to you, but the obvious choices would either be some kind of message queuing technology, or speaking HTTP over a socket to the ruby process.
- Using existing field values in django update query
- Celery beat not picking up periodic tasks
- Django admin dropdown of 1000s of users
0👍
While this could end up being more trouble than it is worth, it is PROBABLY possible to leverage the Java or .NET platform and still run your Django application in Jython or IronPython (with some minor adjustments I’m sure) and also be able to leverage Ruby’s HAML gem via jRuby or IronRuby.
I’m sure there will be some quirks in getting this to work, but I’m sure it would be possible.
Again, this is probably a lot more trouble than it’s worth (considering that you’d have to move your application to a completely new platform), but it would be a pretty fun project to work on.
- Django unable to find MySQLdb python module
- Django prefetch_related's Prefetch, order_by?
- Django forms give: Select a valid choice. That choice is not one of the available choices
- Django Newsletter App
- Django reverse error: NoReverseMatch