background preloader

Django 1

Facebook Twitter

Cherrypy

Podcast. Regex. Django-notification — Pinax v0.5.1 documentation. #9025 (Nested Inline Support in Admin) - Django - Trac. Currently, admin.TabularInline and admin.StackedInline do not support inlines themselves.

#9025 (Nested Inline Support in Admin) - Django - Trac

This would allow nested inlines to happen. Change History (176) Smart {% if %} template tag. Marc Garcia & The Python: Numeric IP field for Django. Some time ago I needed to add an IP field to my model with more records (some hundred thousands). I was going to just add Django's IPAddressField, but I realized that it stores the data as text on the database, and I didn't like the idea. Basically, and IP address is just 4 bytes of data, but it's text representation can use between 7 and 15 bytes. That's not a big different when your model will have few rows, but it's a different when you'll have a huge set of IP addresses, and specially if you want to join tables by it. The only inconvenient of storing the IPs as numbers is that are not human readable if you want to check them directly to database. So, here you have my code that can be used as a replacement of IPAddressField: Add Full-Text Search to your Django project with Whoosh. Whoosh is a pure-python full-text indexing and searching library.

Add Full-Text Search to your Django project with Whoosh

Whoosh was opensourced recently and makes it easy to add a fulltext search to your site without any external services like Lucene or Solr for example. Whoosh is pretty flexible, but to keep it simple let's assume that the index is stored in settings.WHOOSH_INDEX (which should be a path on the filesystem) and that our application is a Wiki and we want to search the Wiki pages. Indexing Documents Before we can query the index we have to make sure that the documents are indexed properly and automatically. Django-orm-cache - Google Code. DjangoOnWindowsWithIISAndSQLServer - Django - Trac. Goals ¶ Getting Django to run on Windows, with pages served by IIS, and a SQL Server backend.

DjangoOnWindowsWithIISAndSQLServer - Django - Trac

Assume Windows Server 2003, IIS 6 and SQL Server 2005 where no versions are specified. You should already have Windows, IIS and SQL installed and working before following this guide. Note: As of PyISAPIe version 1.0.4, this works with Python 2.5. Robhudson's django-debug-toolbar at master — GitHub. Django-template-utils - Google Code. Pinax. Django-basic-apps - Google Code.

Custom Actions In Django Admin Object Editor. South – Trac. Deseb - Google Code. WARNING: This is been unmaintained for several years.

deseb - Google Code

I have no idea if it works with more current versions of Django. Co-maintainers welcome! Django, via the command . /manage syncdb, can automatically build a database schema based on your applications models.py file. However, after you've done this once, it leaves you with two unpleasant follow-up options if you ever make any changes to your model structure: destroy your existing schema (along with all your data) and let . Project deseb aims to fill this void by providing s third option: generate schema upgrades via the command: . Look at usage and a sample run. Django-batchadmin - Google Code. Django-command-extensions - Google Code.

This is a repository for collecting global custom management extensions for the Django Framework.

django-command-extensions - Google Code

The easiest way to figure out what Django Extensions are all about is to watch the excellent screencast by Eric Holscher. In a couple minutes Eric walks you through a half a dozen command extensions. Once you've done that check out our InstallationInstructions. Enjoy. create_app - creates an application directory structure for the specified app name. Django-tracking - Google Code. Django-queue-service - Google Code. Sleepy-django - Google Code. What is Sleepy?

sleepy-django - Google Code

Sleepy, allows you to create a static site by rendering Django templates to HTML. Why? Thumbnail an image. Django-tagging - Google Code. A generic tagging application for Django projects, which allows association of a number of tags with any Model instance and makes retrieval of tags simple.

django-tagging - Google Code

The CHANGELOG is kept up to date with notable commits and the latest version of this application's documentation, in reStructuredText format, is always available in its overview.txt file or rendered nicely. Note: this documentation is for the SVN trunk version - it may differ from the documentation for the packaged release. Version 0.3 Features Version 0.3 was released on 22nd August 2009, packages from revision 158 in Subversion. Template Query Debug. Authenticating Using Email vs Username. DbMigration - a schema migration tool for Django. Django-evolution - Google Code. When you run .

django-evolution - Google Code

/manage.py syncdb, Django will look for any new models that have been defined, and add a database table to represent those new models. However, if you make a change to an existing model, . /manage.py syncdb will not make any changes to the database. Two-Faced Django Part 5: JQuery Ajax. We've been spending a lot of time together recently, and you're probably wondering if I'm going to quit writing this series before covering any Ajax at all.

Two-Faced Django Part 5: JQuery Ajax

That is a very valid concern. But, be reassured, this segment of the tutorial is going to cover using JQuery to implement Ajax voting in our web app. Using JQuery with Django for Autocomplete Fields. This article is not particularly polished, and expects some general Django knowledge.

Using JQuery with Django for Autocomplete Fields

It does not require any JQuery experience. Using Django with JQuery for Ajax is pretty easy, but figuring out how to do do a autocomplete form can be a bit more complex. So, here is a walkthrough. I am using Frank Vega's autocomplete library . Django Master Class. The earth, while not flat, is also not round. It’s round-ish, with lots of inconvenient bumps and dips. An ellipsoid is a sort-of-earthy shape that’s easier on the computer processor. Since it’s not quite right, datums are used to choose a specific area of the earth for which the distortion is minimized for the chosen ellipsoid. (Diagram needed) Find reusable applications for your Django project, quickly and easily! #2070 (Large streaming uploads) - Django Code - Trac. AJAX validation with Django, newforms and MochiKit. Django snippets: Welcome. AuditTrail - Django Code - Trac. As raised in ​a recent discussion on django-developers, this code is one solution for creating an audit trail for a given model.

This is working in multiple production sites, but is still incomplete. See Caveats below for more information. The code below requires an SVN checkout as of r8223 or later. Usage ¶ Copy the code at the bottom of this article into a location of your choice. In your models file, there are only a couple things to do. From django.db import models import audit class Person(models.Model): first_name = models.CharField(max_length=255) last_name = models.CharField(max_length=255) salary = models.PositiveIntegerField() history = audit.AuditTrail() def __str__(self): return "%s %s" % (self.first_name, self.last_name) This simple addition will do the rest, allowing you to run syncdb and install the audit model. As you can see, the audit trail is listed with the most recent state first. Tracking Extra Information ¶ The track_fields is a tuple of 3-tuples. Caveats ¶ Django signals (Mercurytide)

Introduction If you are one of the lucky ones, you're using the Django framework. Sometimes in life it's nice to sit back, relax, and let the world come to you. Why rush around to find out what's happening? Wouldn't it be nice to be notified when the things you're interested in are happening? When programming, similar thoughts periodically rise up in a programmer's mind.

"Hey! If you are one of the lucky ones, you're programming web sites in Python using the Django framework. In Django parlance, this is known as signals, and it's just one of the many reasons why Django makes web development so much more, well, fun. The aim of this article is to introduce Django signals and cover their uses in detail. Introduce the concept of signalling;state what Django signals are and why we need them;provide examples of listening for Django's built-in signals; andshow you how to send your own signals.

This article assumes you are comfortable with Python programming and the Django web framework. Summary. Anything Else: Django: Extending User Model. Django newforms for models. The way django does forms is in a state of transition. There's the old (or, depending on your point of view, current) way, manipulators, and the new way, newforms. newforms is only available in the svn version of django at present, and is still incomplete. Despite this, newforms is usable and provides several compelling advantages over the old way. The docs at present are a little thin (although improving quickly), but the unit tests are full of useful examples (the stuff towards the end is the most interesting, and shows off some of the flexibility of newforms).

Learn Django: Create a Wiki in 20 minutes tutorial video - Learn Django: Create a Wiki in 20 minutes - Learn: Beginners, Django, Programming, Python, WebDev, WebDevelopment, web_development, web, basics, process, application, running, learn. Advanced Django » SlideShare (share powerpoint presentations online, slideshows, slide shows, download presentations, widgets, MySpace codes) The B-List: Django tips: extending the User model. Satchmo Project. DeveloperWorks : Blogs : Service Oriented Architecture and Business-Level Tooling.

Irrational Exuberance » Part 1: Django and Ajax: Introduction and Setup. The B-List: Django tips: A simple AJAX example, part 1.