Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Getting Started using Python in Eclipse
Eclipse with the PyDev module has a lot to offer the Python programmer these days. If you haven't looked at PyDev before, or not in a while, it's worth checking out.Here are some of my favorite features:One-keystroke navigation to the definitions of variables, methods, classesCode completion, including automatically adding import statementsClean up importsRefactoring, including renaming ... -
Getting Started using Python in Eclipse
Eclipse with the PyDev module has a lot to offer the Python programmer these days. If you haven't looked at PyDev before, or not in a while, it's worth checking out. -
Comentário sobre Configurando um projeto Django no UOL Host – segunda parte por classic hip hop
Old School Hip Hop History: the total bad sub-culture.blah. -
Comentário sobre Configurando um projeto Django no UOL Host – segunda parte por darts
I found your blog on yahoo. I think it's pretty nice. -
Caktus Consulting Group Sponsors DjangoCon 2011
                                                                                              DjangoCon 2011 is coming up next week and I'm ... -
Caktus Consulting Group Sponsors DjangoCon 2011
DjangoCon 2011 is coming up next week and I’m excited to announce that Caktus is sponsoring the conference again this year! It is being held once again in beautiful Portland, Oregon from September 5th through the 10th. We’ve grown quite a bit from last year, there will be 9 team members-Colin, Tobias, Karen, Mark, Dan, Scott, George, Caleb and myself-attending the conference this year. -
New: Introduction to Decorator Applications
A decorator app is an application that adds functionality to another application without the application's awareness. It is different than a Python decorator, rather it follows the idea from Design Patterns: Elements of Reusable Object-Oriented Software. -
Django Admin Snippets
At its minimum, the Django Admin is an effective tool for viewing and manipulating data within a Django database. At its max, it can be a robust application allowing clients and administrators to better manage their web applications. This article aims to highlight some of the admin customizations that I ... -
Impressive Satchmo Sites
I’m starting a project for a client in Satchmo and wanted to show him some sample stores produced with the technology so that he’d feel more comfortable with what it’s capable of. The following are the standouts after going through all the items on this list: blacklockjewellery.com qwertee.com livestrongfitness.com jeepcollins.com spoonnyc.com snowsportsonline.com zutano.com abodeliving.co.uk shopjoielle.com Quick note: while scanning through these sites it became very obvious how important is for a site to have a quick response time. When I clicked some of the links on the stores that I went to the site just wouldn’t respond to my requests. It just feels a lot better when the site is snappy and ready to serve you. -
django CMS 2.2 release candidate 2 available
django CMS 2.2 release candidate 2 available -
Comentário sobre Configurando um projeto Django no UOL Host – segunda parte por hi
There are thousands of blogs that requires comments on them. What is the intention of blog comments? -
Quick, simple and arguably proper Ajax (without touching server-side)
I don't always ajaxify things, but when I do, I first try to do it as simply as possible. I have some biases about ajax (for example, it should be supplementary to the normal form behaviour), and they suggest a very simple and quick solution for ajax. -
Django'da Aggregate ve Annotate
Django veritabanı yönetiminde annotate() ve aggregate() kullanarak,satırların toplamı, ortalaması gibi, veritabanında birden çok satırdan veya ilgili diğer tablolardan bilgi toplayarak bulunması gereken değerleri bulabilirsiniz. annotate() ve aggregate() metodlarının farkı, aggregate'in tüm tablo için tek bir sonuç döndürmesi, annotate'in ise veritabanındaki tüm satırlar için ayrı birer değer oluşturmasıdır. Bu yazıda kısaca Django'da annotate ve aggreate kullanımı ile ilgili örnekler göstereceğim.Burada anlatılanlar kısaca django'da annotate ve aggregate nasıl kullanılır konusuna giriş yapmak içindir, daha fazlasını django belgelerinde aggregate ile ilgili bölümden bulabilirsiniz. Tablo alanlarının ortalaması ### # models.py ### from django.db import models class Urun(models.Model): fiyat = models.PositiveIntegerField() ### # Tüm ürünlere ait ortalama fiyatları almak istediğinizde ### from uygulama_adi.models import Urun from django.db import Avg a = Urun.objects.aggregate(Avg('fiyat')) # a = {"fiyat__avg": 23.56} -> bir dict objesi döndürür. # Dönen sözlükteki anahtar adını da ayarlayabilirsiniz. a = Urun.objects.aggregate(ortalama_fiyat=Avg('fiyat')) # a = {"ortalama_fiyat": 23.56} ## # Birden fazla değer hesaplamak ## from django.db.models import Max, Min a = Urun.objects.aggregate(Ortfiyat=Avg('fiyat'),Minfiyat=Min('fiyat'),maksfiyat=Max('fiyat')) # a = {"Ortfiyat" : 15.23, "Minfiyat": 3, "Maxfiyat" : 28} Django'da annotate kullanımı Bir istem kümesindeki (QuerySet) tüm değerler için aggregate almak için annotate kullanılır. Çoğu zaman annotate m2m (çokdan çoğa) ilişkilerde kullanılır. ### # models.py ### from django.db import models class … -
Django'da Aggregate ve Annotate
Django veritabanı yönetiminde annotate() ve aggregate() kullanarak,satırların toplamı, ortalaması gibi, veritabanında birden çok satırdan veya ilgili diğer tablolardan bilgi toplayarak bulunması gereken değerleri bulabilirsiniz. annotate() ve aggregate() metodlarının farkı, aggregate'in tüm tablo için tek bir sonuç döndürmesi, annotate'in ise veritabanındaki tüm satırlar için ayrı birer değer oluşturmasıdır. Bu yazıda kısaca Django'da annotate ve aggreate kullanımı ile ilgili örnekler göstereceğim.Burada anlatılanlar kısaca django'da annotate ve aggregate nasıl kullanılır konusuna giriş yapmak içindir, daha fazlasını django belgelerinde aggregate ile ilgili bölümden bulabilirsiniz. Tablo alanlarının ortalaması ### # models.py ### from django.db import models class Urun(models.Model): fiyat = models.PositiveIntegerField() ### # Tüm ürünlere ait ortalama fiyatları almak istediğinizde ### from uygulama_adi.models import Urun from django.db import Avg a = Urun.objects.aggregate(Avg('fiyat')) # a = {"fiyat__avg": 23.56} -> bir dict objesi döndürür. # Dönen sözlükteki anahtar adını da ayarlayabilirsiniz. a = Urun.objects.aggregate(ortalama_fiyat=Avg('fiyat')) # a = {"ortalama_fiyat": 23.56} ## # Birden fazla değer hesaplamak ## from django.db.models import Max, Min a = Urun.objects.aggregate(Ortfiyat=Avg('fiyat'),Minfiyat=Min('fiyat'),maksfiyat=Max('fiyat')) # a = {"Ortfiyat" : 15.23, "Minfiyat": 3, "Maxfiyat" : 28} Django'da annotate kullanımı Bir istem kümesindeki (QuerySet) tüm değerler için aggregate almak için annotate kullanılır. Çoğu zaman annotate m2m (çokdan çoğa) ilişkilerde kullanılır. ### # models.py ### from django.db import models class … -
Comentário sobre Configurando um projeto Django no UOL Host – segunda parte por 4986243
4986243 beers on the wall. -
Comentário sobre Configurando um projeto Django no UOL Host – segunda parte por coed summer camp
Thank you for this excellent article. I especially enjoyed reviewing it and ought to talk to everyone. -
Comentário sobre Configurando um projeto Django no UOL Host – segunda parte por Valder
Sorry, i don't wanna make malling. You can user rss feed, twitter or facebook for this :D -
Comentário sobre Configurando um projeto Django no UOL Host – segunda parte por Valder
Try this tutorial: http://www.quickonlinetips.com/archives/2006/03/import-blogger-posts-comments-to-wordpress/ -
Extending Settings Variables with local_settings.py in Django
I discovered this hacky way to use the local_settings trick to extend and/or override values in the main Django settings file today. Some projects use a "reverse" version of the local settings trick (which is explained below), whereby the main settings file becomes settings_local.py or something similar, which first imports settings.py, and then extends or overrides the values as required. I didn't want to change the name of the project settings file to settings_local.py, however, as it would mean changing the WSGI file on every server that the project runs on. The Local Settings Trick It's a well-known trick to use a file called local_settings.py or something similar, with a piece of code at the bottom of the main settings file: settings.py 1 2 3 4 try: from local_settings import * except: pass This allows you to override the value of settings variables. It won't work, however, if you wish to extend a settings variable (for example, adding an app to INSTALLED_APPS). For this, I have found that the following ugly hack seems to do the job. The Ugly Hack For this hack, replace the snippet at the bottom of the main settings file with the following code: settings.py 1 … -
The Trials and Tribulations of Django + Git
I just finished my last exam today - Web Programming and Scripting - which explains the distinct lack of activity around here in recent times. Thankfully I could end my exam season on a high, as web programming is, well, what I do - so it wasn't too much of a challenge! Something strange happens to me every time exams come around. I seem to pick up new projects, and just run with them. This time, I've become involved with a small group of people at university, writing a portal-style information system for universities. I suppose most people call this behavior procrastination, but I'm quite deeply in denial about that. Ever since my post about the Backtrac Backup System, I've been really enjoying using Django. Something about it just makes developing for the web, well, exciting. That can only be good, right? I am the designated server administrator for this latest project, mostly due to the fact that I am the only one with a server to administer, and some of the things I've learned so far seem worthy of a mention here. Firstly, we as developers were - how can I put it - stepping on each other toes … -
Using Django Authentication with Twisted Perspective Broker
For my third year project, I have hooked Twisted's Perspective Broker authentication into Django, so that a networked application can authenticate itself against Django's central user database (django.contrib.auth). The process is pretty quick and easy, thanks to Twisted's pluggable nature, and Django's pure simplicity. The Checker Firstly, we create a class which will actually do the "checking", to allow access (or not) given a username/password combination. That looks something like this: auth.py 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 from zope.interface import implements from twisted.python import failure, log from twisted.cred import portal, checkers, error, credentials from twisted.internet import defer from django.contrib.auth.models import User, check_password class DjangoAuthChecker: implements(checkers.ICredentialsChecker) credentialInterfaces = (credentials.IUsernamePassword, credentials.IUsernameHashedPassword) def _passwordMatch(self, matched, user): if matched: return user else: return failure.Failure(error.UnauthorizedLogin()) def requestAvatarId(self, credentials): try: user = User.objects.get(username=credentials.username) return defer.maybeDeferred( check_password, credentials.password, user.password).addCallback(self._passwordMatch, user) except User.DoesNotExist: return defer.fail(error.UnauthorizedLogin()) This code is relatively self-explanatory, once you understand Twisted's way of doing things. An authenticated "user" in Twisted (though this might not actually be a person) is called an Avatar. The requestAvatarId method therefore takes a set of credentials, and returns … -
3rd Year Project: Back to Backtrac
After contacting the university regarding my 3rd year project/dissertation, my ideal choice has been confirmed. I'll be making a distributed backup system, based around a Django web interface and AMQP. Backtrac is a pretty old project, and one whose name I am likely to change once I'm working on it. It was started in my first semester of university last year, when I didn't have enough work to keep me busy. I didn't know enough about Django back then, though, so it was left unfinished and only half-working. Now I think I know enough to pull this off, and it's a chance to do something I really enjoy - while getting marks for it in the process! If everything goes to plan I'll be supervised by Dr. Julie Greensmith, which I'm really looking forward to. I'll be using an app called Celery to handle the background tasks, which will be simple "pings" to the client machines, telling them to start a backup. Celery uses AMQP, provided by a broker such as RabbitMQ (which is written in Erlang). It's usually used for processing intensive computational tasks, but can also be put to use for jobs that need executing on a periodic … -
MyUni and Django 1.2
MyUni is hailed as my "latest venture" on the front page of my website. In fact, it was conceived early last year, when I was in my first year at Nottingham University, by Rob Miles and Ben Jenkinson. We were only just starting to get to grips with this new fad, called Django. The project has gone through several iterations since then, never really reaching any form of completeness. This time round, we are using proper version control (thanks to Mercurial and BitBucket), and trying to adhere to Django best practices as much as possible. Straight from the repository website: MyUni is a portal-style web application for Universities, offering studentsa central location to access all the relevant information about their course,modules, assignments, and staff members. The project came about because of a passionate hatred for the WebCT system that our university is using, and a general feeling that things could be (and should be) better. Django 1.2 will bring some really exciting new features, which I am sure would make developing and using MyUni a better experience. One of the things I'm most looking forward to using is the messages framework. I plan to use it for a bunch of … -
The End of an Era
Well, here we are. Three years at The University of Nottingham, and what do I have to show for it? Well, this is what: That's right! I have a recommendation for a first in Computer Science. It turns out both my supervisor and second marker were fond of my dissertation - Backtrac Backup System - and would like to see it used in a commercial setting. I also had my work sponsored by Servat Ltd., which went down very well with the powers that be. I've enjoyed my time at university, but I'm ready to move on now. Or at least, I'd better be, after turning down a couple of very good offers for PhD studentships. So what's next? Why, I'm glad you asked! I'm currently working on a (secret) project with Marcus Whybrow, which will hopefully shape up to be something quite special. It is, of course, a Django project, and it's teaching us both about the finer details of developing and deploying a production system. There's a few posts in the pipeline about the things we've discovered this far, and we've hardly got going yet! This time around, we've decided to go with a brand new web server … -
It Begins...
The country has just undergone a mass-exodus of university students from their parents' houses back into halls. I played by own small part in blocking up the roads moving back into university accommodation this weekend, and it's all gearing up for the new school year. I've been working with Django more and more lately, and I've written my first "commercial" application using my new favourite framework - a booking system for taught causes at the City Council. I'm really enjoying writing web applications with Django, and I'm sure this blog will start to resemble a web-developer's in the near future. Also, I'm really looking forward to this year at university. As I understand it, there's a lot more work to be done, but the software engineering group project should be fun - as long as my "randomly chosen" team are happy with us using Python!