Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Caktus' Django Fundamentals Bootcamp
I'm excited to announce that on June 9th and 10th, Caktus will be hosting our first Django bootcamp. It will be a two day intensive bootcamp session where you'll learn the basics of developing a web application using Django through constructing a crossword drill application, created by the Caktus staff. It will go over the ... -
Python Library for University of Waterloo Open Data API
Open Data is awesome. I think there is real value in information made available through flexible standards such as JSON for build the next generation of useful web experiences. The Open Data initiative at the University of Waterloo has gathered their api at api.uwaterloo.ca which gives you access to courses, parking, and the weather. I created a Python library to wrap the API to make it even easier to use: https://bitbucket.org/amjoconn/uwaterlooapi* *github version to come soon >>> from uwaterlooapi import UWaterlooAPI >>> uw = UWaterlooAPI(api_key="YOUR API KEY") >>> uw.weather() {u'Date': u'04-01-2012', u'Current': {u'Windchill': u'NA', u'Temp': u'4.1', ... I was bit surprised not to find a Python library designed to make building REST API wrappers easier. My approach, like most API wrappers, is a good start, but lacks the elegance of a solution applied to many different instances of the problem. Let me know if you create something using this library. -
Tracking deployments in Graphite
We use Graphite in Web Development to track metrics on our sites. For the Marketplace and Addons team, it has been a real eye opener into the state of our sites. One thing that I’ve wanted to add is information on when deployments occur as these are often critical periods that can trigger changes in [...] -
Tracking deployments in Graphite
We use Graphite in Web Development to track metrics on our sites. For the Marketplace and Addons team, it has been a real eye opener into the state of our sites. One thing that I’ve wanted to add is information on when deployments occur as these are often critical periods that can trigger changes in the graphs. Sure enough, this has all been done before and covered in a blog post. Following on from that blog post, here’s how I added this for the Marketplace. First, I added a management command to django-statsd that allows you to easily send a ping to Graphite for a specific key. The value of the key is set to be a UNIX time stamp. Once that was in place I altered our deployment scripts so that on each update they send a ping with the key “update”: python2.6 manage.py statsd_ping --key=update Then each time a server is deployed that key gets added to Graphite. Next, I altered our graphs so that they show this ping as a vertical line. That’s using the command drawAsInfinite, for example: drawAsInfinite(stats.timers.addons-dev.update.count) Our development server updates on every commit. In other words, it continually deploys all the time. This … -
django-propaganda: simple newsletter app
Hey you, political leader, founder of a new religion or spiritual guru! With this application, your acolytes will receive the official organizational propaganda pamphlets right into their inboxes. Keep them updated with the Truth! In a recent fever that drove me to program a system for the marketing department at my Barcelona SEO company, I developed a project that integrates Django admin to create basic versions of newsletters, manage the subscribers, and queue emails for later delivery using Celery workers and Amazon SES as platform. So now I published on GitHub the part that manages the basic models and functions: https://github.com/nabucosound/django-propaganda/ This simple Django application is made to be used for trivial newsletter (pamphlets) deliveries with your information (propaganda), where you supply the raw content (both plain text and HTML versions) to be delivered. Subscribers will then receive the emails you send. In the coming days I will maybe open source code for a sample project using the app, as well as all that components to finish the subscriber mailing cycle, or perhaps write a post with the instructions that I found useful to achieve that. In the meantime, I uploaded django-propaganda to the Python index, so that can easily … -
Class Based Views Part 1: TemplateView and RedirectView
This is the first episode in a series of videos on Class Based generic Views. These are important to learn since the function based generic views are being deprecated, and Class Based generic Views will help to streamline things moving forward when dealing with views. This video goes over the most basic views, TemplateView and RedirectView. The video uses simple scenarios, but usable, to get you started.Watch Now... -
Class Based Views Part 1: TemplateView and RedirectView
This is the first episode in a series of videos on Class Based generic Views. These are important to learn since the function based generic views are being deprecated, and Class Based generic Views will help to streamline things moving forward when dealing with views. This video goes over the most basic views, TemplateView and RedirectView. The video uses simple scenarios, but usable, to get you started.Watch Now... -
Announcing our first keynote speaker: Jacob Kaplan-Moss
I am very excited to announce our first keynote speaker for DjangoCon Europe 2012 - Jacob Kaplan-Moss.Back in 2005, Jacob joined Lawrence Journal-World, a Kansas newspaper company, and began working with Adrian Holovaty and Simon Willison on what was known as "the CMS" - a Python alternative to the newspapers' PHP systems that were starting to strain under their own weight. "The CMS" became Django, narrowly escaping being named "Fizgig", "Banister" or "Festoon". It took shape as a framework and was released under its BSD licence in 2005.Having helped bring Django into the world, Jacob also led development on the Ellington CMS for news and media sites, and is a founder and board member of the Django Software Foundation - so as well as having being intimately involved in Django's conception and birth, he continues to nurture its development.Jacob is currently a partner at Revolution Systems. It's a great pleasure to have him with us at DjangoCon Europe. -
Now Hiring: An Awesome Designeloper!
Now Hiring: An Awesome Designeloper! -
Django redirect on duplicate object creation
So I had this project with a peculiar requirement: It had to do a redirect to an existing object when the CreateView failed because such an object already existed in the db. Not really hard to do but it took me a while to figure out.. so here's the code. class ExampleCreateView(CreateView): def form_invalid(self, form): try: obj = Example.objects.get(foo=form.instance.foo) url = obj.get_absolute_url() return HttpResponseRedirect(url) except ObjectDoesNotExist: pass return super(ExampleCreateView, self).form_invalid(form) -
Django redirect on duplicate object creation
So I had this project with a peculiar requirement: It had to do a redirect to an existing object when the CreateView failed because such an object already existed in the db. Not really hard to do but it took me a while to figure out.. so here's the code. class ExampleCreateView(CreateView): def form_invalid(self, form): try: obj = Example.objects.get(foo=form.instance.foo) url = obj.get_absolute_url() return HttpResponseRedirect(url) except ObjectDoesNotExist: pass return super(ExampleCreateView, self).form_invalid(form) -
Django redirect on duplicate object creation
So I had this project with a peculiar requirement: It had to do a redirect to an existing object when the CreateView failed because such an object already existed in the db. Not really hard to do but it took me a while to figure out.. so here's the code. Raw class ExampleCreateView(CreateView): def form_invalid(self, form): try: obj = Example.objects.get(foo=form.instance.foo) url = obj.get_absolute_url() return HttpResponseRedirect(url) except ObjectDoesNotExist: pass return super(ExampleCreateView, self).form_invalid(form) -
Django redirect on duplicate object creation
So I had this project with a peculiar requirement: It had to do a redirect to an existing object when the CreateView failed because such an object already existed in the db. Not really hard to do but it took me a while to figure out.. so here's the code. Raw class ExampleCreateView(CreateView): def form_invalid(self, form): try: obj = Example.objects.get(foo=form.instance.foo) url = obj.get_absolute_url() return HttpResponseRedirect(url) except ObjectDoesNotExist: pass return super(ExampleCreateView, self).form_invalid(form) -
Overriding change_form.html and accessing the object instance
Here’s an example for a custom change_form.html located in app/templates/admin/appname/modelname/change_form.html – and the cool thing is that it accesses the actual instance of the object, which I found to be very convenient and undocumented. If you want it to be more explicit than access through the builtin context variable adminform.form.instance, you can also make your own change_view. {% extends "admin/change_form.html" %} {% block object-tools %} {{ block.super }} <h2>{{ adminform.form.instance }}</h2> {% endblock %} -
Go to the PyGrunn one-day Python conference!
-
Early Bird extended and room sharing page
We decided to extend the Early Bird deadline for another month. This means you can get your tickets for the Early Bird price until Monday April 30th.Keep in mind that you only have two more weeks to submit talk proposals, as the deadline for those is April 15th.To make it easier for attendees to find roommates to reduce the costs for accommodation, we've added a page where you can look for rooms and roommates. Head over to the room sharing page if you want to share your room with someone or are looking for a room. -
Release 0.6.12
We just released LFS 0.6.12. This is a yet another bugfix release of the 0.6 branch. Changes Bugfix: fixed local variable 'message' referenced before assignment (Maciej Wi?niowski) Bugfix: fixed CreditCard's __unicode__ method; issue #172 Bugfix: added safe filter to static block; issue #174 Information You can find more information and help on following locations: Documentation on PyPI Demo Releases on PyPI Source code on bitbucket.org and github. Google Group lfsproject on Twitter IRC LFS on EuroPython 2012 We have submitted a talk proposal about LFS, please consider to vote for the talk. We are also sprinting on this year's in Florence. Don't hesitate to join us, if you are around, see: https://ep2012.europython.eu/p3/sprints/ and LFS sprint topics. -
Release 0.7.0 beta 6
We just released LFS 0.7.0 beta 6. This is the next beta relase of the 0.7 branch. What's new? Bugfix: added safe filter to static block; issue #174 (Frank Feng) Bugfix: Fixed display of short description for variants Bugfix: fixed decimal_l10n tag: return origin value if it's no float Bugfix: fixed error messages within checkout; issue #176 (Maciej Wi?niowski) Bugfix: fixed __unicode__ methods of several models; issue #172 Bugfix: fixed positions of newly added variants (Maciej Wi?niowski) Bugfix: fixed layout, when there are no portlets at right; issue #173 (Frank Feng) Bugfix: fixed local variable 'message' referenced before assignment (Maciej Wi?niowski) Updated: Polish translations (Maciej Wi?niowski) Updated: Chinese translations (Frank Feng) Updated: German translations Information You can find more information and help on following locations: What's new for version 0.7 Documentation on PyPI Demo Releases on PyPI Source code on bitbucket.org and github. Google Group lfsproject on Twitter IRC LFS on EuroPython 2012 We have submitted a talk proposal about LFS, please consider to vote for the talk. We are sprinting on this year's EuroPython in Florence. Don't hesitate to join us, if you are around, see: https://ep2012.europython.eu/p3/sprints/ and LFS sprint topics. -
Released 0.5.1
We just released LFS 0.5.1. This is a yet another bugfix release of the 0.5 branch. Changes Bugfix: added csrf token to password reset forms; issue #170 Bugfix: removed double slash from logo URLs; issue #166 Updated German translations Information You can find more information and help on following locations: Documentation on PyPI Demo Releases on PyPI Source code on bitbucket.org and github. Google Group lfsproject on Twitter IRC LFS on EuroPython 2012 We have submitted a talk proposal about LFS, please consider to vote for the talk. We are also sprinting on this year's in Florence. Don't hesitate to join us, if you are around, see: https://ep2012.europython.eu/p3/sprints/ and LFS sprint topics. -
Mercurial Mirror For Django 1.4 branch
Another Django release, another branch, another mercurial mirror… Cloning this one will costs you ~35Mb on your hard disk, compared to 167Mb for the official django mirror. This is updated once a day from the official svn, and it’s gonna stay for a long time : https://bitbucket.org/orzel/django-1.4-production/ For some reason, the 1.4 branch was not […] -
Fab for All
So, you know how you think you're going to get home from the conference and hop on your computer and do all sorts of awesome things like you said you would? And you know how that's complete and utter BS? I came home and collapsed for about a week. Or ... -
Yet another tutorial for building a blog using Python and Django - part 4
Welcome back! In this tutorial we’ll continue extending our Django-powered blogging engine. We’ll add the capability to assign blog posts to categories, and comment on posts. We’ll also generate an RSS feed for our blog posts. Categories are somewhat tougher to implement than most of what we’ve done beforehand. One category can be assigned to many blog posts, and many categories can be assigned to one blog post, so this relationship is described as a “many to many relationship” when drawing up the database structure. What it means is that you can’t directly map categories onto posts and vice versa - you have to create an intermediate database table for the relationship between posts and categories. Here’s what your models.py should look like: from django.db import models from django.contrib.auth.models import User # Create your models here. class Category(models.Model): title = models.CharField(max_length=200) slug = models.SlugField(max_length=40, unique=True) description = models.TextField() class Meta: verbose_name_plural = "Categories" def __unicode__(self): return self.title def get_absolute_url(self): return "/categories/%s/" % self.slug class Post(models.Model): title = models.CharField(max_length=200) pub_date = models.DateTimeField() text = models.TextField() slug = models.SlugField(max_length=40, unique=True) author = models.ForeignKey(User) categories = models.ManyToManyField(Category, blank=True, null=True, through='CategoryToPost') def __unicode__(self): return self.title def get_absolute_url(self): return "/%s/%s/%s/" % (self.pub_date.year, self.pub_date.month, self.slug) class … -
[Django Day] - Aperte le iscrizioni!
[Django Day] - Aperte le iscrizioni! Il gruppo WEBdeBS (Web Developer Bresciani), in collaborazione con l’associazione Python Italia, sta organizzando il primo Django Day a livello nazionale. La conferenza si terrà a Brescia il 21 Aprile 2012. Pubblicata l'agenda definitiva: Sul sito trovate l'agenda definitiva e una presentazione degli illustri speaker che presenteranno durante l'evento. Come vedrete non ci sarà tempo di annoiarsi! Sono aperte le iscrizioni: Sono state ufficialmente aperte le iscrizioni su http://djangoday.eventbrite.com/ Affrettatevi: il 21 arriva presto e i posti sono limitati! Iscriviti Ora! Prenota la tua maglietta: Vuoi esser sicuro di avere la tua maglietta ricordo del Django Day? Non rischiare di rimanere senza! Prenotala subito, usando il form che trovi qui (hai tempo fino a giovedì 12 aprile). Pre-Conf-Dinner! Sarai a Brescia il giorno prima della conferenza? Vuoi partecipare alla pizzata pre-conf? Un'occasione unica di socializzare con gli speaker, gli organizzatori e altre personalità della community django. Se vuoi paretcipare manda una mail a info@djangoday.it Seguici su twitter @djangoday e @webdebresa. Per qualsiasi contatto diretto non esitare a scriverci a info@djangoday.it Vuoi diventare sponsor del Django Day? WEBdeBS ha alle spalle l’organizzazione di alcuni eventi innovativi e di successo quali il “NoSQL Day” e la “Node.js … -
[Django Day] - Aperte le iscrizioni!
[Django Day] - Aperte le iscrizioni! body,.backgroundTable{ background-color:#eeeeee; } #contentTable{ border:0px none #000000; margin-top:10px; } .headerTop{ background-color:#0B2226; border-top:1px none #000000; border-bottom:0px none #000000; text-align:right; padding:0px; } .adminText{ font-size:10px; color:#407F6A; line-height:200%; font-family:Helvetica; text-decoration:none; } .headerBar{ background-color:#1F4C4A; border-top:0px none #333333; border-bottom:0px none #FFFFFF; padding:0px; } .headerBarText{ color:#333333; font-size:30px; font-family:Helvetica; font-weight:normal; text-align:left; } .postcardBarText{ color:#333333; font-size:9px; font-family:Helvetica; font-weight:normal; text-align:center; } .title{ font-size:24px; font-weight:bold; color:#407F6A; font-family:Helvetica; line-height:150%; } .subTitle{ font-size:14px; font-weight:bold; color:#000000; font-style:normal; font-family:Helvetica; } .defaultText{ font-size:12px; color:#333333; line-height:150%; font-family:Helvetica; background-color:#FFFFFF; padding:20px; border:0px none #FFFFFF; } .footerRow{ background-color:#0B2226; border-top:1px solid #000000; padding:20px; } .footerText{ font-size:10px; color:#1F4C4A; line-height:100%; font-family:Helvetica; } a,a:link,a:visited{ color:#17488a; text-decoration:underline; font-weight:normal; } .headerTop a{ color:#407F6A; text-decoration:none; font-weight:normal; } .footerRow a{ color:#407F6A; text-decoration:none; font-weight:normal; } body,.backgroundTable{ background-color:#0B2226; } a,a:link,a:visited{ color:#407F6A; } #templateHeader{ padding:0px; background-color:#304948; } Il gruppo WEBdeBS (Web Developer Bresciani), in collaborazione con l’associazione Python Italia, sta organizzando il primo Django Day a livello nazionale. La conferenza si terrà a Brescia il 21 Aprile 2012. Pubblicata l'agenda definitiva: Sul sito trovate l'agenda definitiva e una presentazione degli illustri speaker che presenteranno durante l'evento. Come vedrete non ci sarà tempo di annoiarsi! Sono aperte le iscrizioni: Sono state ufficialmente aperte le iscrizioni su http://djangoday.eventbrite.com/ Affrettatevi: il 21 arriva presto e i posti sono limitati! … -
Djangocon.eu 2012 and Early Registration
DjangoCon Europe was announced earlier this month and for those that missed it here are a few details. DjangoCon Europe will be held in Zurich Switzerland on June 4-6th with sprints happening on the 7th and 8th. For those who are looking to pick up a ticket the early bird prices end this Saturday, March 31st. Here’s a list of the ticket prices: Early Bird Regular Corporate 599 CHF 629 CHF Individual 429 CHF 459 CHF Student 219 CHF 249 CHF While I’ve never been to DjangoCon Europe last years DjangoCon US was amazing with a lot of great talks and sprints. I think the best part of DjangoCon is meeting the people you interact with on IRC in real life. The discussions and code that comes out of events like this are priceless. Related posts: Ready Set Sprint – DjangoCon 2011 Sprints DjangoCon 2011 – Portland DjangoCon 2011 – Advanced security topics