We love designing and developing websites, but what really drives us is solving problems and cultivating strong relationships with our clients
Django gotchas
By : shabda
This is announcement about our new work, Django Gotchas, a teeny tiny ebook about commonly occurring gotchas with Django. Here is the readme copied from the project.
Django-gotchas is a collections of gotchas which happen commonly when you are working with Django. They are some errors which I have made commonly or seen others do, these are not the errors which happen because they are hard to reason about, these are those errors which hapen when you close your eyes for a moment when coding.
This is still very much a work in progress, released in the spirit of release early, release often. Click here to get it, or fork it on Bitbucket
In Other news
- We have slightly updated the Django design patterns, though not the public website.
- cyrildoussin has done a lot of changes to Socialauth and made it much better. You can get it here . Thank! We will be merging this soon.
Comments
Reactions
Didn’t know that in 1.1 you don’t have to wrap template for loops in if’s anymore… just do a for on the .all {% for comments in post.comment_set.all %}
This comment was originally posted on Reddit
These don’t appear to be Django gotchas so much as Python gotchas.
This comment was originally posted on Reddit
#django gotchas #ebook: http://is.gd/4ToPc
This comment was originally posted on Twitter
> these are not the errors which happen because they are hard to reason > about, these are those errors which hapen when you close your eyes for a > moment when coding. I find I get gotcha’d more because that it doesn’t behave the way I’d expect it to based on my experience with other web frameworks. I find I get gotcha’d surprisingly frequently with Django. … Just got to get over that hump..
This comment was originally posted on Reddit
These don’t necessarily seem to be gotcha’s as mis-understandings of either python, regex, or django basics. To me a gotcha would be something like how there isn’t any easy way to do many-to-many fields as check-boxes… or other things in the otherwise awesome django framework that are exceedingly difficult to do when they shouldn’t be (though this is relatively rare). These are more or less errors than novices make. Not necessarily "gotcha’s" or shortcomings in the framework itself.
This comment was originally posted on Reddit
yeah, and there’s the {% empty %} thing too, for when the list is empty.. very nice and faster than the old way..
This comment was originally posted on Reddit
http://bit.ly/29I716 Django gotchas
This comment was originally posted on Twitter
“Django Gotchas, a teeny tiny ebook about commonly occurring gotchas with Django.” http://bit.ly/1CNTQa
This comment was originally posted on Twitter
Django….. to each their own, i suppose.
This comment was originally posted on Reddit
- How to use pep8.py to write better Django code
- Screencast: Django Tutorial Part 1
- How and why to use pyflakes to write better Python
- Getting started with South for Django DB migrations
- A brief overview of Vagrant
- Writing jQuery plugins using Coffeescript
- Behind the Scenes: Request to Response
- Using SQLite Database with Android
- Haml for Django developers
- Coffeescript for Python programmers
- rails
- django
- linkroundup
- django opinion
- opinion
- business
- API
- appengine
- python
- satire
- startup
- Uncategorized
- marketing
- personal
- rambling
- search
- interviews
- seo-interviews
- 5startupideas
- ideas
- seo
- tips
- forms
- paypal
- utilities
- datetime
- web2.0
- Amazon
- algorithms
- presentations
- products
- pinax
- satchmo
- ecommerce
- microsoft
- yahoo
- book
- tutorial
- models
- aggreagtion
- meta
- India
- apps
- about
- CSS
- Design
- wordpress
- test slug
- vim
- urls
- reviews
- javascript
- xmpp
- emacs
- Typography
- Grid Theory
- Color Theory
- iphone
- android
- titanium
- mobile applications
- CSS3
- Browser Compatibility
- mobile
- jobs
- lamson
- django setup
- files
- upload
- jsTree
- hierarchical view
- web page
- Treeview
- coffeescript
- request
- response
- South
- django south
- django migration
- --fake
- screencasts
- February 2012
- January 2012
- December 2011
- October 2011
- September 2011
- July 2011
- June 2011
- April 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- June 2010
- April 2010
- March 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- April 2009
- March 2009
- February 2009
- November 2008
- October 2008
- June 2008
- May 2008
- April 2008
Looks good!
There's a small typo on the urls page:
url(‘^edit/(?P[w-]+)/$’, edit_view, )
should be:
url(‘^edit/(?P[\w-]+)/$’, edit_view, )