Django - Yahoo News Search Results

‘Suspiria’ TV Series in Development; ‘Django’ Also Coming to Small Screen

The Suspiria film remake may be dead, but that doesn’t mean you can keep a coven of witches down. There’s now a Suspiria TV series in development out of Europe, with original writer/director Dario Argento on board as “artistic consultant.” But you’re probably not expecting precisely this plan for the TV version of Argento’s film […] The post ‘Suspiria’ TV Series in Development; ‘Django’ Also ...

‘Django’, ‘Suspiria De Profundis’ Series In Works From Atlantique & Cattleya

France’s Atlantique Productions and Italy’s Cattleya have entered a co-development and co-production agreement to fashion English-language drama series out of Sergio Corbucci’s 1966 Western Django and Thomas De Quincey’s 1845 psychological fantasy essays Suspiria De Profundis . Django , to which Quentin Tarantino paid homage in his 2012 Oscar-winning Django Unchained , is positioned as a re ...

Django Girls make the male-dominated world of IT more accessible to women

An announcement regarding a Django Girls meeting at Hackerspace in the Athens neighborhood of Aghios Eleftherios on Saturday sounded more like a pop group fan club’s get-together than an event addressing a socially and economically challenging issue: the employment of women in today’s dynamic industries of information technology and telecommunications.

Django Django: ‘After our first album, everything went nuts’

Django Django’s first record propelled them from back-room gigs to the top of festival bills. How did they escape second-album syndrome? The last time Django Django talked to the Guardian, towards the end of 2011, they were preparing to release their debut album – a tuneful but experimental mix of psychedelia, folk and the sound of coconut shells being bashed together to make a noise like ...


recent bookmarks tagged Django

Posted on 2 April 2015

Guía definitiva Django 1.8 en Español - Pythonízame

Posted on 31 March 2015

ATP_Performance_Test/ at master · tkopczuk/ATP_Performance_Test

Posted on 31 March 2015

Posted on 28 March 2015

Posted on 24 March 2015

Posted on 24 March 2015

Posted on 24 March 2015

Posted on 24 March 2015

Posted on 24 March 2015

Posted on 24 March 2015

Top Answers About Django (web framework) on Quora

Top Answers About Django (web framework) on Quora

Does Django lend itself to different type of projects than Rails?

Django lends itself well to projects that already use lots of Python.

Python's main strengths lie in its great support for math and machine-learning. No other language has access to libraries like NumPy, SciPy and the Natural Language Toolkit.

If you're building a web application that will specifically take advantage of these libraries, than using Django will save you the trouble of involving other back-end languages.

Django seems to scale well enough to support moderately high-traffic websites like HackerEarth.

While Rails and Node.js are under more active development, Django is still a solid choice for a Python codebase.

See Questions On Quora

Posted on 29 June 2015

Should I use PHP, Python (Django) or Ruby (on Rails) to build a dynamic website?

I've developed web applications in all three languages, with various frameworks within each. In my opinion, the choice is really between Python and Ruby.

Say what you will about PHP, and we can debate this for days, but PHP development is significantly slower than that of Ruby/Python. Worse still, this reduction in speed does not offer an improvement in quality as intuition usually tells us. In fact, given sufficient time, the robustness of both languages makes it hard for PHP teams to even achieve a codebase as elegant as one in either one of those languages.

The only time when using PHP is a good decision–again, IMO– is when it offers something that cannot be found in other languages. This is a very short list, as Ruby/Python have very robust lists of features, and offer similar–if not better–performance. However, if you're Facebook and have already hired hundreds of PHP developers, you should stick to it. Or you can hire programming language designers and compiler writers to develop an entire new programming language bearing PHP's syntax just to get out of the mess you put yourself into, which actually happened.

Now, Python or Ruby? Honestly, it doesn't matter; just have your pick. For your run-of-the-mill web application, the differences are virtually non-existent. Both languages have a strong community that follows modern programming paradigms and spits out new libraries like nobody's business. Python offers some impressive scientific computing libraries that Ruby somewhat lacks, but that's about as far as the differences go.

One final note: don't get hung up on Django vs. Rails. You might decide that a microframework like Flask (Python) or Sinatra (Ruby) is robust enough for your application's requirements–as is often the case.

See Questions On Quora

Posted on 21 November 2014

What are the benefits of developing in Node.js versus Python?

I am a Python web developer , who uses Web2py and Tornado for web development , But i will try to be as least bias as possible.

Only real benefits are described by Rustem Kamun

First: You should compare Javascript (V8) vs Python , or Nodejs vs Tornado (or Twisted , or Gevent ) .
V8 VM JIT for javascript made by google is very fast . Its 5.4 times faster than CPython, but it is unfair to compare JIT vs Non-JIT . You should compare it against worthy competitor : PyPy

(Node + V8) vs  (Tornado + PyPy)  (Technical Comparison) :

 Base on Python vs. Node vs. PyPy , lets see how it fairs.
Note: this article is 2 years old and PyPy 2.3 now is a lot faster vs  1.9 it uses back then. So  now it can possibly beat Node.js? i will make a benchmark when i free.
Throughput :
- Node.js ~4100 req/sec
- PyPy/Tornado at ~4100 req/sec

Latency :( i have calculated the graph using gimp: 1 px = 3ms)
- Node.js : 267 ms at 1000 concurrent connections
- PyPy/Tornado : 288 ms

- at 1000 concurrent requests PyPy is stable at 100 MS Standard Deviation Node.js  is at 140 ms. On this case PyPy Tornado is 40% more stable.

So judging from Technical Comparison , There is Almost No REAL Benefit. Claim of Node.js faster than Python is no longer true when PyPy  + Tornado comes to the rescue.

Now lets look at:


Python is clean Clean , and many useful Language features that Javascript does not have.

-True Object Orientation

What above features brings to async programming :
- Very clean code for asyc web development with Coroutines .
- No Callbacks
tornado.gen - Simplify asynchronous code - Tornado 4.1.dev1 documentation

Which is a lot more maintainable than callbacks after callbacks nested with callback style of node.js.

If you already know Python , use PyPy + Tornado , a lot more benificial , productive , and maintainable than using Node.js
Keep javascript for UI Side only.

If you have no choice then use Node.js (if your upper management force it to) .

EDIT: Forgot to mention , this Quora site itself is build using Tornado  , backed by PyPy.

See Questions On Quora

Posted on 12 August 2014

Would Pinterest consider Flask in place of Django if it were starting today?

I'm sure we would at least consider Flask, given that we do use it now for our API, which powers more than half the traffic that Pinterest serves. It's very lightweight and easy to set up and scales reasonably well.

Plus, one of our first key architectural decisions was to split out a database service to handle all reads/writes to MySQL, which if repeated would make the database management abstractions in the choice of web framework much less of a consideration.

For what it's worth, we hardly use Django for much in our web stack now, besides the middleware (authentication, logging, etc.). Aside from migrating off the ORM years ago, we've written our own routing and generally don't use handlers in the Django pattern. So it hasn't really passed the test of time and a growing codebase and engineering team.

See Questions On Quora

Posted on 17 February 2014

What are the advantages of using Python for building a website over using other languages like Perl, Java, ASP and Ruby on Rails?

Unlike Perl, Python is extremely clean and easy to read, encouraging good structure. As a result, Python code is easy to maintain, even by developers who were not involved with writing the original code.

Unlike Java, Python is much more concise, expressive and to-the-point. This makes it considerably faster to develop good quality software.

ASP and RubyOnRails are NOT languages in their own right. They are web development frameworks, and as such should not be compared directly with Python, but instead with a Python-based web framework like Django.

Unlike ASP, Django is not tied to any Microsoft operating system, platform, or technology - it is a much more open framework, with fantastic documentation, easy to learn and supported by a great community.

The only thing left to compare is RubyOnRails vs. Django. Here, the differences are much finer, because the two frameworks are very similar and have very similar strengths. There are plenty of articles on the Internet comparing the two, so I will not delve into that analysis here.

See Questions On Quora

Posted on 28 January 2014

What are the benefits of developing in Node.js versus Python?

It depends on the problem. If you think that your problem should be implemented on asynchronous I/O: so compare not just python vs nodejs, but (twisted, tornado, ...) vs nodejs. Python does not support from scratch asynchronous I/O, like nodejs, however, since python supports generators (coroutines), asynchronous programming in python is much simpler and concise. NodeJS programming is based on event/callback(continuation passing) style which makes your code growth faster and makes your code harder to debug and maintain. I suggest you Tornado(Python) framework: it is very easy to start, it has good support, it proofs his stability on a lot of projects.

With the emergence of promises (Promises/A - CommonJS Spec Wiki) the coding style is very comparable to python coroutines (futures). So the main set of points that must be thoroughly investigated are:
  1. Python stack or JS stack i.e. if you already using python for some part of your system, no need to load your team with other languages. It doubles maintenance job.
  2. Requirements to performance (e.g. N thousands simultaneous connections). You can look through benchmark results (gevent vs nodejs vs scala vs ...)
  3. Community and maintenance of the projects (For example, Python tornado requires a lot of ground coding. It comes with basic tools and asynchronous server i.e. very often you need to implement asyncronous drivers by yourself for memcached or for postgres. NodeJS has much more contribution and it is easy to learn).
  4. Area of development (Twisted suits for network programming, nodejs is good for multiplayer games)

See Questions On Quora

Posted on 8 January 2014

Is it better to create your own framework, or would it be best to just use Django or something like that?

You should absolutely use an existing framework such as Django rather than writing your own.

Doing so will let you work faster, and take advantage of code written by others. This will dramatically increase your chances of building a successful website as opposed to spending months tinkering with your own framework rather than solving the unique problems that make your website interesting.

If your site is a big success, you'll be able to scale Django to meet your demands. There are plenty of huge sites running on Django - such as Pinterest, Instagram, Eventbrite and Disqus. They all end up having their own customisations for scale but that doesn't mean that they didn't benefit enormously from using an existing framework rather thank rolling their own from scratch.

Concentrate on getting to a point where your site is so successful that it causes problems. Those are good problems to have!

See Questions On Quora

Posted on 1 November 2013

Which online Python course is the best?

As nobody yet said anything about it, I will mention The Python Challenge .

This is not exactly a tutorial, but an online game of progressive difficulty. Each level is a riddle given through an URL. You need to write some python program to find the URL for the next riddle, and to write that program you often have to read python manuals.

As programs are getting harder you learn python. Probably not for everyone, but if you need to be challenged to learn new tricks, you can give it a try. Some people describe this as the "best way to learn python".

It is probably exagerated, but I learnt many usefull things going through it (not the least, the wealth of available python modules).

See Questions On Quora

Posted on 1 October 2013

What are the best ways to improve Django performance?

  • Cache your views when possible using Django's internal cache Django’s cache framework.
  • Cache your queries using django-cacheops by now is the best I have used and it's compatible with Django 1.5 (it uses Redis). *
  • Use djcelery with Celery: Distributed Task Queue for every task that can be delayed (i.e. sending an activation email).
  • In production use nginx as reverse proxy with Deploying Gunicorn I am using Gunicorn after running some benchmarks with UWSGI, Gunicorn won and it is really easy to setup compared to UWSGI!
  • Use Gunicorn with greenlet/gevent (this requires libevent installed on your system).
  • Stay away from the dbms whenever possible, one thing I learned using Django is that the main thing that slows really down your application is the database. Scaling at application level really helps.
  • If you are going to use Postgresql use Autocommit = True in your settings and keep in mind that the upcoming version of Django (1.6) will support connection pooling with psql.
  • You can debug your application and see what is slowing down the app with django-debug-toolbar one of the best tool I've ever used. You can see SQL Queries in every view.

* I saw major improvements using johnny-cache instead of cacheops, by the way this is strictly a personal choice. You should try and see what is better suited for your app.

See Questions On Quora

Posted on 28 September 2013

How scalable is Django?

Django scales in exactly the same way as PHP or Rails or any other stateless shared-nothing web technology: you ensure that the web nodes (running your Django code) are independent from your persistence layer (database, caching, session storage etc) and scale then independently.

Since the Django web nodes have no stored state, they scale horizontally - just fire up more of then when you need them. Being able to do this is the essence of good scalability.

In my experience Java applications are more likely than Python applications to have stateful web servers which fail to scale horizontally, hence the more common need for things like load balances that support sticky sessions in the Java world.

That's not to say you can't have stateless Java web application servers that scale horizontally if you set out to do so - you just need to be disciplined about it.

Performance is another matter entirely: Java is generally faster than Python, and some aspects of Django (such as the template language) are actually quite slow. But performance and scalability are not the same thing.

See Questions On Quora

Posted on 21 August 2013

Why is there a recent trend away from PHP towards Python and Ruby on Rails?

At least where I'm at in my career path, the main reasons can be summed up best by the following statement:

It's easier to go wrong with PHP

That's not an inherent problem, it's just the way it has panned out.

The problems you can commonly make with PHP stem from its lineage as a simple web scripting language rather than a programming language proper.  These are not the kind of things you are going to get bit by at the typical webapp or website scale, serving simple dynamic content via apache/php/mysql.  These are the kinds of problems you only get to appreciate after you've worked to scale, where your threaded networking model is immediately apparent as a bottleneck.  You immediately appreciate the modular namespacing and alternative networking flexibility of other languages after you make the switch.

You can make very elegant and highly scalable code in PHP.  There are many, many examples where I work presently.  It's just that you only learn these techniques after you've been bitten, and by then, if you have the option to make the switch to something new, you are pretty sorely tempted just on the merits of the alternative.  You don't come into web development understanding the value of organization and namespacing, you learn it over time.  I made the switch to python years ago, and only periodically looked back when professional needs (clients or jobs!) demanded.

PHP has tremendous mindshare.  It deserves the respect it's gotten as most developers introduction to web programming.  It's team is also to be commended for their recent efforts to modernize its structure vs Ruby or Python since the release of v5.  However, none of this changes its typical use-case - a front-facing webapp answering HTTP requests most likely tied to Apache or Nginx.

Consider some other complex problem domains - there are no machine-learning libraries for PHP, for example.  Consider writing an in memory inverted index, something like what Sphinx search uses for example, in PHP... there are so many uses when you scale out that PHP is not well suited to: Asynchronous networking a la Nodejs or Tornado?  Graceful interface design between CLI, web, and GUI?  Special network protocol programming (socketio, amqp, etc)?    Most PHP devs would argue that they are not interested in these problem domains and that PHP is not the tool, and they are right, at least until their professional environment demands it.

So, succinctly, to answer why the companies you are looking at are switching, it's only because they grew larger, and their needs diversified greatly.  Over time, they needed to trade up.

See Questions On Quora

Posted on 7 March 2013

What are some of the coolest, good-to-know Django tricks/shortcuts?

  1. For model inheritance, it's best to stick with abstract base classes.
  2. If you need to secure a site, use django-secure.
  3. Use custom template tags as little as possible. They slow down down your site. 
  4. Never, ever autoload template tags. It's a nasty bottleneck and causes maintenance issues. If you do this you are shooting yourself in the foot. Explicitly load them per template.
  5. Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants. This will cause Django/Python to load the libraries on application startup and matches PEP 8 -- Style Guide for Python Code. Never, ever place imports into functions or methods thinking that it will speed up your code. It has almost nothing to do with 'lazy loading', it is a developer created bottleneck.

See Questions On Quora

Posted on 23 January 2013

How do you organize multiple projects in a codebase with shared logic?


At Spotify, we have learned, through maintenance pains equal to the heat or a thousand burning suns, that decoupling is the way to go. Basically, decouple until it hurts.

We found that the more stuff you build into a thingamabob, the more brittle it is. Partly just because more code inevitably means more bugs and more hairy maintenance, and partly because the more responsibilities a system has, the more other systems depend on it. This, in turn means that the service will fail more because it's under greater stress from many other apps (which, as a bonus, will fail with it).

The Spotify backend (which is Python to a very large degree, by the way) consists of about 100 different services. They are all very, very simple and are stricly focused on doing one thing well. Most of them are pretty autonomous, meaning that they depend on few other services, and when they do, they assume that the other services get slow and/or go down from time to time.

Note that these are separate services. They have their own code base and their own databases. For instance, the playlist service is completely separated from the user service and the music storage. Sharing a single database is NOT a good idea - it quickly turns into a massive, unmaintainable horrible thing that must not fail, but does, all the time. :) I have observed this "master database" phenomena first-hand in other companies, and it's NOT fun and happens REALLY fast. 

These services talk to eachother using a propietary protocol, but used to be done in HTTP.  HTTP will do fine for most services, the reason we no longer use HTTP at Spotify is because our load situation is extreme - 20 million users streaming music is crazyhat.

Spotify makes incredibly extensive use of git submodules, which is definitely a workable solution. However, I'm personally not a fan. Git submodules are not designed to be a package manager, and if you can, use actual package managers instead, such as pip or easy_install for Python, npm for node.js or gem for Ruby. It will save you a lot of pain to have sematically versioned packages in place instead of messing with git submodules. To set up a private package server, I recommend Gemfury.

We do, actually use a single repository for all this, and git seems to handle this just nicely. If you use Github, you might as well use separate repositories, but it's very tricky to setup without.

Edit: More fun reading about the Spotify backend can be found in this answer: What is Spotify's architecture?

See Questions On Quora

Posted on 10 December 2012

Do I use PHP, Node.JS, or Django for RESTful service?

I don't have much PHP or Django experience, but maybe I can help frame this question a little differently.

The choice of a language/platform should be about a few factors, some of which have been called out here, but by looking at these factors the right answer usually becomes pretty clear.

First, you can build a robust solution with any of these technologies.  But they aren't all designed for the same things.

The web has gone through some specific stages of evolution and the "hot" technologies have been a reflection of that.  The early programmable web was focused on rendering HTML with some amount of dynamic formatting or content: PHP was designed to handle this scenario, and it does it very well.  Later websites were rendered as highly dynamic and driven primarily by a data model backed by something like MySQL.  Ruby on Rails was designed to handle this scenario, and it does it very well.  And the more recent trend of websites being highly dynamic both in terms of render and in update (in other words AJAX/Single Page) where parts of a page will regularly make server calls and update independently from main page, with lots of small requests going back at high frequency.  Node.js was designed to handle this, and it's not as awesome at rendering HTML, though it works.

With that in mind, here are the other considerations that come to mind:

  • Organizational Climate:  Is your company one that is conservative on technology decisions or one that allows using newer, emerging technologies?
  • Hiring/Skills:  What is the skill-base of your workforce?  How hard is it to find people that can manage working on a given technology?  Are they flexible and quick to pick things up, or are they narrowly focused on what they already know?
  • Specific Functionality:  Does the stack in question support the systems you need to integrate with - MySQL, MSSQL, AMQP, etc.  Will you have to write support for these and/or maintain it yourself?  Are there Apache features you need, Nginx, etc?
  • Performance:  What type of load do you expect your system to experience and how does it scale under this load?  Node, in particular has a very horizontal scaling model due to it's threading (er, non-threading) characteristics.  It's not too bad with cluster, but it doesn't do multi-proc, for example.
  • Setup and management:  I'm not too familiar with the others but one of the nice things about node is that you don't need a separate web server.  For many scenarios this is super handy for deployment and management.
  • Tooling:  Older and more widely used systems tend to have better tooling across the lifecycle: CI servers, deployment scripts, compilers/optimizers, debuggers, etc.  The less of these you have, the more experienced and skilled you need you developers to be.

If it's true you're "routinely building simple RESTful web services", my experience is that node + restify handles this very elegantly, but it's equally doable in any of the technologies listed.

See Questions On Quora

Posted on 4 November 2012

Why is there a recent trend away from PHP towards Python and Ruby on Rails?

PHP was the first open source language designed for the web and reached maturity around 1999 with the release of PHP4.  Before PHP there was only perl (free, but a general purpose scripting language, kind of hard to learn) and ASP (which was not free and required an enterprise-level budget to run.)  So PHP had a head start of about 6 years over Ruby andy Python.  (These languages existed since the mid 1990's but had no web frameworks written for them).

Despite PHP's many shortcomings (lack of true object orientation, weak exception handling, no lambdas, and as others have mentioned, being essentially a huge flat namespace of inconsistently-named functions) it won by its ubiquity.  It was free and even the cheapest commodity web hosting providers were offering PHP by 2002 or 2003, so it had a full generation in Internet years to establish itself as the common language for open source developers. 

The emergence of Rails in 2005 began to change that but it took a few years for Rails to gain mainstream acceptance.  Python followed suit with the development of the Django framework, on the same MVC pattern as Rails. 

Services like Heroku were essential in getting Ruby to the mainstream - you no longer needed to have dedicated servers or know how to compile source code to run a Ruby server - you essentially had the same consumer-level pricing for running Ruby apps that you had with PHP. 

Ruby and Python are overtaking PHP because developers tend to favor the languages - they have better abstractions and allow programmers to be more productive.  Also, the ubiquity of PHP worked against it a little because it meant that less skilled programmers could contribute code and the quality of code in PHP projects is generally of a much lower quality as a result (see WordPress plugins for example) while the Ruby and Python communities have focused on developing better coding practices like Test Driven Development.  As a result, people who use Ruby and Python are perceived as "better" programmers, and more desirable hires.  New technology-focused companies are thus more likely to start projects in Ruby and Python because of the perceived higher quality of developers, even though for most web applications, an experienced team ("experienced" being the key) using Symfony or Cake can be just as productive as a team using Rails or Django

There's always going to be a fringe language X that's favored by hackers and academics, but has no obvious business application and thus stays obscure, only to seemingly come out of nowhere years after its invention when the critical mixture of a user need and practical libraries is achieved.  Today it might be Haskell or OCAML or Scala.  It's been LISP for about 50 years now.

See Questions On Quora

Posted on 27 October 2012

Why is there a recent trend away from PHP towards Python and Ruby on Rails?

Aside from the intrinsic qualities of Ruby or Python over PHP, there are some logistical ones.

The mindshare of using Ruby or Python has increased.  Frameworks like Rails and Django have grown in popularity.  It means there's more engineers who know how to use Ruby or Python.

There was a time when launching a site in Ruby or Python would mean a bit of a risk in available engineering talent, but now Ruby and Python are fairly easy to use languages, and these days it's almost easier to deploy Ruby or Python rather than adding mod_php to Apache.

See Questions On Quora

Posted on 14 October 2012

AWS versus GAE for python/Django apps?

AWS almost all the way. Why?

  • Free Tier: AWS costs you arguably a little more money at the low end, but you have tighter control over what you do. Many PaaS such as Heroku or dotCloud have free options so you don't have to pay. Plus, you don't have to worry about your service vendor changing prices on you. Cause if they do you can move to another service - say OpenStack on Redhat servers. (Winner: AWS)
  • Deployment headaches: GAE has great deployment compared to bare metal AWS servers. But if you factor in a PaaS like Heroku or dotCloud or Gondor or OpenStack, then all those problems are mitigated. (Winner: EVEN)
  • Scalability: GAE wins here because it does auto-scale nicely. On the AWS side of things, good architecture or Modern PaaS can mitigate that but if you don't have the right code in place you can get hammered without knowing about it. However, if you do have the right pieces in place, then AWS is just as good - and probably cheaper.  (Winner: GAE by a small margin)
  • Use of Open Source tools on machines: AWS wins because for GAE dependency management for Python or Java relies on doing things the Google way. In Python terms, that means you aren't using pip/virtualenv/buildout and in Java I guess you aren't doing Maven or whatever is done now. Which means you get access to tens of thousands of libraries and tools, and aren't cutting/pasting them into your project. Which, of course, is a problem when you want to do simple project updates. (Winner: AWS)
  • Available databases (SQL, NoSQL): AWS wins because it's database agnostic. While BigTable is very powerful, it's not a relational database (still useful) and it's not a key/value store. One database type for all solutions is not the right way to do things. That said, I like BigTable for things it's meant to do, but you simply lose the variability of AWS. (Winner: AWS)
  • Other factor - Avoidance of vendor lock-in: I mentioned this before but vendor lockin is a horrible thing. What if Google changes terms? Or goes through a period of unreliability? Google is notoriously unresponsive when it counts, which means unless you have personal connections at google, who can you really call? That said, AWS suffers the same problem, but... you can more easily move your stuff over to other servers running similar components. (Winner: AWS)

In my review, the victory goes to AWS.

See Questions On Quora

Posted on 6 September 2012

How do large scale Django implementors use NoSQL-type storage strategies?

NoSQL isn't the answer. Stick with a real database.

We use Memcache, Redis, and Cassandra (in that order), all for data which can easily be rebuilt. Postgres is (and will always be) our primary storage engine.

You'd be surprised how far (very) that you can scale with a single Postgres cluster. It took us 3-4 years to outgrow that, and we were already larger than most companies ever will be.

Everything that uses NoSQL runs on some in-house solution, but it never implements the ORM or anything Django specific. It's very custom, and very compact.

For example, our Redis usage is all simple models that just provide an abstract interface in whatever they're implementing, almost always powered by something like Nydus (

We tend to store things like aggregate counters, denormalized views of data, and various frequently accessed data (as a cache).

See Questions On Quora

Posted on 27 August 2012

What kind of modifications did Pinterest make to Django?

We mostly use Django to handle some basic controlling, namely URLs getting routed to methods (views in Django parlance, we call them handlers).

We have only one DB table that uses the Django ORM, everything has been migrated to another tier that manages our data.  For that DB we actually use a custom DB router that pools mysql connections.  Nothing fancy, it's borrowed from SQL Alchemy.

We use Jinja2 templates which is (partially) bridged together using the Jingo library.

We bypass Django's testing framework entirely and have our own system that is better suited to unit-testing than integration testing.  It's driven by nose.

It's perhaps not accurate to say we've modified Django.  We install Django via pip and leave it alone, but Django is just python and we're doing (mostly) pythonic things to satisfy our requirements.

See Questions On Quora

Posted on 25 August 2012

How should we proceed for developing a website with the Python/Django framework?

Here you go:

  • Wireframe your project and then build from there.
  • Try to use PostgreSQL in production. Django is optimized for it. Many argue it handles relations better than MySQL. Providers like Heroku keep your system up to date.
  • Use Django 1.8 or higher for database migrations, django_extensions only for TimeStampedModels, django-debug-toolbar for debugging, django-floppyforms for better widget control, django-crispy-forms for easy form generation, django-storages-redux for delivery of static media.
  • Start with Heroku or another PaaS before standing up your own slices. If your site takes off and Heroku gets expensive, only then think about your own servers. If you do use Heroku, add these to your project: dj-database-url, django-heroku-memcachefy
  • Research additional apps to wire in via
  • Keep the logic out of your and urls file. If you are traversing the filesystem to find which apps you have and then using that to generate a INSTALLED_APPS tuple, you are doing it wrong. Write out every app as a string. Trust me on this one.
  • Never cut-and-paste Django/Python third-party apps into your project. Instead, use virtualenv and pip.
  • Keep any and all code out of your files.
  • Document what you need to get your project installed and running locally. Otherwise you'll forget it at the worst moment possible.
  • Build a basic prototype that works, then worry about pixel adjustments and/or all the nice JavaScript things you want to do.
  • Github all the way. As students I believe you get a discount.
  • Check out our book, Two Scoops of Django: Best Practices for Django 1.8.

See Questions On Quora

Posted on 8 August 2012

I'm making a website that will heavily make use of machine learning and data mining algorithms. Should I use Django or Rails?

Here's a thought: write the ML part and the web interface separately, and have them communicate by a simple internal API. Then you can write each part separately, in whatever language.

For instance, you might decide that it made sense to write the numerically intensive parts in R, but writing a web frontend in R would be the act of a crazy person.

See Questions On Quora

Posted on 30 May 2012

Is there anything Django can do that Flask can't with blueprints/extensions?

Having used both - Django for full-fledged sites, and Flask for API backends, Django's benefit is in its community, insanely good documentation, easy-to-extend middleware and context processors, and of course the built-in admin site.

Flask is capable, but I found myself mimicking a lot of the functionality in the fashion of Django while using it. SQLAlchemy is pretty cool but requires a MUCH larger learning curve. Testing is much more manual. Documentation is severely lacking compared to Django.

I don't really buy in to the separation-of-apps thing in Django. It works as psuedo-namespacing but i've rarely if ever seen apps be able to exist completely independently of each-other... so I won't tout that as a feature.

That said, if your site is significantly small... or as in my case, if you are building say, an API that only passes JSON back and forth, or may only have one or two pages to the entire site, Django can be an elephant gun for an ant. I used Flask, SQLAlchemy, and the "apy" Flask extension to build an API to backend a turn-by-turn iOS game. It scales just fine, and is less resource-heavy than Django.

Most importantly, though, is due to the maturity in Django, things like JohnnyCache exist and are amazing, stable, and scalable. SQLAlchemy has serious issues with putting objects in memcached, for instance, that you have to work around from scratch (and won't find out about until you think you're almost done.)

In either case, use Jinja2 - so much faster, more capable, and binary-cacheable. :)

That's a lot of words, I hope you find it helpful.

See Questions On Quora

Posted on 4 May 2012

What are some best practices for Django development?

Here are some things I have learned over the years that have helped me:

1. Try to setup your projects with the following directory structure


apps - contains subfolders with specific functionality (static, accounts, etc)

configs - stores all configuration related scripts (gunicorn, nginx, celery, mongdb, redis, etc). It's useful because you can use fabric (put command) to copy these over to the correct locations on a server

deploy - contains all deploy scripts, set up in similar manner to this project[1]

A lot of examples you see online put everything into a single, but that gets really messy as a project gets larger. Having a deploy folder that is organized like django-fabtastic allows you to cut-and-paste it over into other projects if you are using the same technologies

settings - a folder (not a file like that is setup based on this reference [2]

You could use, etc. but that yipit guys got it right and that is definitely the way to go

static - contains js, css, images, types/fonts

templates - all your html files

2. Use gunicorn[3] instead of apache. If for no other reason, a print statement in code wont crash the entire site. Gunicorn is less bloated and very easy to configure. And large sites like instagram are using it at web scale so dont let people tell you its not a good idea - it will make your job easier and you can leave the office and drink a lot more beer

3. Use celery for anything that can be made asynchronous (sending emails, uploading photos, etc). Dont make the user wait for the request to return, push it onto a queue and let celery do the work for you. Also, do not use rabbitmq as the celery backend, use redis. RabbitMQ is supposedly more stable and messages cant get lost, but it's also a pain to configure and 99% of people can afford to lose a message because a lost message really doesnt matter that much.

4. If you are going to use a SQL-based solution, then use South for migrations. I  have had a lot of success migrating away (completely) from Django's ORM[7] and sticking to PyMongo[5] + MongoEngine[5]. Development is way more fun if you're using MongoDB, if you do not believe me, try it out. Say goodbye to painful schema migrations. Ya, and I know, MongoDB doesn't scale, but guess what, it does.

5. If you need to make a REST API, then use Django-TastyPie[8]. Unfortunately, there is currently no good solution for constructing RESTful APIs if your backend is MongoDB. If I am wrong, provide a link please because no one on StackOverflow could[9]

6. Do not use for unit tests, put them in a directory called tests/ and import them in that file. Also, trying using
nose, it's really cool.[10]

7. Look and good open source project for reference. The most obviously is the Django project itself[11], but Newsblur[12] and Everyblock[13] are also great references:

That is it- that is 3 years worth of trail-and-error for free!


See Questions On Quora

Posted on 1 April 2012

Do Python programmers have a tendency to write their own software instead of contributing? Why?

I think you'll find that PROGRAMMERS have a tendency to develop their own thing rather than contributing to an existing project. It's even got its own TLA: NIH (Not Invented Here).

It's not always a bad thing. When Dave Winer expressed dismay at Douglas Crockford for inventing/discovering JSON when XML and XML-RPC already existed, Douglas responded:

"The good thing about reinventing the wheel is that you can get a round one."

See Questions On Quora

Posted on 22 January 2012

Is Django on its way out?

Django is not on its way out - It's the most popular python-based web framework. It is the "Ruby on Rails" of Python (except Python is a nicer language and Django does not have as much "monkey patching"), and large sites (Disqus, Instagram, Pinterest, Mozilla, etc) have proven it can scale. It has a large ecosystem and a lot of great third-party applications. Although ruby/rails is popular, Python will continue to be the language chosen for data-driven /mathematically intensive web applications, and because Django is the most popular python web framework, this will help it to continue to gain traction. (The development of PyPy will most likely convert Ruby engineers to Python engineers for performance reasons also). If you want comet functionality, be a man and combine Django & Tornado or take the easy way out and use django-socketio.

See Questions On Quora

Posted on 10 January 2012

Is Django on its way out?

No, Django is not on its way out. Many large companies still use Django. Instagram, Disqus and Pinterest are some examples.

See What is the largest site that is using Django? and What are some well known sites running on Django?

Also, is reportedly porting their site to Django. See Why is porting their codebase from Ruby on Rails to Django ?

Jacob Kaplan-Moss posted an update measuring the Django community Short story, Django use is still growing.

See Questions On Quora

Posted on 3 January 2012

What are the benefits of developing in Node.js versus Python?

Maybe there are none? I know that sounds like a troll, but you should consider it as a possibility. A lot is made of Node's asynchronous nature, but you can do event-driven apps in Python (and many other languages as well). It's not that hard, there is no magic.

Of course if you really love JavaScript programming then obviously Node has an advantage there. That's purely subjective though. Most programmers that I have worked with are pretty good at using different programming languages for different tasks.

Pragmatically there are some disadvantages as well. Being a younger language, you can expect more bugs, less documentation, and missing pieces. Of course all of these things are getting better all the time and there is an active community around Node. There's also a very active community around Python, Django, Twisted, etc. as well. In exchange for those bugs you get to use a technology that is considered very hip currently. You get "credibility" with some kinds of people. It's like Rails circa 2006-2007. If that kind of stuff matters to you, then that would be a huge advantage.

See Questions On Quora

Posted on 27 December 2011

I want to learn to code Python and Django (web framework). What's the best way to start for a programming newbie?

Although I think Python is a better overall language, if you just want to slap a utilitarian web interface on some backend code for internal use then PHP might be a better language to learn. It's easier to setup on the server, will run on virtually any host, and is a more out of the box solution.

As for Python/Django:

If you have never programmed before, it's definitely worth learning Python before you get to Django. Someone with experience could skip to a Django book/tutorial and pickup Python on the way - it's a simple language with very clear, easy to read and understand code.

How long it takes you to learn what you need to know is highly variable. If you are just trying to write some automation scripts to help cut down some manual labor, then you can probably go from zero to this point in a few weeks (maybe 20-30 hours). If you want to write production quality web apps using Python/Django, it's going to take longer.

Setup The Environment

First download Python if you don't have it. I prefer Linux, but your MacBook will be more than sufficient as a dev machine.

Python is in a state of limbo between the 2.7 release version and 3. While 3 is the future, it introduces some intrinsic changes which many of the popular libraries do not yet support, Django included. Your best bet is to start with 2.7 and switch to Python 3 later. Also, most of the learning material available is still written for Python 2.

You can write code in any text editor. My favorite, and an up-and-coming basic code editor is Sublime Text. It is simple, elegant, and very functional. It costs $59, but you can use it free for an unlimited amount of time (as of right now). Well worth buying though.

Many Mac developers love and swear by TextMate. It's more developed and further along than Sublime, I think. Costs $54, and has a 30-day trial.

If you get deeper into programming and want a full featured integrated development environment (IDE), then PyCharm is top notch. It costs $99 and has a yearly renewal fee for updates, but is worth it. Something like this has a much steeper learning curve than Sublime Text or TextMate, but they can save you time and keystrokes in the long run.

I'm going to assume you are familiar with working in the terminal, since you have IT experience. If not, this might be a good starting point:

Django apps can be run entirely on your own dev machine, but if you want to put it on the web to be accessed by others on your team, or from other machines you will need a host. There are some good questions on Quora about hosts, but ensure you choose one that allows Python and SSH access. I recommend finding a cheap Virtual Private Server (VPS), although this might be too steep a learning curve for someone without experience. (You say you've done a lot in the IT field, so some of this might be too basic for you, sorry).

I recommend learning and using Source Control. This helps manage your code revisions, and is particularly useful if you have more than one person working on it. I personally use Mercurial, but Git is more popular. is a good intro guide for Mercurial. looks to be good for Git, but I haven't worked through it yet.

In addition to using Source Control, you'll need a source code repository (you'll learn what this means in one of those tutorials. GitHub ( is the most popular, with BitBucket ( coming in second. You can use Git on either, but GitHub does not support Mercurial. Also, BB has better options for free accounts - unlimited free repos, whereas GitHub limits you.

You might feel overwhelmed trying to learn how to program Python, learning Django, and trying to figure out source control and a myriad of tools all at once. In my opinion it's best to get down a version control workflow early on, rather than putting it off. You'll develop good habits early on that will help you down the stretch.

Where to Learn
There are a ton of resources for learning Python, and quite a few for Django. Be sure that whatever you choose, you go with resources that consistently use either Python 2 or 3. Also, stay away from small tutorials and stick with complete references. Learning from piecemeal tutorials will leave you with fragmented knowledge, and they are usually lower quality.

Here is a list of references taken from another Quora question. The key to learning how to program, in my opinion, is to practice a lot. So do the exercises these books contain, and do more programming on your own.

Online Tutorials & Ebooks
All free

Recommended: (A higher level look at programming with Python as the tool; highly recommended if you want to be a good programmer)

Recommended: (A higher level look at programming with Python as the tool; highly recommended if you want to be a good programmer)

Sometimes having a physical book makes it easier for some people to learn. Many of the above ebooks are available in hard copy.

Dive Into Python
Think Python
Learn Python the Hard Way
A Byte of Python

How do I learn Python?

All of those are Python references. The online material available for Django is more sparse, but there are some good resources.

The Django Book is the starting point for most people:

There is, of course, the official tutorial: I found Django Book more useful. However, get very familiar with the Django docs. They are very good, and you will be spending a lot of time digging into them.

This is a highly recommended hardcopy book for learning, but I've not used it:

Prefer video? This series ought to be very good: I have not tried it yet either. There is a $25/mo fee for their service

Getting Assistance
Inevitably, when you are learning or attempting to build something, you're going to run into a brick wall at some point.

This is my workflow if I get stuck on a concept, or while programming:
Check the Documentation -> Check the Source Code -> Search Google -> Ask on StackOverflow

Asking is always a last resort, quite simply because figuring it out on my own gives more of a sense of pride and accomplishment, and I'm more likely to remember the solution.

Python Docs:
Django Docs:

See Questions On Quora

Posted on 15 December 2011

What are good ways to understand WSGI, flup, fastcgi, CGI, and Django?

Below, I've given a very stripped explanation of the differences. I am not including a lot of details because that might cause unnecessary confusion.

The high-level goal of a server is this:
  1. Accept a request
  2. Process the request
  3. Send a response
Many web servers (i.e. Apache, Nginx, etc) are used primarily for just accepting requests. They can target specific ports and protocols to receive these requests.

Next, there are web applications, which take data from the request, acts on it, and prepares data for the response.  These applications can be written in any language as long as there is the necessary "glue" between it and the web server.

For example, Django is a web application framework that can use WSGI glue to bind itself to an apache web server. In other words, WSGI connects two different pieces of software so they play nicely. As a result, we have 2 modular systems, which is nice. 

Now, you are probably asking: what is this glue? The glue is not another piece of software; the glue is an agreement between the web server and the web application.

The story of Apache, WSGI, Django, and a Request:

Apache: "I just received a request! Hey WSGI, I need you to prepare Django over there to handle this request"
WSGI: "Okey Doke. I'll set up the environment, take the request, and pass it along to Django."
Django: "Thanks WSGI! Give me a second and I'll have a response for you."
WSGI: "Alright, I'll just wait right here."
Django: "Okay, done! Here is my response to that request. Go give it to Apache"
WSGI: "Cool! Apache, I have a response for you. I'm giving it to you just the way you like it!"
Apache: "Perfect, I got it. Responding the requester now. Good work team!"

See Questions On Quora

Posted on 25 October 2011

What are the advantages of web2py over Django?

web2py places a strong emphasis on ease of use and productivity ( -- you will probably find it to be one of the easiest frameworks to set up, learn, and use. Yet it is also packed with features and offers a great deal of power and flexibility. Some notable features:

Development of the framework is very active, with new releases at least every month -- yet backward compatibility is maintained with each release. There's a very helpful and responsive mailing list (, and it's easy to get involved, get feature requests addressed, and make contributions.

Here's a presentation from PyCon 2012:

InfoWorld rated web2py best among six Python web frameworks and awarded it a 2011 Bossie Award for open source application development software and a 2012 Technology of the Year Award.

See Questions On Quora

Posted on 16 July 2011

Why is Ruby/Rails or Python/Django better than PHP?

Like Gidi Meir Morris says, comparing PHP to a framework is a bit problematic. A more accurate comparison would be to compare PHP to Python or Ruby, and to compare a framework like CakePHP to Rails or Django.

PHP, as a language, has a bad reputation for three main reasons:
  1. PHP is INCREDIBLY easy to pick up. In part because the language is designed that way, but also because there is a lot of documentation for PHP targeting people that doesn't know anything about programming and should not ever be taught anything about programming. :)   This is my favourite example:  WPDesigners guide "So you want to create Wordpress themes, huh?"   It is brilliant in the sense that it assumes absolutely NO knowledge about what the hell you are doing, and teaches PHP without the need for any prior knowledge whatsover. Which is great, but the problem is that these people then think that they can actually program, and then then proceeds to release a scourge of untested, bug-filled, unreadable, horrible pieces of code on the world, which has given PHP a bad rap. Drupal (and the insane amount of piece-of-shit plugins that is available for it) is a fine example of this.
  2. It's disgusting to a compsci-person. The language, while absolutely capable, is like a Leatherman duct taped together with a chainsaw, a hammer and a chicken. It's not cleanly designed from the bottom up by a computer scientist, like most other languages, resulting in what is elaborately described in the answers to What are the horrors of PHP?
  3. PHP is no longer cool. Around 2004 when Facebook launched, PHP was the shit. Since then, development of it has stagnated and the throne as the cool new development thingamabob has been overtaken by Ruby on Rails.   If you doubt the stagnation of PHP, read this and compare the TIOBE index if PHP in 2005 with that of now:

Follow me if you're interested in this kind of stuff!

More reading:

See Questions On Quora

Posted on 25 May 2011

Why is Ruby/Rails or Python/Django better than PHP?

Your question is flawed, as it compares two different things.
PHP is a language while Rails & Django are frameworks.
You are comparing apple and oranges.

I'll explain why people usually react the way you describe, though:
  1. What experienced developer hate most is rewriting what has already been written and fighting their code base to make it do what they want. This is where frameworks come in. A framework gives you a ready made code base which has been designed and tested by many developers who came before you and give you a well thought out solution for common problems. This saves you time and headaches. Rails & Django are two good examples of frameworks which solves specific problem (specifically those surrounding the repetitive work which goes into Web Application development).
  2. PHP is a language, just like Ruby & Python. All three are good languages, with specific weaknesses & strengths. PHP specifically, especially amongst less experienced developers, has a tendency to become spaghetti code... which is why many hate it. I have worked with PHP for years and find it annoying in the wrong hands, but if your developers are good PHP is a fine language to use.

See Questions On Quora

Posted on 25 May 2011

How does Backbone.js interact with Django?

Django and Backbone.js are separate projects, and there is no direct interaction between the two frameworks. I.e., they aren't tightly coupled. You can "connect" a backbone.js file to a Django project via Ajax.

In my opinion, the easiest way to do this is to use Tastypie: Tastypie makes it easy to create REST-based interfaces in Django.

There is an example project in Github that demos how to connect Django to Backbone.js via the Tastypie Django app. You can find it at:

You can find Tastypie at:

See Questions On Quora

Posted on 30 April 2011

How do you query with a condition on a ManyToMany model in Django?

Without your specific model definitions I'm not entirely sure what you're doing wrong since this feature works for me just fine (and I use it all the time). I think perhaps you might be missing the "through" option on many-to-many fields (see it lets you easily define these sort of "augmented" relationships.

Here's how *I* made this work; perhaps it'll help you figure out what's going on in your specific case. My models look like:

from django.db import models

class Person(models.Model):
    name = models.CharField(max_length=200)
    groups = models.ManyToManyField('Group', through='GroupMember', related_name='people')
class Group(models.Model):
    name = models.CharField(max_length=200)
class GroupMember(models.Model):
    person = models.ForeignKey(Person, related_name='membership')
    group = models.ForeignKey(Group, related_name='membership')
    type = models.CharField(max_length=100)

And given that definition, queries like the following work just fine:

# Which groups is Jim in?

# But which groups does Jim admin?
Group.objects.filter(people=jim, membership__type='admin')

# And which groups is Jim just a member of?
Group.objects.filter(people=jim, membership__type='member')

I've put the full code I used to check that this works at; hope it helps!

See Questions On Quora

Posted on 15 February 2011

What web server suits Django best?

I'm still a big fan of a stripped down Apache+mod_wsgi running behind nginx.

Nginx handles static files, gzip, trickling to slow clients, load balancing and having a configuration language that's actually pleasant to work with.

Apache just sits there serving up dynamic Python pages via mod_wsgi, using the shortest possible config.

The reason I like Apache for this is I don't need to babysit the process at all, unlike if I was using FastCGI or running a separate Python app server.

See Questions On Quora

Posted on 25 January 2011

What are the best ways to improve Django performance?

I'd like to follow up on what Alexander said.

1. Indexes are going to get you database performance, but are a necessity. it's also important to look at your query and join patterns.

2. Generic relations are fine. They are not slow, just more difficult to manage in your code base.

3. Dont ever use select_related without arguments.

4. Dont execute any queries in your template. IMHO if you're caching template fragments you're doing something wrong.

See Questions On Quora

Posted on 17 January 2011

What is the best Python web app framework? And why?

simplest != best.

Some serious ones:

There are many more, read this:

For the simplest one, I'd go with plain WSGI, otherwise digging with Django or Flask.

See Questions On Quora

Posted on 7 January 2011

What are the benefits of developing in Node.js versus Python?

  • You can use the same language for both client and server development.
  • The Chrome V8 engine: this is the single biggest selling point . There are many optimizations in the V8 engine ( most notably hidden classes and inline caching) that put it head and shoulders above any other dynamic language implementation [1].
  • Javascript as a language with closures is well suited for callback centric asynchronous programming.

[1] http://shootout.alioth.debian.or...

See Questions On Quora

Posted on 6 January 2011

What are the benefits of developing in Node.js versus Python?

I see three major "wins" that Node.js has over most other development environments (including Python):

  1. It's built to handle asynchronous I/O from the ground up. Other environments have async. I/O features, but Node's the first environment where it's really pervasive. In most environments you'll find only limited pieces available in async. flavors, but in Node everything (or nearly everything) is async.-only. It's actually hard to write non-async. code in Node!

    Now, there's some debate over whether async. programming is really the silver bullet some claim it is, but in my mind there's little doubt that it's a really good match to a lot of common web- and network-development problems.
  2. It's "just JavaScript." Every time I  context switch between Python on the backend and JavaScript on the frontend I waste stupid amounts of time making silly syntax errors — semicolons in my Python, missing braces in my JavaScript, etc. Some days I might switch a dozen or more times, and it really feels like I'm wasting brain cycles swapping in and out my language knowledge. Staying in a single language feels faster.
  3. It's new, so it has the benefit of being able to learn from previous languages' and environments' mistakes. Better, Node can correct those mistakes without the backwards-compatibility concerns. For example, the Node package installer, npm, is already quite a bit better than many of its equivalents. All in all, Node feels very polished and modern; it hasn't had time to accumulate the cruft other languages/environments have.

    (Sadly, I'm all too sure it will accumulate this cruft eventually. Everything new feels old eventually.)

I highly recommend that you take the time to learn Node — it'll make you a better developer, whatever you end up using. I learned Node last year, and I'm very happy I did. It's a cool piece of software, and it's a great tool to have in your toolbox.

See Questions On Quora

Posted on 6 January 2011

As someone learning Python/Django, should I set up a local server on my Mac or should I just use Google App Engine?

Absolutely yes you should setup a local server. And by that, I mean simply run this command inside your project: ./ runserver (I can't tell you how many times I type that every day...) then point your browser at http://localhost:8000/ and you should see the blank django page.

Follow the tutorial on -- it's a very easy step by step way of getting started with Django.

And remember that Django is not Python and is certainly not App Engine. If you're just learning, there's no reason to put your stuff on a server -- just run it locally and learn that way. When you get to the point of wanting to post your project publicly, there are oodles of tutorials out there on how to do it.

In summary: stay away from GAE for now, run the local server, use sqllite for your database -- don't mess with setting up mysql, and don't forget that learning some good ol' fashioned python will be helpful along the way.

See Questions On Quora

Posted on 5 January 2011

What is the Heroku equivalent for Django applications?

Right this moment there's nothing for Django that's as easy as Heroku, so if you need something right now your choices are quite limited. There are, however, quite a few solutions being worked on, some of which offer private alpha/beta accounts. There are also a few DIY solutions worth looking at.

I'll go into more detail below:

If you need to deploy an app right this minute without much fuss I'd suggest WebFaction ( They're the best option for cheap and easy Python deployment right now as they understand the problem space very well and offer excellent support. You also could consider Google's App Engine (, but note that you'll be quite limited in the parts of Django that'll run on App Engine.

If you're willing to wait a bit, I know of at least four Heroku-inspired Python/Django hosting solutions in the pipeline:

None of these services are fully available yet, so I can't really speak to their quality. However, most of them have pretty smart people behind them, so I fully expect they'll be pretty nice. It'll be a nice horse race on availability, features, and pricing -- good for users!

Finally, one DIY solution you might want to check out is Silver Lining ( It's basically a DIY version of what the above services are trying to build -- you'll do a lot more yourself, probably, but not nearly as much as if you needed to build a server from scratch.

Good luck!

See Questions On Quora

Posted on 4 January 2011

How does Flask compare with Django?

Flask is simpler than Django much like Sinatra is simpler than Rails. It's generally one file, not counting templates and static files, and relies on your bringing in your own ORM and other pieces.

Django is more cumbersome, simply by having more files and moving parts, but is a bit more of a one-stop-shop solution for building web apps.

See Questions On Quora

Posted on 25 October 2010

What is the highest traffic website built on top of Django?

Updated July 2011

Disqus serves over 3 billion page views, and more than 500 million unique visitors a month on its Django stack. As far as we know we are the largest installation out there.

Each page view translates into several hits that go to Django, Varnish, and other services. We also employ a large amount of traffic on non-web instances of Django, such as through Celery and other worker-style processes.

See Questions On Quora

Posted on 24 August 2010

Why did Quora choose to develop in Pylons?

The main reason we chose Pylons over other Python web frameworks was because we knew we wanted to replace a lot of it with our own stuff (we don't use templates or an ORM,) and Pylons seemed like a better choice for doing that than other frameworks we considered (Django, etc.)  This was based on just reading stuff on the web since none of us had used Pylons before.

One thing that also contributed to the decision was that I knew MochiMedia used Pylons (in addition to Django), and they seem to generally know what they are doing and be pretty smart.

If Flask had been released when we were setting things up, I think that would have been in the running as well.

See Questions On Quora

Posted on 17 February 2010

What is the best Python web app framework? And why?

The two that stand out to me are Django and Pylons.

Pylons makes more sense if you want to invest a lot in doing custom work on your framework; Django might be a better choice if you want to make a site like a newspaper (or other traditional CMS product.)

cherrypy can be a good choice for very small projects.

They both have lots of documentation and lots of users and are easy to setup.

I put some time into researching this in the spring of 2009.  We chose Pylons because the different parts are easy to swap out.  For example, we didn't want to use a templating system, and it was easy to choose any templating system or just not use one with Pylons.  My impression was that it was slightly harder to do this in Django which has a tighter full stack integration.

If you want to use your web app framework as a CMS, Django is probably a better choice.  There are lots of convenient plug-ins and all the different pieces are setup to work up with each other so it's easy to build things that are similar to a newspaper really quickly with it, and it has lots of administration and account things built-in in a way that Pylons doesn't.

Ben Bangert, the creator of Pylons, has a somewhat informative discussion of Django vs. Pylons here.

For small projects, I've used cherrypy sometimes, which isn't perfect but runs as a standalone webserver and requires very little boilerplate to setup.  Flask is a new framework that is gaining popularity and seems to fill the same niche but be a little bit more refined than cherrypy. ( )

See Questions On Quora

Posted on 14 December 2009 search results

Things you love and hate about using Celery with Django.

I am the author of django-q , a task queue and scheduler application for Django. Even though I never wrote it as a Celery competitor, I keep getting questions like 'Why should I use this and not Celery?'.

This project is only a few months old and I wrote it specifically to make scheduling and asynchronous tasks easier to use in Django projects. So I am asking you, Djangonians with a taste for tangy vegetables, what do you love and hate about using Celery with Django?

I'll try to make a comparison based on your input, which hopefully will help future developers make an informed decision.

submitted by koed00 to django
[link] [70 comments]

Posted on 28 August 2015

Why Django over PHP xor Ruby?

I plan to learn at least PHP and Django but I'm curious why there's a preference. I asked the same question over on /r/PHP and while they gave good reasons for using PHP they didn't have a clear idea of why someone would use Django or Ruby.

This tells me they likely just don't know.

From what I read online, Django and Ruby are way more popular among startups and 1 product shops, does anyone have a good intuition as to why? Is it purely a matter of more concise and legible code?

Thanks for any insight :)

submitted by charlesbukowksi to django
[link] [51 comments]

Posted on 18 July 2015

Anyone here using Python 3 with Django?

I am searching online for a host/cloud provider that has easy-install django setup, but it seems everyone uses Python 2.7.x. I understand a lot of existing stuff relies on Python 2.7.x, but it seems people don't want to move to 3.x and so there is very little information about it online.

Is anyone here using Python 3.x with Django?

Who is your host and what is your experience?

Is it inadvisable to jump to Python 3.x at this point?

submitted by YouAreSalty to django
[link] [55 comments]

Posted on 8 June 2015

what does django offer that rails doesnt?

hi all, i've asked the opposite question on the rails subreddit too, and i've so far got comfy with django, and now that i'm at a certain point of django, what is it about django that wouldy throw me off onto rails because it may be nicer to do on rails?

i like dango because its probably as popular, the docs are better i think, and of course python is used more than ruby (i think).

so make me stay on django!

submitted by a5myth to django
[link] [40 comments]

Posted on 23 February 2015

What is Django not good for?

Hi, I'm a couple months into Django and it is my first step into web development, and I was wondering what (kinds of websites?) is Django not so good for? If you could briefly explain why, and also what an alternative to Django might be in that instance that would be great. Thanks!

submitted by Caught_Up to django
[link] [47 comments]

Posted on 3 December 2014

The Django Tutorial: Dated and Confusing?

Hello Django Community! I'm curious to hear from Django users (experienced and new) in regards to your experience working through the tutorial, and then moving on to building your own project.

I've heard some people claim that the tutorial is "simple, straightforward, and all you need" to get running with Django. I've heard other say they were just as confused (or more so) after doing the tutorial as they were before doing it.

For me, I didn't fully understand Django until I learned Flask. Flask started at ground zero: a hello-world application. In 7 lines of code and two terminal commands a new user can have an application up and running. There's no discussion of ports, databases, or assumption that Flask is installed already. It takes a total noob, gets them up and running, and then starts things off in an easy-to-read format. There's even a separate forward for experienced programmers.

Once I had deployed a Flask project and tried Django again, I finally understood what was actually going on in Django (and its strong points). Now, after using both for many projects (both large and small), I thought I'd ask: Do you think the Django tutorial needs a rewrite? If so, what would you do to change it? I'm also curious to know what your experience with web development, python development, and MVC was before you started learning Django.

My opinion: The Django Documentation direly needs an overhaul to appeal to the MVC/MTV/Python framework noob. It simply introduces too much, too fast. Sure, the Admin is cool...but does it belong in the tutorial? Sure, a HUGE part of Django is the ORM/models...but do we really need to start talking about databases before introducing other parts of the framework?

On page one of the tutorial, the new user is instantly hit with Database setup, creating models, migrations, and the python shell. On page two, we completely switch gears and play with the admin. Finally, on page 3, we talk about views and actually displaying our own content on the front-end. It's true, Django is a HUGE framework when compared to Flask. But is it really appropriate to drown the new user in so much, so quickly?

submitted by rnevius to django
[link] [31 comments]

Posted on 27 October 2014

We are the authors of High Performance Django. Ask Us Anything!

Hi r/django! We recently published High Performance Django and are having a live Q&A session this Thursday, October 16th at 19:30 UTC. We'll be taking questions from IRC (#lincolnloop on Freenode), Twitter (use #hpdjango) or here and answering them on a live Google Hangout. Fire away with any questions you have about Django, deployment, scaling, etc. and we'll do our best to answer them!

You can tune in at

submitted by ipmb00 to django
[link] [48 comments]

Posted on 14 October 2014

Lets just dream Django 2.0

This post is more for a little fun than anything else. The idea behind it is you create your wish list of features for Django 2.0 it can be as sensible or far out as you like.

Personally I would love to see complete support for nosql (kind of speaks for it self) I would also love to see a full wsgi server built into django something like gunicorn by default so deployment becomes a breeze (not that its really hard at the moment).

submitted by mattwritescode to django
[link] [60 comments]

Posted on 7 August 2014

You have all been a huge help to me in my Django journey, so I thought I'd share what you helped build

Around 13 months ago, I decide to learn Python and Django so I could start building some website ideas I had. Previously, I just knew HTML and CSS and was using the ExpressionEngine CMS to build sites. It served the purpose and was good enough I guess, but I couldn't customize anything as I didn't know PHP. I wanted to be able to make changes to the way the site worked so it would do what i wanted and not have to bend around what the CMS could do. So... after 13 months of work learning Python and Django well enough to feel like I could start on this site, I dove in and with a lot of help from you folks here, I've launched:

It's a site where golf addicts like myself can signup, share, discover and discuss all things golf. Aside from being able to post links (the site uses beautifulsoup to scrape the url and return data), members can follow each other, favorite links, like links, report links, comment, and like comments. I built a basic reputation system into it that keeps track of points when each users does something on the site, i.e., submits a link or comments.

Some apps I used:

Thanks for looking!

submitted by dsizemore to django
[link] [25 comments]

Posted on 25 June 2014

Django VS. .NET

Hi, my client is asking me why we chose Django for his project and why it was a better choice against .NET I don't know .NET, can you help me explain why (and if) Django was actually a better choice than .NET for their website? Can you post some "literature" about the argument? To better understand the project, consider it is a custom CMS, totally built on AJAX requests.

submitted by carusog to django
[link] [52 comments]

Posted on 17 March 2014

Django Unchained. Dr. King Schultz being a Dentist explained.

In Django, one of our heros Christopher Walt'z' Dr. King Schultz at one point was a Dentist-which seems like a strange offbeat choice to have a character have that as an occupation at first. Dig a little deeper and start looking at the naming conventions of the film.

You have Dr. King Schultz, a third party outsider who's current job is to thwart the evils at hand and the spreading issue of racism and slavery running rampant throughout the south.

Fine- he used to be a Dentist- whatever- this is Tarantino right? He's wrought with quirky decision making.

But then take a look at who he's first hunting; The Brittle Brothers. Aside from a few things, the only thing that comes to mind when I hear the word Brittle is sweet sugary Brittle Candy- as in Peanut Brittle and Caramel brittle, all syrup cooked to sweet perfection. He finds and eradicates them with the help of freed slave Django, only to name his next target; Calvin Candie- owner of "Candie Land" In short- the south is an invented cavity laden cesspool. The infection of slavery is growing and Dr. King Schultz is the living remedy.

Not to mention to one look at Calvin Candie and you see-maybe more than anyone-is in need of a Dentist. He sucks down Coconut juice- pure, cavities causing straight cane sugar. So in context you see, He IS the cavity and Dr. Schultz is there to to eradicate him.

Tarantino uses the so-good but-so-bad for you analogy of candy as the infected spreading epidemic of slavery and racism in the south to highlight it's need to be stopped.

submitted by pgibso to FanTheories
[link] [59 comments]

Posted on 15 March 2013

What are your favorite django apps ?

I'll start with my own list:

I will add more later with links to projects repos (I'm on mobile right now)


Some have been quicker than me, but I'll list them anyway:

Those are some I developed and use frequently:

submitted by hhh333 to django
[link] [21 comments]

Posted on 23 June 2012

The Onion Uses Django, And Why It Matters To Us

We wanted to post earlier why we like/use Django, but, we get pretty busy around here, so a bit late. Sorry if this is duping any existing threads.


This is not a Drupal vs Django fight, we're not here to slag Drupal, Drupal has been important to The Onion, but The Onion decided to stop using Drupal a long time ago. The Onion deployed a Drupal site back in 2005, at the time it was the right decision given the resources, yet even then we were interested in using Python whenever possible. We feel it is a vastly better designed language than PHP and of course any framework you're using is only as good as the language. We started rolling out other projects, like The A.V. Club, in Django. Just this past weekend we switched over The Onion proper, and we're seeing immediate gains in speed, maintainability, and stability. As a team we have a pretty broad base of experience and I know we're all in agreement that what we've got now is better, enormously better. We're not just using Django, we have some other pieces that made our lives easier: git, PostgreSQL, VPS's. So this isn't just about The Onion using Django (and recommending it), but generally that you can make things better by investing time and energy into new technology.


It took us about 3 months to convert our old Onion site to Django while we also maintained and built on our other sites. We already had some components written for A.V. Club, including a strong article and image model, so we felt we could concentrate on coming up with good models that covered the necessary editorial cases. The hard part was more how to fit pieces of content from ten years ago consistently and cleanly than it was writing the code to make use of the final model. We broke out templates into nicely reusable components and made use of the Django template hierarchy. Multi-db made the conversion of data from a MySQL db to the PostgreSQL db fairly easy, so we could rerun importing old data into the new system and fix and tweak. There is an enormous advantage using Django, sorl and PIL for creating image crops based on templatetags which gives the editorial and design folk flexibility they need (no more css cropping odd-sized images into place). Again, lots of work went into actually cleaning a site that goes back to 1996, Django allowing for a relatively minimal amount of coding -- particularly when it comes to the admin side for content entry, Django trunk we found almost ready to go as-is (something we did not find with previous Django). That we could use the Django admin rather than create custom entry forms I think saved us 2 months work.


Cleaner. Much cleaner. Proper unit testing. Real reusable components across applications. An ORM rather than a just a series of functional query helpers. Tighter conventions (q: how often do people using Python argue about bracing styles? a: they don't). We can update then test a Django core change without worrying about having to take apart our applications, and if we do need to make a change, it's easy to do because there's less, much more readable code. Every member of the tech team can meaningfully contribute because there are fewer specialized or hacked together pieces. We can move more quickly on large changes because of all these reasons. And we're more stable because of all the previously expressed points.

-- The Onion Tech Team

submitted by westononion to django
[link] [115 comments]

Posted on 24 March 2010