8 ms·
Django 2.0 alpha
- claudiug 9y agoHow a rails/ruby buy should start with python/django?
- est 9y agoYou don't. Web framework these days are irrelevant IMHO. There are no land-sliding advantages between frameworks. Pick up what you most familiar with, get job done ASAP.
- dethos 9y agoI must agree with you. Between these 2 frameworks, even though they have their differences (and lots of them), they are mostly equivalent. My recommendation these days goes like this: If you are more familiar or prefer Python use Django. If Ruby is your thing, go with rails. Of course this rule has its own exceptions.
- cies 9y agoDisagree. Choose wisely, which means sometimes a FW you're not familiar with (but has some features that fit well with your problem/domain). Like strong typing (Haskell), or actor model (Erlang/Elixir), or extreme speed/efficiency (compiled languages), or a "better JS" (Elm/PureScript/ReasomML). > get job done ASAP. But having maintainable/hackable/refactorable code is really nice too! IMHO, nowadays PhpWithFrameworkOfChoice+jQuery is not a very defendable choice for a greenfield "SPA".
- unoti 9y agoTwo answers for you: 1) don't-- instead learn about making single page apps on the front end using React and Redux, or perhaps Angular 2. Then write a REST backend in either Node, Go, Python, or C#. Or go serverless and write the backend in Firebase. 2) if you really do want to do Django, start by doing the default tutorial that focuses on building something in the admin interface. Coming from a rails background you are on somewhat similar ground.
- orf 9y agoDjango is an excellent choice for writing a REST backend though.
- code_chimp 9y agoIt definitely can be, but for myself I find it easier to use Flask for that particular case.
- poisonborz 9y ago1) -> Yeah sure. Without knowing what the project is about, this approach will surely cover all bases. /s
- unoti 9y agoI've already put about 10x the effort (based on character count) into answering the question than the person put into asking it. I wasn't actually attempting to cover all the bases; that'd be a few books and blog articles. If the goal is to learn Django, then the basic tutorial is a great place to start, especially for a Rails engineer. If the goal is to build something from scratch in 2017, Django is probably not good choice for someone that's already a Rails expert. Django would be a great way to set up an admin interface and rapidly get a CRUD interface going for an app of 20+ inter-related tables going. But the OP is already a Rails engineer, and in the modern world they're not going to be gaining much. Django is indeed a nice way to make REST backends, but so is Rails. If the idea is to learn something new for an existing Rails engineer, then single page apps are a good choice or some other way to make backends (such as Flask) would be a superior investment of time.
- spapas82 9y agoAnswer 1) is plain wrong. I don't think that more than 10% of all web applications will benefit from SPAs. Your recommendation stands only for valley companies that have money to burn. For example, in my industry (I work on the public sector) SPAs are never needed. Good old traditional request/response web apps, maybe with a little jquery on top to make things more responsive or add some advanced controls (autocompletes, keywords etc) are perfect for the job. An experienced django developer can create a full traditional multi-user CRUD web app in a couple of hours. You'll just create the models and a couple of CBVs and everything else will be auto-created (but not magically created) through django-forms, django-filters and django-tables2. Now, how much time would you need to duplicate this functionality with an SPA? As I said, if you have money to burn then this is the way to go - on other cases, just use Django.
- i_am_nomad 9y agoThe tutorial on the Django.org site is quite excellent. You'll also want to learn a few important extensions, like django-extra-views and djcelery.
- fancy_pantser 9y ago> Previous versions of Celery required a separate library to work with Django, but since 3.1 this is no longer the case. Source: http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html http://docs.celeryproject.org/en/latest/django/first-steps-w...
- spapas82 9y agoDjango has a great ecosystem of addon packages covering all your needs: Here's a nice grid of all these packages: https://djangopackages.org/ https://djangopackages.org/ And a list of packages I use on (almost) all my projects: * django-filter * django-tables-2 * django-auth-ldap * django-reversion * django-compressor * django-crispy-forms * django-autocomplete-light * django-extensions * django-rq * django-taggit * django-rest-framework (if REST API is needed) I always wanted to write a blog post about these packages but never have been able to find the time :/
- tonyedgecombe 9y agoI've been impressed with all of the Django documentation.
- phasnox 9y agoThe best way to get to a new scripting language/framework is by doing. In spanish we have a term for this: "Hacer camino al andar", which translates to "By walking you make a path". Grab a small project(like a todo list), modify it and try to enhance it. I guarantee you will learn more from this than a thousand tutorials.
- Doman 9y agoReally nice tutorial is being made here: https://simpleisbetterthancomplex.com/series/beginners-guide/1.11/ https://simpleisbetterthancomplex.com/series/beginners-guide... Author uses recent version of Python and Django and is building with You something useful.
- obilgic 9y agoCan someone who uses Django, review this release? What are the most anticipated changes etc?
- keganunderwood 9y agoNot an expert by any means but to me the biggest change is no more Python 2. > Django 2.0 supports Python 3.4, 3.5, and 3.6. We highly recommend and only officially support the latest release of each series. People should not write new code in Python 2 at all. If you're learning Python today, I'd say pretend Python 2 doesn't exist. Use python3-venv and renounce the baggage of the past.
- zmix 9y agoEasy, easy! You're walking dangerous territories here. ;)
- gt_ 9y agoDoing VFX pipeline dev here and none of the softwares support 3 yet. Houdini/3ds Max/Maya are all 2.7 only. I have not even seen mention of moving to 3.
- aaossa 9y agoWell, they still have arount 2.5 years of support (https://pythonclock.org/ https://pythonclock.org/)
- boterock 9y agoBlender supports Python 3... time to move to blender I guess =P
- ubernostrum 9y agoWhat are they planning to do when the support for Python 2 runs out and people remind them they had a decade in which to start a port but didn't?
- 9y ago
- tiagocorrea 9y agoHow smooth is to upgrade your app to every future release of Django? Starter here, on Python and then Django.
- leetrout 9y agoIn very broad terms it's not bad. The docs are great and they give specific advice for upgrades. With that said you may find many 3rd party apps / utils lagging. A couple libs I use still don't support new style middleware, for instance. With 2.0 dropping support for py2.7 this might cause more pain points for poorly maintained libs but all in all keeping up with Django releases is pretty straightforward and almost always worth it. Source: happily using Django since 2008.
- thijsvandien 9y agoIf you stick to LTS releases, you are guaranteed to be able to upgrade from one LTS to the next without breaking changes. There will only be deprecation warnings about the next LTS release.
- JackC 9y agoDitto leetrout: upgrading Django itself is easy, with great release notes, deprecation warnings, and long support windows for old versions. We always end up with a bunch of third party libraries, though, and those end up being upgrade blockers. A notable example recently was django-tastypie, which didn't cut a Django 1.10-compatible release for 11 months after it came out -- four months after Django 1.9 lost security support. So part of our Django 1.10 upgrade was moving to another REST framework. (If you don't want that kind of churn, sticking to LTS would make sense - I think 1.8 still has support.)
- gt_ 9y agoCan someone recommend a learning path for building Django sites/apps to someone who has no web dev experience but uses python for scripting and workstation utilities? In particular, I use python for VFX/CGI scripting.
- leetrout 9y agoI went from MEL scripting to Python to PHP to Python / Django. Coming from VFX will give you a different perspective compared to other compsci types IMO. Especially if you've worked with things procedurally. In the end with Django it's more than just Python but other than controlling ornery ORM generated SQL its pretty easy to work with on all fronts and has PHENOMENAL documentation. Hit me up I twitter @leetrout if you want to chat more.
- gt_ 9y agoThank you. I learned to code with C# in Unity. These things are what I am scared of.
- Scarbutt 9y agoLearn html, css and some basic HTTP, the read the Django docs.
- spapas82 9y agoStart with the django-tutorial. Always start with the tutorial no matter what else they tell you. The django tutorial is excellent and cover most basics: https://docs.djangoproject.com/en/1.11/intro/tutorial01/ https://docs.djangoproject.com/en/1.11/intro/tutorial01/ Then start writing your own application. When you have questions read the django documentantion. The django docs are the best documentantion I've ever seen, they are better than most books about django and should answer all your questions. The docs are so good I recommend reading them from start to finish - i.e download this off line version of the docs: https://media.readthedocs.org/pdf/django/1.11.x/django.pdf https://media.readthedocs.org/pdf/django/1.11.x/django.pdf and read it from cover to cover. You will not regret it.
- 9y ago
- nickstefan12 9y agoIf anyone wants to see "Database level -- on delete cascade", here's my PR to Django that's been open since July/August: https://github.com/django/django/pull/8661 https://github.com/django/django/pull/8661
- cjbprime 9y agoNothing against your PR, but the default cascade-on-delete behavior is my least favorite thing about Django. :(
- nickstefan12 9y agoYou don't like that models.CASCADE fakes it with extra requests to the Db? Or you don't like that the default is models.CASCADE instead of something like models.DO_NOTHING? There's talk of making the on_delete kwarg required. In that world there would be no default :).
- sdfjkl 9y agoHmm, I haven't done much with Django in a while, but for a major version this seems a bit... underwhelming.
- brianwawok 9y agoDropping python2 is a pretty big feature alone.
- vegbrasil 9y agoI started learning Django yesterday and now I'm not sure if I should just skip to the 2.0 alpha instead of learning the current stable version.
- sunnyP 9y agoI would go with the current version and be aware of the deprecated features in 2.0. https://docs.djangoproject.com/en/dev/releases/2.0/?hnews#features-deprecated-in-2-0 https://docs.djangoproject.com/en/dev/releases/2.0/?hnews#fe...
- huxley 9y agoI wouldn't worry that much about it, the differences between Django 1.11 and Django 2.0 aren't major ones with the exception of dropping support for Python 2.x and the new simplified URL routing syntax. Django 1.11 is a LTS (Long Term Support) release so it will have security upgrades until 2020, so you are safe sticking with it. However I'd go ahead with 1.11 and transition to 2.0 to learn how Django handles deprecation and how to upgrade a codebase, both very useful skills as Django has a steady release process and it's often easier to track Django than to do a multi-version migration.
- debuggerpk 9y agoas long as you are using python 3, you shouldn't worry.
- nnain 9y agoSome highlights from the pages: "This alpha milestone marks a complete feature freeze." "The current release schedule calls for a beta release in about a month and a release candidate about a month from then." "The Django 1.11.x series is the last to support Python 2.7."
- zaro 9y agoSo basically nothing new. Nothing about channels, ASGI or any async support which IMHO are way overdue to be included.
- cryptos 9y agoIt's a bit disappointing that Django doesn't emphasize REST more. I'm expecting that "classic" web application frameworks with templates rendered on the server (as long as they are not templates from a client-side framework rendered there for some optimization) are on their way out. And, to be honest, REST is not a strength of Django ...
- nicwolff 9y agoI'm expecting that REST APIs are on their way out ツ but what's wrong with the Django REST Framework?
- ric2b 9y agoWhy is that, are you thinking about GraphQL?
- mozumder 9y agoPretty sure client-side rendering will die first. The whole JavaScript framework thing is just a stopgap until HTML standardization fixes all its weaknesses.