Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
OpenBlock Geocoder, Part 2: Text Parsing and Entity Extraction
This is the second post in our OpenRural series reviewing OpenBlock and it's geocoder. OpenBlock Geocoder, Part 1: Data Model and Geocoding covers the internals of the OpenBlock geocoder and it's geocoding capabilities. As this posts builds upon topics covered there, you may wish to read Part 1 before proceeding. In this post we step ... -
OpenBlock Geocoder, Part 2: Text Parsing and Entity Extraction
This is the second post in our OpenRural series reviewing OpenBlock and it's geocoder. OpenBlock Geocoder, Part 1: Data Model and Geocoding covers the internals of the OpenBlock geocoder and it's geocoding capabilities. As this posts builds upon topics covered there, you may wish to read Part 1 before proceeding. In this post we step ... -
OpenBlock Geocoder, Part 2: Text Parsing and Entity Extraction
This is the second post in our OpenRural series reviewing OpenBlock and it's geocoder. OpenBlock Geocoder, Part 1: Data Model and Geocoding covers the internals of the OpenBlock geocoder and it's geocoding capabilities. As this posts builds upon topics covered there, you may wish to read Part 1 before proceeding. In this post we step ... -
Redux: Extending the Django User model with inheritance
I just packaged up and released a small bit of code last night. Mostly because I wanted to extract it from my project to reuse later, but also because I thought it was cool enough to share. It really is small. Just a few lines of code, as it's basically just a clever use of the InheritanceQuerySet provided by django-model-utils. I suppose I could have copied that bit of code into my app, but django-model-utils is small and has some great stuff that I've started using in all of my projects. So, allow me to share why I thought this bit of code is useful. I have a project that I'm working on that requires several different classes of authenticated users. Each user class has its own required fields and foreign keys and such. It was all complicated enough that a single user profile model wasn't going to cut it. So I tried using a generic foreign key on the user profile that could be used to point to the "real" profile. Wow, was that a mess. Another requirement of my project is that all the users belong to a hierarchy. When a given user logs in, they need to … -
Redux: Extending the Django User model with inheritance
I just packaged up and released a small bit of code last night. Mostly because I wanted to extract it from my project to reuse later, but also because I thought it was cool enough to share. It really is small. Just a few lines of code, as it’s basically just a clever use of the InheritanceQuerySet provided by django-model-utils. I suppose I could have copied that bit of code into my app, but django-model-utils is small and has some great stuff that I’ve started using in all of my projects. So, allow me to share why I thought this bit of code is useful. I have a project that I’m working on that requires several different classes of authenticated users. Each user class has its own required fields and foreign keys and such. It was all complicated enough that a single user profile model wasn’t going to cut it. So I tried using a generic foreign key on the user profile that could be used to point to the “real” profile. Wow, was that a mess. Another requirement of my project is that all the users belong to a hierarchy. When a given user logs in, they need to … -
Accept Credit Cards in Django with Authorize.Net
Accepting credit cards in your Django applications using the Authorize.Net payment gateway is easier than you might think. -
Authorize.Net Credit Card Form in Django
A Django form which submits a payment to Authorize.Net during form validation. -
Auto-Detecting Anomalies in Your Key Metrics
As your web application grows, so does the importance of monitoring. With more cogs in the machine, more things can go wrong. At Yipit, we want to find and fix application level errors in a timely fashion. While our test suite catches most bugs, some inevitably seep through. Whereas many tools such as Ylastic, AWS, Chartbeat, Munin, and Ganglia help mitigate the monitoring headache on the machine and network level, they don’t do as great a job at the application level. Where we envision Xenia Monitoring of Application Level Metrics at Yipit At Yipit, our application metrics consist mostly of user actions, or events. We log everything from opening our daily email and browsing the web interface to making an API call and using our mobile app. Up until now, we’ve relied on human monitoring, user complaints, and automated custom scripts to detect worrisome trends in our application metrics. However, our recent growth forced us to look into more scalable solutions to this problem. As such, we have begun developing an automated anomaly detection system for monitoring application level metrics more intelligently, code-named Xenia. Xena - the Warrior Princess Xenia (Not the Warrior Princess) The main purpose of Xenia is … -
django-sorting a generic way of queryset sorting
Just found a great project django-sorting. It's a generic way of queryset sorting. It's based on middleware, and templatetag. Please read the README.txt of the project. In couple easy steps you get sorting: 1. Download & install django-sorting 2.In your settings.py - add 'django-sorting' to INSTALLED_APPS - add 'django_sorting.middleware.SortingMiddleware' to MIDDLEWARE_CLASSES (make sure ' -
django-tables generic way for displaying tables (pagination included)
In thnis short post I would like to let you know about the great project django-tables. You can read more about it at: http://blog.elsdoerfer.name/2008/07/09/django-tables-a-queryset-renderer/ In a couple of words it lets you: - display the table using one template which lets you sort & paginate easily (filtering in plans!) By reading the text below you will find out how to create table with -
Django explained with model/view/controller (MVC)
-
RSS With the Syndication Framework
Getting our data out to others is very important with a world full of data. RSS is one of the best ways to do this, still. We go over how to create an RSS feed for your content as we continue to build out our demo blog. It is so simple it should be illegal, check it out.Watch Now... -
RSS With the Syndication Framework
Getting our data out to others is very important with a world full of data. RSS is one of the best ways to do this, still. We go over how to create an RSS feed for your content as we continue to build out our demo blog. It is so simple it should be illegal, check it out.Watch Now... -
OpenBlock Geocoder, Part 1: Data Model and Geocoding
As Tobias mentioned in Scraping Data and Web Standards, Caktus is collaborating with the UNC School of Journalism to help develop Open Rural (the code is on GitHub). Open Rural hopes to help rural newspapers in North Carolina leverage OpenBlock. This blog post is the first of several covering the internals of OpenBlock and, specifically, the ... -
OpenBlock Geocoder, Part 1: Data Model and Geocoding
As Tobias mentioned in Scraping Data and Web Standards, Caktus is collaborating with the UNC School of Journalism to help develop Open Rural (the code is on GitHub). Open Rural hopes to help rural newspapers in North Carolina leverage OpenBlock. This blog post is the first of several covering the internals of OpenBlock and, specifically, the ... -
OpenBlock Geocoder, Part 1: Data Model and Geocoding
As Tobias mentioned in Scraping Data and Web Standards, Caktus is collaborating with the UNC School of Journalism to help develop Open Rural (the code is on GitHub). Open Rural hopes to help rural newspapers in North Carolina leverage OpenBlock. This blog post is the first of several covering the internals of OpenBlock and, specifically, the ... -
Released 0.6 final
We are happy to announce the first final release of LFS 0.6. Kudos to Michael Thornhill (of http://www.maithu.com/) who did a lot of work to make this happen. What's new? Using Django 1.3 Added country dependent addresses Added pluggable price calculation Added supplier management Massively improved management interface Improved static file handling (Django's staticfiles) Improved properties management Removed SWFUpload (Flash) in favour of jquery.fileupload (Javascript) Using Python's locale to display currencies New contact form Continues integration on shiningpanda Migration Starting with this release we provide a migration command (lfs_migrate, based on South) to upgrade your existing LFS instances. Please refer to the documentation for further information. What happens next? We have already started to plan and implement the next release of LFS. Some new features are: Product attachements Pluggable order number generation Using django_compressor New portlets: featured products, for sale products Aded SEO information for shop and pages Portets for pages Generic tax calculations Better pluggability See the roadmap for up-to-date information and follow the ongoing process on bitbucket. Further Information You can find more information and help on following places: Official page Documentation on PyPI Demo Releases on PyPI Source code on bitbucket.org Google Group lfsproject on Twitter IRC -
Update: JsLint Checker for Sublime Text 2 with jslint4java
Very important update of JsLint Checker Plugin for Sublime Text 2: I've moved execution of jslint4java (the tool which make lint checks) into separate thread so now plugin becoming usable for production/daily usage.Execution in separate thread is important difference from other *-lint plugins – you don't need to wait with blocked editor area until jslint finish the work. Now all of it will be done separately from main editor thread and you can continue to work.Next steps for this plugin are:Add support of Sublime Package ControlI want to add support of PyLint, PEP8 and PyFlakes supportCheck it out on GitHub -
My BaseModel
When I build projects in Django I like to have a 'core' app with all my common bits in it, including a BaseModel. In that BaseModel I'll define the most basic fields possible, in this case a simple pair of created/modified fields built using custom django-extension fields. # core/models.pyfrom django.db import modelsfrom django.utils.translation import ugettext_lazy as _from core.fields import CreationDateTimeField, ModificationDateTimeFieldclass BaseModel(models.Model): """ Base abstract base class to give creation and modified times """ created = CreationDateTimeField(_('created')) modified = ModificationDateTimeField(_('modified')) class Meta: abstract = TrueYou'll notice I also have core.fields defined. That is because (unless things have changed), django-extensions doesn't work with South out of the box. Hence the file below where I extend those fields to play nicely with my migration tool of choice.# core/fields.pyfrom django_extensions.db.fields import CreationDateTimeField, ModificationDateTimeFieldclass CreationDateTimeField(CreationDateTimeField): def south_field_triple(self): "Returns a suitable description of this field for South." # We'll just introspect ourselves, since we inherit. from south.modelsinspector import introspector field_class = "django.db.models.fields.DateTimeField" args, kwargs = introspector(self) return (field_class, args, kwargs) class ModificationDateTimeField(ModificationDateTimeField): def south_field_triple(self): "Returns a suitable description of this field for South." # We'll just introspect ourselves, since we inherit. from south.modelsinspector import introspector field_class = "django.db.models.fields.DateTimeField" args, kwargs = introspector(self) return (field_class, args, … -
Gedit as a Django IDE for Linux
gedit is actually a pretty bad ass IDE for Django web development. -
Django Authentication using an Email Address
A custom authentication backend which allows a user to login using their email address in Django. -
Django Dynamically Generated Images with Cairo
It is fairly simple to dynamically generate images in your Django views using the Cairo 2D graphics library. -
AJAX Form Submission in Django
Here is a simple example of using the jQuery javascript framework to hijack and submit a Django form. -
Authorize.Net Credit Card Form in Django
A Django form which submits a payment to Authorize.Net during form validation. -
Accept Credit Cards in Django with Authorize.Net
Accepting credit cards in your Django applications using the Authorize.Net payment gateway is easier than you might think.