Cats are cute

Posts Tagged With "Django"

Autocomplete for Foreign Keys in the Django Admin Explained

Sept. 3, 2010 | by Albert O'Connor

When the select drop-down for foreign keys in the Django Admin gets big it can become a usability issue. One solution is to create a custom UI for the the model, but stretching the Django Admin to the limit is one of the fun parts of working with Django.

Prior Art

The top hit on Google is django-autocomplete. This project is the basis of my approach and therefore much thanks goes to the author. There ...

Read More

Hosting Django under different locations with Nginx and gunicorn

Sept. 15, 2011 | by Albert O'Connor

Do you know how Django uses SCRIPT_NAME?

It's not often I host different instances of Django under different locations on the same domain. One legacy install has been setup that way for over a year with Apache2 and mod_wsgi (with Nginx infront). Almost all of my new deployments use virtual hosts with different subdomains for each service.

If you are using virtual hosts with Nginx it looks like this:

server {
    listen   80;
    server_name  service ...
Read More