4 ms·
As a long time Django user (first project on 1.1) I want to thank for a great framework and your wonderful release approach! I often try out new new web dev pl
by simonpantzare 11y ago
As a long time Django user (first project on 1.1) I want to thank for a great framework and your wonderful release approach!
I often try out new new web dev platforms and frameworks but tend to rewrite projects that get too serious or large in Django, or when I'm starting to miss too many features.
If I know that I am building something that others are going to work on, or if I know that the project will need to be maintained for a considerable amount of time, I tend to go with Django and a few familiar libraries (Celery, Django REST framework, django-extensions) right off the bat, as I feel comfortable that we won't run into issues where some important dependency becomes unmaintained or introduces backwards-incompatible changes. Much thanks to Django's predictable and well thought out releases.
Further, when I pick Django, I know that there is good support in monitoring and crash report systems such as Sentry, New Relic, and others. So that's one less thing to worry about.
The only area where I have started to use other solutions is frontend dev, as I find that the momentum in the Node community is so much higher in this area. I only wish that the Node community wasn't as fragmented and had a more long-term view on releases.
- iyn 11y agoCan you elaborate on the solutions in frontend? Currently I'm working on a project and I want to use React "the right way". While it's not so hard to just integrate React into Django project, it's not so easy to manage the chaos when things start to grow. At the moment I'm trying to integrate React, webpack, gulp and node (server side rendering for react) into Django workflow and make it work "natural", but right now it just feels hacky and not the way I want it to work. Would be great if you could share your workflows & ideas.
- anewhnaccount 11y agoI've not done it myself (I've looked but it was a small project so I just ignored server side rendering and used django-compressor for convienience's sake) but you should definitely check https://github.com/markfinger/python-react https://github.com/markfinger/python-react if you haven't already
- rattray 11y agoI'm in the planning phase of porting a large C# application's frontend to React on Node (for isomorphism). Basically we'll have our main application server (in this case, .net mvc api, but think django-rest-framework) talk to a node server as well as the client, with the same REST api. The plus is very real separation of concerns (django does all data handling, business logic; javascript does all UI). The downside is having two server stacks. FWIW, I'm planning to use nuclear-js[1] for flux. And we're considering porting our .net code to django. [1] https://github.com/optimizely/nuclear-js https://github.com/optimizely/nuclear-js
- simonpantzare 11y agoI put nginx in front and a location /static/ block with a try_files directive that first tries to serve static files from Django (those collected with python manage.py collectstatic) and falls back to serve files that a gulp task generated. To serve different assets in dev and prod I let gulp generate a manifest and have a custom template tag in Django that expands to different paths depending on settings.DEBUG: {% my_static 'css/all.css' %} expands to either /static/css/all.css or something like /static/css/all.min.abcd1234.css. If nginx is serving a minified, hashed path it adds a Cache-Control: max-age=31556926 header to the response.
- Herbert2 11y agoSimplest solution I've found is to run the devserver in a gulp task instead of using any of the pipeline/compressor projects.
- robertfw 11y agoMy current app stack is a React+fluxxor frontend consuming a django-rest-framework driven API. The frontend/backend live in the same repo for simplicity, but are otherwise separate projects in their own subpaths that share nothing. For deployment, I have the root path serve up the client, while the API is on its own subdomain.