Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
django CMS 2.2 roadmap update
django CMS 2.2 roadmap update -
Angelo Dini is a core developer
Angelo Dini is a core developer -
How to justify attending PyCon sprints
Sad that the PyCon sprints fall on business days? Wishing you could stay but the boss/client won't let you and demands you back so 'you can work'? This is how you make it so that the sprints are something your management is demanding you attend every sprint ever.Make it foremost in your mind that the wonderful thing about the PyCon sprints is that the odds are that anyone who knows anything about whatever you are doing in Python will be there.Write up a list of the things that you are finding challenging, hard, or impossible to do with Python.Now go to the boss and say something like: "Because the experts and leaders of the open source tools we are using are going to be there, I want to attend PyCon sprints. All my time at the sprints will be focused on sitting around them and working on our tools. I'll focus on things that directly impact our agency / company / organization, specifically things I wrote down on this list."If the boss says, "Why not just use IRC or email?"Then you say something like, "Well, IRC/email is not the same as sitting next to these people. I'll be so much … -
Forms Part 3: Model Based Forms
Model forms really helps to show the power behind Django. When all it takes is to define a model and then attach the model object to a form object and poof you have a form, I call that winning. In this video we will go over using your models you already have to create forms to save you time, heartache, and code.Watch Now... -
Forms Part 3: Model Based Forms
Model forms really helps to show the power behind Django. When all it takes is to define a model and then attach the model object to a form object and poof you have a form, I call that winning. In this video we will go over using your models you already have to create forms to save you time, heartache, and code.Watch Now... -
Software for business
I am starting a new blog. The reason is that I want to keep this one more technically oriented while the other will be more business and customers oriented. Its name is Software for business and the idea is to show to the business in less technical details how the modern IT technologies like CRM [...] -
Connecting Django Models with outer applications
Preface: Sometimes, parts of the data that you have to display in your application reside out of the Django models. Simple example for this is the following case – the client requires that you build them a webshop but they already have CRM solution that holds their products info. Of course they provide you with [...] -
Join the PyCon Early Birds program!
First off, I want to say that me and my fiancee will be attending PyCon US this year! Hooray! Can't wait to see old friends and make new ones. I'll be chairing one of the Panels at the PyWeb Summit on March 8th. We're absolutely delighted to see all the great talks, hang out in the hallway, and just be in the middle of Python for well over a week. Now on to the extremely unofficial PyCon Early Birds program!PyCon early registration ends on January 25th. If you register at the early bird rate that gets you the benefit of joining the elite PyCon Early Birds group. Being a member of the PyCon Early Birds gets you all sorts of incredible rewards and benefits.Most importantly, you get some serious bragging rights.A custom ribbon that says 'Early Bird' that you get to attach to your conference badge.A discounted rate from the regular ticket rate as according to the registration page.The confidence of knowing you have a ticket before they sell out.A tasty and rather edible store-bought cookie provided by myself and Audrey Roy.If the PyCon Early Birds program gets enough members, I'm going to challenge PyCon chair Jesse Noller to stump … -
Website changes: sphinx code, layout, twitter bootstrap, less
-
Dutch Django meeting - lightning talks
-
Building secure Django websites - Erik Romijn
-
Django permissions are untranslatable
-
Scalable Vector Graphics (SVG) - Jeroen Dijkmeijer
-
30 second apache/nginx/gunicorn timeout
-
Django unicodedecodeerror in a models' __unicode__
-
Back
-
Django explained with model/view/controller (MVC)
-
Checking out tags from git on your server
-
Many-to-many field, save() method and the Django admin
-
Why Read the Docs matters
Documenting projects is hard, hosting them shouldn't be. Read the Docs was created to make hosting documentation simple. I think that we have solved this problem well, but now we need to start thinking about the larger picture. Along with hosting, Read the Docs was created with 2 other main goals. One was to encourage people to write documentation, by removing the barrier of entry of hosting. The other was to create a central platform for people to find documentation. Having a shared platform for all documentation allows for innovation at the platform level, allowing work to be done once and benefit everyone. Having run the site for over a year now, I think there is a third thing that we should be striving for. That is to make the quality of documentation better. I think that we can help a documentation culture flourish within the open source world. Django is a shining example of what a project with great documentation can do, and it has a community that values docs more than the norm. I think we can help spread this culture throughout the Python world, and beyond. This has already started, and I want to think about how … -
Get decorators wrapping a function
I mentioned a week or so ago about my django templatetag that will only display a menuitem or link if the logged in user has access to the view that it points to. In passing, I stated how it was rather complicated to do this test. The complicated bit is finding out all of the decorators that are wrapping a given function. Fortunately, python is a dynamic language, and this type of introspection, whilst not completely simple, is possible. The key lies in the property that all function objects in python have: `func_closure`. According to the python docs: > `func_closure` is `None` or a tuple of cells that contain binding for the function's free variables Depending upon where you read this, it may or may not be writable. Luckily, we don't need to be able to write to this, only read from it. If `func_closure` is not `None`, then it will be a tuple of ```` objects. To do anything useful, we'll need to look at their `cell_contents` attribute. If that is callable, then it's a good candidate for a decorator. Because of the way decorators work, if you have multiple decorators on a function, each one wraps the next … -
Fakedata i Faketpv
Fa temps que estic fent feina a hores mortes amb un projecte que m'ajudi (que ens ajudi) en el nostre desenvolupament d'aplicacions, en una de les tasques més ingrates: tenir que testejar l'aplicació i afegir dades de prova. Un dels projectes amb que estic jugant és SST un envolcall per Selenium que fa molt senzill fer scripts per testejar webs des del navegador i de manera desatesa. He fet les proves inicials i la veritat és que promet molt el projecte. En aquests moments tenim moltes de les nostres aplicacions monitoritzades fent servir Twill i connectades a Nagios, de manera que podem saber quan l'aplicació cau o no dóna la resposta esperada i que ens avisi mitjançant una alarma de Nagios. SST no està cridat a substituir Twill de moment, però si que ajudarà molt a evitar repeticions de tasques ja que és força més àgil que Selenium, i al meu punt de vista més entenedor. L'altra línia de treball va dirigida a la tasca de generar dades de prova per les aplicacions. Supòs que també us heu vist amb la necessitat de testejar una aplicació en condicions semblants al que ens podem trobar a la realitat, i això vol … -
Two-step authentication with Django
A quick post on django-twostepauth, a package I helped develop. This is a package that enables Django to use token devices for user authentication, like for example the free Google Authenticator available for many mobile phones. I've been using the two-step token authentication on my gmail account and that reduced my fear of having my email account cracked. I hope other websites, yes I'm thinking of you home banking, start to allow this kind of protection. If you do not know what two-step authentication is, the video below gives a quick tour of the authentication using the example application shipped with this django package. The package should be easy to integrate with any website. You can download it from the usual place, or clone it from the repository. As always, feedback is very welcome. -
Different Django views for different HTTP methods
Django's generic views are cool, but the approach of dividing `EditView` from `DetailView` is unforgivable not REST-ful. -
Tweaks for making django admin faster
Here follow a number of tricks I’ve employed in the past to make django admin faster. Editable foreign keys in the changelist If you have foreign keys in list_editable django will make 1 database query for each item in the changelist. Quite a lot for a changelist of 100 items. The trick is to cache the choices for that formfield: class MyAdmin(admin.ModelAdmin): list_editable = 'myfield', def formfield_for_dbfield(self, db_field, **kwargs): request = kwargs['request'] formfield = super(MyAdmin, self).formfield_for_dbfield(db_field, **kwargs) if db_field.name == 'myfield': myfield_choices_cache = getattr(request, 'myfield_choices_cache', None) if myfield_choices_cache is not None: formfield.choices = myfield_choices_cache else: request.myfield_choices_cache = formfield.choices return formfield Foreign keys or many to many fields in admin inlines If you have fk of m2m fields on InlineModelAdmin for every object in the formset you’ll get a database hit. You can avoid this by having something like: class MyAdmin(admin.TabularInline): fields = 'myfield', def formfield_for_dbfield(self, db_field, **kwargs): formfield = super(MyAdmin, self).formfield_for_dbfield(db_field, **kwargs) if db_field.name == 'myfield': # dirty trick so queryset is evaluated and cached in .choices formfield.choices = formfield.choices return formfield Enable template caching It’s amazing how easy it is to forget to add this in your settings: TEMPLATE_LOADERS = ( ('django.template.loaders.cached.Loader', ( 'django.template.loaders.filesystem.Loader', 'django.template.loaders.app_directories.Loader', )), ) Use select_related …