Re:Real-Time Django: Get Started with Django Channels
by ralmidani on Thursday March 17, 2016 @05:57PM
(#11307960)
Django has outgrown its humble beginnings. I am building a fairly sophisticated single-page business application using Django along with Django REST Framework, and have yet to run into a situation that made Django feel "crufty."
[ Parent
| on HN ]
Re:Real-Time Django: Get Started with Django Channels
by brianwawok on Thursday March 17, 2016 @10:38PM
(#11309489)
So as a Scala Play dev... Trying to get the user stuff to work with email as username and still work on the admin page? Super crufty.
Overall very good docs though :)
Re:Real-Time Django: Get Started with Django Channels
by zeemonkee3 on Friday March 18, 2016 @02:16AM
(#11310234)
That's not been an issue for several years (since Django 1.5(?) introduced custom user models). Drop in a custom admin form and you're done.
Re:Real-Time Django: Get Started with Django Channels
by brianwawok on Friday March 18, 2016 @08:45AM
(#11311365)
That is not true with current (1.9).
Drop in a custom user model and
a) Better be a brand new project at all
b) You need to muck with the user manager also
c) How do you fix up the admin module? I have yet to see a fully fixed up admin module for the custom user.
I am not a Django pro so happy to be proved wrong. But take a default app, and record all steps to make the user model work (including password reset, login, logout, admin page). If that doesn't feel crufty to you I am not sure what cruft is.
Re:Real-Time Django: Get Started with Django Channels
by zeemonkee3 on Friday March 18, 2016 @04:33PM
(#11314737)
Fair enough. Here's some code I wrote for a side project a couple of years ago - it was a side project, not meant for real world production, and it's a couple Django versions behind, so no guarantees as to quality, but should give you an idea:
https://github.com/danjac/ownblock/blob/master/ownblock/ownb...
Re:Real-Time Django: Get Started with Django Channels
by pbreit on Friday March 18, 2016 @01:28PM
(#11313363)
Not my experience either. And in 2016, email-as-username should be default and work flawlessly out of the box.
Re:Real-Time Django: Get Started with Django Channels
by dcgoss on Thursday March 17, 2016 @06:40PM
(#11308217)
Django REST Framework is excellent.
Re:Real-Time Django: Get Started with Django Channels
by karkucik on Friday March 18, 2016 @04:01AM
(#11310483)
And quite slow
Re:Real-Time Django: Get Started with Django Channels
by techdragon on Friday March 18, 2016 @08:25AM
(#11311267)
I can't even begin to imagine what your doing with it that makes you think it's slow.
Links or references to documented slowness?
Re:Real-Time Django: Get Started with Django Channels
by pbreit on Thursday March 17, 2016 @07:28PM
(#11308512)
Well, obviously an SPA would not run into any of the cruftiness since you're just using Django as a "dumb pipe" to the DB.
Re:Real-Time Django: Get Started with Django Channels
by mastazi on Thursday March 17, 2016 @08:42PM
(#11308976)
Not all SPAs are based on the DB+"dumb pipe"+SPA stack, sometimes you need to process things on the server, based on your business requirements and/or performance considerations. Sometimes the processing done in that layer can be quite significant. If that is your need, both Django itself (using JsonResponse and serialization objects) and Django REST Framework allow you to do so much more than dumb piping.