Simon Willison’s Weblog

Subscribe

Items tagged django, quora

Filters: django × quora × Sorted by date


Why is snapEDA.com slow? Is it because it uses Django?

No, it’s not slow because it uses Django.

[... 36 words]

Are traditional web frameworks and languages like RubyOnRail, Spring Boot and PHP dying now when new fast reactive pure JavaScript frameworks and services like Meteor, Node, Angular 2.0 and Firebase are breaking ground?

No.

[... 40 words]

Should I use Django forms or pure HTML in order to do not establish borders for the growth of my app?

Use Django forms. Django scales horizontally on the front-end, so if your site needs to handle large amounts of traffic you just need to run multiple front-end servers—your form handling code will scale up just fine.

[... 65 words]

What are some good resources to learn how to cleanse data using Python?

http://gnosis.cx/TPiP/ “Text Processing in Python” is a free online book that covers a bunch of useful topics related to data cleanup. It’s over 10 years old now but is still mostly relevant—the chapter on regular expressions is particularly good.

[... 61 words]

Are Django versions released too often?

The Django release process is well documented (see Django’s release process) and has been specifically designed to address the concerns of developers who don’t want to have to spend too much time keeping up to date with the latest version.

[... 182 words]

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.

[... 176 words]

For a Django application, deployed on Heroku, what are my options for storing user-uploaded media files?

S3 is really a no-brainer for this, it’s extremely inexpensive, very easy to integrate with and unbelievably reliable. It’s so cheap that it will be practically free for testing purposes (expect to spend pennies a month on it).

[... 88 words]

How can Google’s Zopfli compression algorithm be implemented in Django’s cache system?

It’s pretty easy to write custom backends for Django’s caching layer—check out https://github.com/sebleier/djan... for example.

[... 36 words]

Why is postgresql popular with django?

Partly because the first applications developed on Django (before it was even called Django) used PostgreSQL, so it’s had great PostgreSQL support baked in from the start.

[... 74 words]

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.

[... 191 words]

My boss wants me to choose drupal over django for website develpment.How can I convince him to choose django?

You could point him to Django (web framework): Why did theonion.com stop using Drupal?

[... 40 words]

What advice would Simon Willison give to a beginner Python/Django developer?

Build something and put it on the internet. Make sure you have an easy way to deploy new versions (Heroku is a good bet if you don’t want to figure out Fabric). Pick a project that’s useful to you—a simple blogging engine is often a good bet, or maybe something that aggregates together your posts from Twitter and Instagram and so on. Or come up with something a bit more creative!

[... 109 words]

What is the best way to deploy Django?

These days a popular and reliable method is to run gunicorn behind nginx. This tutorial includes notes on using upstart for process management which is handy if you are on Ubuntu: http://lincolnloop.com/django-be...

[... 47 words]

Do Flask and Django have a GUI interface like web2py?

No. The web2py GUI is something of an oddity in the Python world.

[... 65 words]

How can I detect manual record insert from mysql cansole into my code in django .?

You can’t. The best you can do is have Django periodically poll MySQL to see if anything has changed (maybe with a custom management command run by cron)—having a TIMESTAMP field on every table which will be automatically set to the current time when a record is inserted will help you spot things that have changed.

[... 80 words]

How much Django should one know before going in for an interview for a developer position?

I’ve hired people for Django positions who didn’t know Django at all. If you’re a good web engineer you should be able to pick up Django in a few days, and be properly productive with it in a few weeks. Instead, I’m interested in testing your understanding of the key underlying concepts: HTTP, SQL, HTML and JavaScript, XSS, CSRF, scaling, cookies, web app security in general, web performance optimisation, unit testing, refactoring, model/template/view-or-controller—and evidence that you’ve solved problems relating to those in production environments.

[... 177 words]

Django (web framework): What are the Best Practice For Displaying another Website from yours?

This isn’t really a Django-specific question—the answer would be the same no matter what server-side tech you use.

[... 121 words]

What are some apps, problems you would suggest to solve a new python developer?

The best way to learn python in my opinion is using the interactive prompt. Install ipython (a massive improvement on the standard python shell) and use it to interactively solve some simple tasks—things like downloading a CSV file from the web using the urllib library, parsing it with the csv module, then poking around in the data using python list comprehensions and saving some of the results out to a JSON file.

[... 95 words]

Django (web framework): What is the recommended way to cache objects that are very large (>1.5MB)?

Take a look at redis—it can handle binary strings up to 512 MB and has performance that is similar to memcache. It’s very easy to use from within Django (there’s even a pluggable cache backend for it).

[... 61 words]

How can I learn more about server-side technologies?

Get yourself a VPS, set it up from scratch and run some non-critical websites on it (nothing with private user data since you can’t be sure you’ll set it up securely). Both Slicehost and Linode offer a good set of guides to a whole host of common tasks:

[... 109 words]

How do you organize the code in your Django project?

For http://lanyrd.com/ our layout looks something like this:

[... 214 words]

Why doesn’t the Django framework come with its own REST API out of the box?

I’d argue that it does. If you want to build a REST API you need to be able to map incoming HTTP requests to handler functions based on their URL, run some custom code and return an HTTP response containing JSON (or maybe XML). Django makes all of this really simple.

[... 330 words]

What web programming framework best supports ’drag and drop’ actions?  Please give examples of sites and/or plug-ins that support the interaction.

Drag and drop is a client-side thing—it has nothing to do with the server-side technology being used.

[... 72 words]

Python Django load MySQL database from csv files performance issue?

Don’t use the Django ORM for bulk imports—the performance overhead is pretty small for regular web page stuff, but it adds up if you are running millions of inserts.

[... 63 words]

How can I look up Django functions?

You can use the ./manage.py shell command to get a shell which will import any Django modules (or any of your own code) without complaining about the location of the settings.py module. Install IPython first to get a much more useful interactive shell when you run that command.

[... 190 words]

How can I install Django in a server without shell access?

I don’t think you can.

[... 42 words]

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).

[... 94 words]

Play Framework, Django or Rails? Which one do you recommend for  Social Networking Web applications.

Both Rails and Django have been used for a large number of high profile social networking web applications. Off the top of my head, Django is used by Instagram and Pinterest, Rails is used by Posterous and Ravelry. I don’t know what the largest sites built using Play are at the moment.

[... 149 words]

Are there any good Django video tutorials?

ShowMeDo has 55 video screencasts covering all sorts of aspects of Django development: http://showmedo.com/videotutoria...

[... 56 words]

Is Django on its way out?

Not as far as I can tell—but then like many (most?) other Django users I’m too busy using it to build things to worry too much about whether or not it’s fashionable.

[... 46 words]