Committed to Code

Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

This project is managed by jacobian.

Project Tags Tagged as python web mvc django framework

Code Analysis


Recent Highlights

Anon32

Large commit — Fixed #18023 -- Removed bundled simplejson.

More than 1000 lines of source code were added or removed in this commit.

In commit cec6bd5a by Aymeric Augustin on 2012-04-29 (23 days ago)

Anon32

Large commit — Fixed #18033 -- Removed function-based generic ...

More than 1000 lines of source code were added or removed in this commit.

In commit 1858e476 by Claude Paroz on 2012-04-25 (27 days ago)

See all highlights…


News

Django Aspect Oriented Models

One thing I've been experimenting with is aspect oriented models.  For example, the aim is to create small abstract classes that are each focused around a particular function.  These abstract classes can then be added to arbitrary models to ... [More] apply those functions to models as desired.

For example, say I define a RatingsFields abstract class and a TrackingFields abstract class.  These abstract classes can be mixed into any other model that we wish to add rating or tracking functionality to.

core/mixins.py
from djangoratings.fields import RatingField # 3rd party module

class RatingFields(models.Model):

rating = RatingField(range=5) # 5 possible rating values, 1-5

class Meta:
abstract = True

class TrackingFields(models.Model):

deleted_on = models.DateTimeField(blank=True, null=True)
created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True)

class Meta:
abstract = True

Since we applied the abstract classes to the Post model below, the model now has rating and tracking capabilities.  This is useful to help simplify code where a lot of models share fields or methods with the same function.

myapp/models.py
from core import mixins as core_mixinsclass Post(core_mixins.TrackingFields, core_interfaces.RatingFields):
name = models.CharField(max_length=128)
slug = models.SlugField(max_length=128)...
Comments welcome.
Joe [Less]


Audio recording in Django apps with flvar

flvar is a flash applet working with a media server and allows users to record audio clips on a website using it.


Getting Django to work with uWSGI on Cherokee

* Installing uWSGI

* Creating uwsgi.conf file

/home/emilian/springmerchant

dev.django_wsgi

*


CouchDB + Django + Couchdbkit

Just some notes for future use.

Couchdbkit:

Searching by key: Document.view('document/all', key='')


CouchDB + Django + Couchdbkit

Just some notes for future use.

Couchdbkit:

Searching by key: Document.view('document/all', key='')


Read all Django articles…

Edit RSS feeds.