I recently switched a project back to Django after some time playing with Rails.
One of the biggest attractions of Rails is the asset pipeline, but splitting the project and building the front-end with Ember-CLI takes away that advantage, leaving Django far ahead (IMO) with its cleaner ORM, less magical module importing, and Python's indented syntax.
I'd love to hear about your experiences with building APIs for single-page-apps between Rails and Django. Were you using rails-api or just straight-up Rails? Is there an equivalent API-focused "flavor" of Django, or if not, to what extent did you find it easy to choose not to use server-rendering functionality? I've used Django for more standard apps, and Rails for both, but I'm curious about the pros and cons of using Django for this sort of thing, because I have no experience with it.
Django REST Framework is the the most popular way to build APIs with Django. Lot of neat features out of the box such as throttling and permissions make it easy to build API endpoints.
I'm still new to building APIs with Django. Last time I was immersed in Django, I was focused on server-side rendering.
I forgot to mention, part of the reason I went to Rails is its built-in support for building JSON APIs (at the time there was no clear winner among the Django API frameworks).
But now Django Rest Framework has matured quite well. By deriving everything from the model layer, it can help keep your API code nice and DRY.
I'm genuinely curious, have you tried one of the asset-pipeline apps for django? I found django-pipeline actually not that bad, even though I have been recently leaning towards using front-end tools (gulp/browserify) anyway.
I have not. For the front-end I'm using Ember, and Ember-CLI takes care of Emblem templates, Sass, and CoffeeScript, plus breaking code up into ES6 modules. Eventually they plan to require using it in order to get all of the features of Ember.
I was using Jammit (ruby) for assets but recently switch the django-pipeline and it is working well. For front end apps, I use Grunt.js because I am to lazy to upgrade to something new
I recently switched a project back to Django after some time playing with Rails.
One of the biggest attractions of Rails is the asset pipeline, but splitting the project and building the front-end with Ember-CLI takes away that advantage, leaving Django far ahead (IMO) with its cleaner ORM, less magical module importing, and Python's indented syntax.