32 ms·
Django 1.5 released
- Lightning 14y agoRelease notes: https://docs.djangoproject.com/en/1.5/releases/1.5/ https://docs.djangoproject.com/en/1.5/releases/1.5/
- niggler 14y agoSlightly OT: How does python2 and python3 usage numbers compare?
- askedrelic 14y agoAnecdotal: I wrote a Google Reader API library in Python 2 that I'm working on porting to Python 3 and it really hasn't been that bad. I had some HTTP dependancies on urllib/urllib2 but requests (with a py3 compatibility class) made it easy. The port was requested by someone looking to build an RSS feed reader or checker in Sublime Text 3, which using Python 3.3. Things are moving forward.
- speg 14y agoHey, that was me. Glad to hear it :)
- askedrelic 14y agoHowdy! I have a branch with all the tests working, just haven't made an official release yet. Hopefully very soon...
- lcc_tn 14y agoSo, I'll ask the noob question that has previously been getting asked to death but there's finally new reason to ask once more: someone who's had little to no prior experience with Django, and still is very much a novice with Python -- do you suggest they start using Django with Python 3 or 2?
- ttruett 14y agoThe tipping point is getting closer but I would still recommend Python 2.X for the time being, primarily for third party support.
- dmishe 14y agoI would say 2 because every package out there works with it, not the case with 3 still. So it will be easier for you to follow docs and tutorials. Plus, 2 is not going away in near future, and you'll be able to pick up 3 easily after that
- pydanny 14y agoPython 3 support in Django 1.5 is experimental. I would wait until Django 1.6 is launched or there are well-known, well-working examples of Python 3 implementations of Django on high traffic sites.
- jacobian 14y agoFWIW, that "experimental" label doesn't quite mean that 1.5 isn't ready for prime-time; it's more about setting community expectations. Please see my reply elsewhere in this thread (https://news.ycombinator.com/item?id=5289006 https://news.ycombinator.com/item?id=5289006) for more details. ETA: That said, the advice to stick to Py2 right now is probably good. There's still some key missing 3rd party packages, so you'll generally be happier as a Py2 user right now.
- pydanny 14y agoAlas, I replied before your post. I agree with you completely. I'm really looking forward to migrating a few projects up to Python 3 and Django 1.5. It's going to be awesome!
- raverbashing 14y agoPython 2 I really, really wanted to say to you Python 3, because: - It is better (it fixes some annoyances) - Django is working really great with it But some things (that Django uses, but are not Django) are not working yet. Things like MySQL adaptors, South, etc Or maybe go with Python 3 and wait for the issues to be fixed, they probably will, soon enough
- elicox 14y agoSorry for the Off topic, but anybody have a good experience with Appengine+Google Cloud SQL+Django?? I am thinking as alternative to AWS but I dont know if it's going to give me so much problems with the integration. Also a bit worry about the price in comparation with AWS. Anyone experience in both world?
- hucker 14y agoIt really depends on your usecase. I've been hosting simple Django-based websites for clients (think 500-1000 uniques a day) for some years, and couldn't be happier really. There has not been a single issue, and the prices for that kind of volume is laughably low ($2-4 a week). I would NOT do django + appengine for anything complex however, since in my experience getting everything to work together without banging your head too much requires a fairly standard Django-app. Last time I touched any of these sites other than to add security patches and the likes was 6 months ago, so it could be better/worse these days, YMMV.
- dudeofjude 14y agonot much experience but AFAIK cloud SQL is targeted for enterprise, and is far more costlier than say AWS.
- mbarlow 14y agoI have used both. I would strongly suggest going with AWS. Reasons: Local development with Appengine is pretty bad. Good luck debugging and profiling production issues. Appengine will make you jump through many hoops that undermine or completely drop pieces of the Django framework. Getting data out of Appengine is a huge nightmare and timesink. If you ever decide to migrate off Appengine you will need to rewrite almost everything.
- Ensorceled 14y agoThis was my experience as well. I wish I had that month back. I still have an app on GAE (the high availability version) mostly because I don't want to roll out my own HA Mongo DB. At some point it will become cost effective to do my own. The other AWS plus: when my response time skyrockets, I can figure it out and fix it.
- danso 14y ago> Django 1.5 introduces support for a configurable User model. The basic Django User model is still around, of course, but now there's first-class support for specifying your own model and having Django's auth system make use of it. I guess having it be a special User model is just part of the deal with Django's good out-of-the-box admin. I don't even remember how the various Rails plugins (ActiveAdmin, for example) generates the scaffolding needed for an authenticated user.
- endtime 14y agoNot just contrib.admin, but also contrib.auth. It's very easy to extend the existing user model rather than creating one from scratch. I had to do some unconventional auth stuff recently and I only extended auth.User slightly (and also wrote a slightly modified authentication backend).
- obviouslygreen 14y agoThis feature was something we'd hoped would be awesome; it's not. Going over the documentation shows there's some jaw-dropping nastiness you have to go through to make it work. It's good that they're providing it, but I think the complexity is going to turn people off (I know I won't be using it unless it's simplified at some point in the future). User profiles have always been used for adding data to User models indirectly, and I think this is probably going to remain the best way to handle it for most uses.
- jonknee 14y agoCan you expand on the "jaw-dropping nastiness you have to go through to make it work"? Seems pretty straightforward, though I have not tried to actually use it yet. https://docs.djangoproject.com/en/1.5/topics/auth/customizing/#auth-custom-user https://docs.djangoproject.com/en/1.5/topics/auth/customizin... It appears the database migration is the biggest hurdle, but I don't think there's a way around that. User profiles require a join and that can be suboptimal, which is why this is a useful addition. If you weren't running into problems before it's probably better to not change (though that's usually the case for working code).
- deleted 14y ago[deleted]
- bryanh 14y agoWonderful! I just want to extend a heartfelt "thank you" to all the guys and gals contributing to Django. Django is still a cornerstone of our startup and we're way past the point where folks have traditionally said "Django starts to constraint you". We've found that to be untrue. We love the templating, the ORM and all the built-in tools (not to mention 100s of libraries that get you an 80% finished feature in 5% of the time). I hope to meet a lot of you at Pycon, I'd be happy to buy you a beer. I'll be wearing the bright orange Zapier shirt, you can't miss me. :-)
- cookiecaper 14y agoI wonder if perhaps your people just don't have much exposure, because the templating in Django is awful compared to Mako/Jinja2, the ORM in Django is awful compared SQLAlchemy, and most of the useful features of Django are easily available in Pyramid or Flask, yet these systems are unobtrusive and simple. Django has a monstrous "middleware" piece and a bunch of other cruft that is really just bothersome dead weight. It's not that there's no use for it, it's just that similar things are accomplished in much more concise, fast ways in other frameworks. Not to hate on Django, jacobian, or the LJ-World, I appreciate the effort put into the system. But I don't think it really has much to offer in present-day for people developing new, serious platforms. I feel the same way about most other "full-fledged" MVC frameworks, because they all seem to far exceed what ought to be the logical bounds of their influence. In many cases you feel like you're writing Django, Cake, or Rails and not writing the actual language based on, because these frameworks mandate so much and require special integration to do much of anything. In something like Pyramid, you write Python, and Pyramid provides the pieces that make it easy to bundle together and publish as a website. I've had positive experiences with Sinatra, too. "Microframeworks" and close cousins like Pyramid are really much more appropriate dev platforms, imo: modular, unpretentious, exist simply to help you get your program onto the web in a fast, concise, and simple way, without attempting to inject a rewrite of the standard lib or force you to conform to their unique flavor of MVC, their crappy ORM, etc.
- tonyblundell 14y agoThe full-fledged-ness, mandates and influence that you complain about are actually plus-points for some.
- Spiritus 14y agoThere's a lot of hype around the new configurable User module. But personally the new verbatim template tag is golden: https://docs.djangoproject.com/en/dev/ref/templates/builtins/#std:templatetag-verbatim https://docs.djangoproject.com/en/dev/ref/templates/builtins...
- jonknee 14y agoIt is, but was an easy addition before. If you needed a configurable user module before you were up the creek.
- message 14y agoDjango 1.5 unchained
- Ensorceled 14y agoI hate that movie. I've never seen it but now it's the first page of search about half the time when I'm googling development issues with the real Django :-)
- danso 14y agoMaybe it's Google Search biasing towards me (or at least my IP address), but Django, the framework, should be proud that it's keeping the top rank for that search term despite the buzz around Django, the movie (which, even though I love QT, was a pretty sloppy movie, IMO). The real loser is Django Reindhardt, who Adrian Holovaty named the framework after, and is now bumped off the first page of Google results. http://en.wikipedia.org/wiki/Django_(web_framework)#History http://en.wikipedia.org/wiki/Django_(web_framework)#History
- bradbeattie 14y agoIn fairness, there were a lot of other things named Django before the web framework came long: http://en.wikipedia.org/wiki/Django_(disambiguation) http://en.wikipedia.org/wiki/Django_(disambiguation)
- barbs 14y agoDargh...beat me to it! :)
- kmfrk 14y agoLooking forward to see if there'll be any SQL query improvements after I play around with the new User model and improved object fetching.
- awolf 14y ago>Django 1.5 is the first Django release with support for Python 3 (specifically, Python 3.2 and newer). That sentence is of course followed by caveats about Python 3 support being experimental at this stage, but all-in-all I think this is a sign that we are finally at the tipping point for Python 3 to start gaining mainstream usage. Thank you Django community for moving the ball forward for everyone.
- jacobian 14y agoFYI, the "experimental" thing is a community thing, not really a technical judgement. Since this is our first Python 3 release, we want to have some space to make changes between 1.5 and 1.6 that we otherwise would avoid because of our strong backwards compatibility promise. The "experimental" label is about giving ourselves that room and not surprising users if there do have to be changes in the way Py3 support works between 1.5 and 1.6. Technically, however, it's pretty rock-solid. I'll be launching a site built on Py3/1.5 is about two weeks, and aside from constantly forgetting to `print(...)` instead of `print ...` it's been surprisingly smooth sailing.
- sigzero 14y agoThat is great to hear. I am learning with Py3 and would love to use Django with it.
- deleted 14y ago[deleted]
- SoftwareMaven 14y agoHave you found any of the third-party Django extensions to be catching up? I'm starting a new project and would love to just start with Python3, but there are a few packages I depend on: South, lxml, pytz, simplejson, requests, django-compressor, gunicorn, jinja2, twisted, txAMQP, and django-rest-framework (amongst some other utilities actually used for development). It would sure be great to have a list of django sub-projects and their Python3 status. Regardless, even if we start with Python2.7 and bump up to 3.3 in a few months, this is a great step!
- jezi22 14y agoIm new in django and i fell in love with it. nice update. :D
- djangoguy 14y agoI'm super excited about this release but I really, really envy the Russian Doll-caching through key-based expiration and the Turbolinks of the Rails 4 release. Man I really wish django would package all the JS magic Rails comes with.
- jimray 14y agoHot dog. I've been working on a small side project the past week or so using the 1.5 RC and following along the best practices recommended by 2 Scoops of Django -- https://django.2scoops.org https://django.2scoops.org If you haven't already, I highly, highly recommend picking up the 2 Scoops book. It's got some great, proscriptive advice and is an easy-to-follow roadmap that helps answer a lot of "what is the right way to do this?" kinds of questions. Setting up your settings files for multiple environments, using CBV's, understanding the new User Model features, writing tests, recommended 3rd party tools, securing your setup -- these things are all a lot more clear to me. And it's actually really well written, not just a bunch of recipes. Their explanation of mixins, for instance, is one of the clearest, most concise I've ever come across. Well worth $12 and a few hours of time to read through it.
- joshschreuder 14y agoThanks for posting about this book, I've been meaning to get into Django for a while, but I didn't find the official tutorial to be terribly enlightening beyond the basics. Plus there's a whole heap of non-code related environment stuff which I want to have best practice for too. If anyone knows of any other good first-up books / websites (are there any interactive tutorials Treehouse / Codecademy style?), please let me know.
- jimray 14y agoFair warning: 2 Scoops definitely assumes some familiarity with how Django works, specifically models, views, templates, and forms. It won't introduce these concepts to you but will help you use them better. The official Django Tutorial is still a great starting place for getting your head wrapped around that stuff -- https://docs.djangoproject.com/en/dev/intro/tutorial01/ https://docs.djangoproject.com/en/dev/intro/tutorial01/
- joshschreuder 14y agoThanks, I worked through the tutorial, so I know the basics I suppose. But I got to the end and wanted it to keep going, so I guess this book will come in handing for learning beyond the official tutorial. I'm also going to check out http://gettingstartedwithdjango.com http://gettingstartedwithdjango.com
- AUmrysh 14y agoI hope this isn't too difficult to upgrade to from 1.4 Also, I'd like to thank all of the Django contributors for their excellent work and for making my job easier!
- kmfrk 14y agoEasy to upgrade: hardly. Easy to migrate. weeell ... #django on FreeNode is pretty good, though.
- tazzy531 14y agoDoes anyone know what the status is on the non-rel branch? It's still on 1.3. What framework do other people using NoSQL data stores use?
- dits59 14y ago1.4 is work in progress https://github.com/django-nonrel/django-1.4 https://github.com/django-nonrel/django-1.4
- bryanh 14y agoIt is highly unusual to use NoSQL as the main data store in Django (so much of the built-in functionality requires relational databases, so you end up net-negative). Most Django folks augment their relational database with some NoSQL bits. We've been big fans of storing core data in Django models, but using things like key/value stores to store random extra bits that aren't exactly core to the model. Redis is great for this, or another model as triple store style GenericRelation if you need to query on it. I don't imagine the nonrel branch will move again, its such a departure from core Django. Look into using Flask, as there aren't many "mature" frameworks that do NoSQL core.
- lifeisstillgood 14y agoIs it just me, or is it simpler to go back to wsgi middleware plain and simple? I am getting turned off left right and centre by frameworks - Django and even Flask just make reasoning about the request/response more difficult. Maybe I don't know how to use this but ... It would take me three months to read the new Django docs. I am not a hater here, just wanting the simple life
- DeepDuh 14y agoI get this feeling about Django, but not about Flask. Its codebase is so lean I can read all the relevant parts in an hour when I want to get back into it. I don't even need docs for this thing. However, I understand what you mean about request / response, I don't like how this is handled in most python frameworks actually, it's usually too much abstracted away. The nicest (imperative) environment for asynchronous execution I've seen is Objective C/Cocoa for some reason. It has a way of showing you all the handles you might need, but it also makes it fairly obvious when and how these handles are called. Together with lambda support ('blocks') it's simple but effective. I think the main difference is enterprise + closed source + well documented environments vs. opensource + not so well documented environments often originating from someone's hobby. When it comes to big middleware frameworks I prefer the first, but small lean stuff such as Flask is just fine to use IMO. My advice is to not rely too much on the docs when you want to really know something - take a look at the source, it's all there.
- naiquevin 14y agoIt's great to see the Django tutorial extended to cover testing[1] and writing reusable apps[2]. These days there are quite a few Django tutorials out there covering best practices etc. (which are very good) but I would still recommend the official Poll app tutorial to any beginner because of it's simplicity. [1]: https://docs.djangoproject.com/en/1.5/intro/tutorial05/ https://docs.djangoproject.com/en/1.5/intro/tutorial05/ [2]: https://docs.djangoproject.com/en/1.5/intro/reusable-apps/ https://docs.djangoproject.com/en/1.5/intro/reusable-apps/
- mkhattab 14y agoUnit testing Django applications has been a source of pain for me. Writing functional or acceptances is ok using Django test client, although many recommend using WebTest, which is nice but slow if you're going to write hundreds of them.
- naiquevin 14y agoI agree about the slow running time of Django tests although I have found that using sqlite database backend for tests reduces the time significantly.
- wowzer 14y agoOn the Python 3 subject, I'd be highly interested in seeing if there any performance wins by switching your Django deployment to Python 3 over something like Python 2.7.
- tshepang 14y agoIf you go 3.3: * If you use decimal module, you will benefit from the serious speed improvements (http://docs.python.org/dev/whatsnew/3.3#decimal http://docs.python.org/dev/whatsnew/3.3#decimal). * The memory usage of strings is slightly lower (http://docs.python.org/3/whatsnew/3.3#performance-and-resource-usage http://docs.python.org/3/whatsnew/3.3#performance-and-resour...).
- mariuz 14y agoThe django-firebird (fdb driver) is now available for installing via pypi. Just run: pip install django-firebird https://pypi.python.org/pypi/django-firebird https://pypi.python.org/pypi/django-firebird It's developed for django 1.5+
- csense 14y agoWhat do Python frameworks like Django need to do to start taking market share from Rails?
- hekker 14y agoIncrease the price of cpu's and memory.
- deleted 14y ago[deleted]